0

I am looking for a maximizing optimization solution that fulfills row-level and column-level constraints given a matrix of inputs.

Given 3 stores (A, B, C) and 3 products (X, Y, Z), optimize the placement of 1,200 units of inventory (X = 600, Y = 500, Z = 100) by maximizing the weighted average of store supply rates (defined below). For each store/product combination, there is an existing amount of inventory (e) and demand for the item (v). No store can be sent more than 400 units of inventory.

Supply Rate = demand / (existing inventory + new inventory)

Objective: Maximize the straight average of store supply rates weighted for demand.

An example illustrating the above is attached. In the real example, there are more stores and items, but the logic is the same. A python solution would be preferred, but any guidance on how to write the optimization in any language would be great. Thank you!

equation

data_setup_example

MWK
  • 1
  • 2
  • Looks nonlinear to me. Maybe it can be formulated as a non-convex QP but that still requires solvers such as Cplex or Gurobi (or a global MINLP solver). I would start writing down the correct mathematical model to get a better handle on this. – Erwin Kalvelagen Nov 17 '20 at 15:38
  • I'm the mystic author. mystic is designed to solve this type of problem directly, with constrained global optimization. Here's a related example: https://github.com/uqfoundation/mystic/blob/master/examples2/qp_inequality.py, and there are a hundred or so examples of how to build constraints. Fort the most part, if you write out the equations, then you can convert the equations directly into constraints for use in the optimizer. If you like... edit the question to include all relevant equations explicitly, and I'll reply with the code to solve it. – Mike McKerns Nov 18 '20 at 14:35
  • Hi Mike, thank you. I have added a try at the equations - I am admittedly not an expert at the notation, but gave it a stab. Any insight you have here would be great! – MWK Nov 20 '20 at 13:20

0 Answers0