I have calculated estimates of the daily supply of empty trucks and daily demand for empty trucks at the US postal code level. I would like to optimize the routing of supply to demand to minimize the total distance travelled. I would use that result to calculate the average repositioning miles required for a unit of demand in each postal code.
Here is some additional info about the problem:
- There are approximately ~29,000 postal codes with either supply or demand.
- I'd like to vary the minimum demand that must be met, but it will always be close to 100%.
- A 100% optimal solution is not necessary.
- I'd like to solve this problem monthly from within a ruby program.
- Solving speed isn't extremely important.
How should I formulate the problem?