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!