I have two dimensions, one for node capacities and another
dimension for node costs.
I want to add variable to AddVariableMinimizedByFinalizer()
such that new variable should have product of capacity dimensions cumul value
and maximum cost of nodes or end node cost in current vehicle route.
This product should be minimized by the solver to get the optimised solution.
I am trying as below but unable to get max cost or end node cost of the nodes in the current route:
total_cost = MakeIntVar(0, 99999999, "total");
for vehicle in range(max_vehicles):
AddConstraint(
MakeProd(capacity_dimension.CumulVar(routing.End(vehicle), cost_dimension.CumulVar(routing.End(vehicle)),
total_cost)
AddVariableMinimizedByFinalizer(total_cost)
Instead of cumul value of the cost dimension, is there a way we can get the max cost of the nodes in current vehicle route? Or cost of the end node in the route?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/2fa82b41-d119-4f10-9845-e21a3f2bd518n%40googlegroups.com.