does OptaPlanner take care of TSPTW (or VRPTW ) with optional nodes?

229 views Asked by At

let's say my traveling salesman is allowed to ignore some nodes, as long as he finishes visiting the nodes he chose , within a time range. his goal is to maximize the gain from the nodes visited (such as the total sales amount from these nodes).

I guess we don't need a total time window constraint, since we already have the availability window for each ndoe. so basically the question boils down to TSPTW with possibility to ignore nodes. it's referred to as Generic TSP (GTSP ) in literature, does OptaPlanner have some knobs to model this?

thanks Yang

1

There are 1 answers

1
Geoffrey De Smet On

Add a dummy anchor (Vehicle in VRP) that gets all the nodes which aren't picked. Adjust the score rules to ignore hard and soft constraints for the nodes in the chain of that anchor (Vehicle in VRP). So where Vehicle.isDummy() == true. Add a constraint to make sure there's another cost for the nodes on the dummy chain (and therefor an incentive to not make everything part of the dummy chain).