A real life problem: how to do it?

Here is a real life problem I tried to solve with jsprit, but I failed.

The problem:
This is a special, single vehicle optimalization. The vehicle has a capacity of 6. Each job has the capacity requirement of 1. There are shipments (in current jsprit version) or a pickup-exchange-delivery custom jobs (in upcomming version). The pickup activities are taken place in the warehouse, while the deliveries are performed outside the warehouse.
There are two constraints:

  1. The vehicle should not leave the warehouse with less than 4 cargoes.
  2. After the vehicle leaves the warehouse, it can’t return (for new cargo) as long as it doesn’t serve all the picked up cargoes.

This means, the vehicle will do several rounds with 4 to 6 cargoes and destination in each round.

The question risen:

  1. How could I ensure the vehicle doesn’t leave with less than 4 cargos?
  2. How could I restrict the vehicle to return without serving all destinations before?

Hard constraints are the trivial solution, but it leads to the ruin-doesn’t-honor-constraints problem. Making a new ruin strategy is not so easy, because the constraints are complex. Any other idea?

Thanks in advance,
Balage

1 Like