Set Fixed Cost of Vehicles #2580
Answered
by
Mizux
Debom13
asked this question in
Routing (and legacy CP) questions
-
|
Hi.... I want to assign fixed cost to the vehicles. But event after using "SetFixedCostOfVehicle()" function, it doesn't seems to be working. for vehicle_id, vehicle_cost in enumerate(data['vehicle_capacities']):
if vehicle_id > 3:
print(vehicle_id)
routing.SetFixedCostOfVehicle(20, vehicle_id)
elif vehicle_id > 3:
routing.SetFixedCostOfVehicle(40, vehicle_id)here is the snippet of the code I used. Kindly let me know how to solve the problem? |
Beta Was this translation helpful? Give feedback.
Answered by
Mizux
Jun 5, 2021
Replies: 1 comment 2 replies
-
|
your if cond 1:
... #cond1 valid
elif cond 2:
... #not cond1 and cond2
else
.... # default not cond1 nor cond2 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Debom13
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
your
ifandelifuse the same condition this is weird to me...