Limited fleet size


In my instance a lot of vehicles are defined with some different configuration.
I would like to limit the number of vehicles into my solution in order to obtain a subset of my initial fleet.

I’ve found this topic which seems to fit my problem, but the links are out of date

Is there currently a mechanism to fit my need ?



Hi braktar,
If you want to limit your fleet, what prevents you from specifying your limited fleet and setting your fleetsize to finite?

The needs is to obtain a subset of my entire fleet.

For example :

4 Vehicles starting from Location A
4 Vehicles starting from Location B

I want at most 6 vehicles used, letting the solve chose which subset is the most fittest :wink:

By my side, I’ve reach this goal by avoiding the insertion a new route in the solution at the Insertion level.

this seems practically useful (for example, there are 10 vehicles but only 5 drivers, etc.) and thus I have implemented the constraint in the following commit - I guess you have probably implemented something similar :wink:. Hopefully I have done it right.

1 Like