I am looking for a way to express the following logistics/distribution problem as an equation that can be run thru a solver to find an approximate solution. The problems is described as follows:
- assume there is a distribution center that is tasked with distributing different types of soda/drinks to a list of target locations (#ofStores).
- assume the distribution center has a list of trucks (#ofTrucks), each with a different carrying capacity #truckCapacity (lets say in tons), and each rated with what type of products it can distribute (for example there might be trucks that can only distribute soda cans, while others could distribute both cans as well as bottles), but only one product type will be transported at one time.
also assume that it takes X number of days for a truck to deliver the product #travelDays (for now assume at least one day for reaching the destination, one day for unloading, and same return speed)
each target distribution location (store) has a maximum limit on how much of each item it can store (again assume tons), called maximumInventory, as well as a minimum limit for each type of product minimumInventory (the supply should not drop bellow this limit)
- each distribution target (store) also provides a list of expected sales for the next X numbers of days, for each product type salesRates (again to simplify assume tons). So given the current stock level, we can estimate the inventory for each product in the upcoming days.
Assume we are the distribution center and we are assigned with scheduling trucks to deliver the products to each destination, by looking at the current store inventory for each product, expected consumption/sales, maximum and minimum inventory, the available trucks and the number of days it takes to deliver the product, and any trucks that are already on-route for delivery. The scope is to schedule the trucks in such a way that the stock stays within the max/min limit given the expected sales.
Also, to simplify the problem for the first iteration, we could further assume that we only have one product type (lets say only tasked with distributing Coke cans), and that all trucks can distribute this product type (we could even assume all trucks can carry the same load for further simplification).
What is the right optimization algorithm to solve this problem and how should the input be specified? Also what open source optimization libraries (preferably java, c#, javascript) would be best to use for this problem? Thank you.
What you are describing is a subset of automated planning. You would typically describe your problem in an action language like STRIPS and then run a planner to determine whether the goal state or states can be reached. Determining whether a successful plan exists for a given problem is PSPACE-complete, but constraints such as limiting the number of steps to reach a goal can make the problem merely NP-complete and amenable to attack by SAT solvers.