I wish to assign customers to their nearest distribution hubs. These hubs have maximum capacities however, and if these are breached I would like to assign customers to the next most appropriate hub.
Currently I am trying to use a multiple knapsack problem in or-tools (happy to use other) to code a python warehouse optimisation.
In this scenario I am treating the drivetime as my value (although I actually seek to minimise it so am using the inverse square) and the capacity as a weight.
The problem is that the value (drivetime) will vary by warehouse and therefore changes.
Is there any solutions to solve this?
I think knapsack is the correct solution, but if there is something else I should try please feel free to correct me - for example assignment feels potentially more appropriate.
Am trying to do in Python as well.