Optaplanner and real time replanning without simple backup planning, minimising changes

235 Views Asked by At

If I have the following situation - a kind of "Travelling Technician" problem modeled on the vehicle routing but instead of vehicles its is technicians traveling to sites.

We want to:

  • generate a plan for the week ahead
  • send that plan to each of the technicians and sites with who is visiting, why and when

So far all ok, we generate the plan for the week..

But on Tuesday a technician phones in ill (or at 11:30 the technicians car breaks down). Assume we do not have a backup (so simple backup planning will not work). How can I redo the plan minimising any changes? Basically keeping the original plan constraints but adding a constraint that rewards keeping as close to the original plan as possible and minimising the number of customers that we upset.

1

There are 1 best solutions below

1
On BEST ANSWER

Yes, basically every Entity has an extra field which holds the original planning variable value. That extra field is NOT a planning variable itself. Then you add rules which says that if the plannign variable != original value, it inflicts a certain soft cost. The higher the soft cost, the less volatile your schedule is. The lower the soft cost, the more flexible your schedule is towards the new situation.

See the MachineReassignment example for an example implementation. That actually has 3 types of these soft costs.