One vehicle, two or more mutually exclusive configurations

Hi, new here :slight_smile:

I am looking to optimize a transportation problem (job:shipment) utilizing vehicles that each can be setup in different configurations prior to their shift.

Example: “transporter” can carry 6 giraffes OR 3 giraffes+1 elephant OR 2 elephants. I have about a dozen such configurable vehicles starting from different depots, and I am looking for an optimal solution where all configurations of all vehicles have been tried to transport animals between different zoos.

I can setup multiple vehicles for “transporter” for each of its configurations, utilizing vehicle.capacity and skills, no problem. However, now I need some sort of conditional expressing that these vehicle variants are mutually exclusive, i.e. “if you use vehicle A1 during a shift, vehicle A2 and A3 cannot be used during the same shift” etc.

One approach would be to run a batch of optimizations, testing through all the possible combinations of all configurations of all configurable vehicles. But ideally, I would like to submit one optimization using conditionals. Is there a way to accomplish this using the standard optimization API?

1 Like

I don’t think this is possible. An approximation could be to use the “capacity”-“size” feature and e.g. assume that one giraffes needs 1m² and one elephant needs 5m² and in such a case use 1m² as the smallest unit and assign services with the appropriate size and vehicles with the appropriate capacity. But of course this still comes with limitations unfortunately.

1 Like