An alternative for chained variables? Coming soon...

27 views
Skip to first unread message

Jiří Locker

unread,
Sep 6, 2021, 7:48:49 AM9/6/21
to OptaPlanner development
Hey community,

I'm working on a new type of planning variable that works with a List<E> type (where E is the type of planning values). This new list variable comes with specialized change and swap moves that add and remove planning values in the list variable.

When this is done, you'll be able to model VRP (and other use cases that use the Chained Through Time pattern) without chained variables. No more Standstill interface. So for example:

@PlanningEntity class Vehicle {
    @PlanningVariable // API naming not yet decided
    List<Customer> customers;
}

@PlanningEntity class Customer { // shadow entity
    @InverseRelationShadowVariable vehicle; // (was anchor in the chained model)
    @IndexShadowVariable index; // which n-th customer this is for the vehicle
}

Let me know what you think about this. Do you have a chained problem and would like to simplify the model? Or have you tried chained variables and gave up because it was too complicated?

At this point, I have a working implementation for the Local Search and I'm going to work on the Construction Heuristic for the next couple of weeks. When the CH is done, you'll be able to try it out. I'll keep you posted.

Jiri
Reply all
Reply to author
Forward
0 new messages