user17276678
user17276678

Reputation: 21

Efficient allocation of limited resources (max profit, all possible combinations list)

I want to find the allocation combinations of resources that are the most profitable through limited resource allocation, and make a list of possible combinations. In other words, I want to find the value that maximizes the profit, find the next best solution, and make possible combinations.

This seems to be a classical operations research problem.

total_capa = 700000

My csv data is as below.

Data set as float can be converted to integer.

[data.csv]

product,request,profit,min_alloc(req*0.2),max_alloc(req*0.8)
P_00,22138.6,4132247.36,4427.72,17710.88
P_01,201476.7,54198545.43,40295.34,161181.36
P_02,27800.7,4799053.7,5560.14,22240.56
P_03,52556.6,7732785.93,10511.32,42045.28
P_04,1202.2,517304.11,240.44,961.76
P_05,3802.9,2006703.02,760.58,3042.32
P_06,4606.7,3297285.5,921.34,3685.36
P_07,5714.9,3018404.34,1142.98,4571.92
P_08,25422,15964314.07,5084.4,20337.6
P_09,7847.6,4384356.19,1569.52,6278.08
P_10,21953.4,11709708.87,4390.68,17562.72
P_11,41175.5,26195563.14,8235.1,32940.4
P_12,44087.7,49352201.43,8817.54,35270.16
P_13,4264.9,4549461.29,852.98,3411.92
P_14,79543.9,34724780.52,15908.78,63635.12
P_15,135107.2366,58980990.73,27021.44732,108085.7893
P_16,18670.8,12741108.84,3734.16,14936.64
P_17,2214.9,1960165.54,442.98,1771.92
P_18,2442.6,727947.95,488.52,1954.08
P_19,4965.3,4816934.02,993.06,3972.24
P_20,6723.3,26192130.56,1344.66,5378.64
P_21,64212.4,27260739.4,12842.48,51369.92
P_22,3107.3,5859277.59,621.46,2485.84
P_23,6520.5,10059709.66,1304.1,5216.4
P_24,3278.5,5365847.74,655.7,2622.8
P_25,18118.1,23691658.74,3623.62,14494.48
P_26,5646.5,329967.15,1129.3,4517.2
P_27,55203.4,18480457.89,11040.68,44162.72
P_28,1945.4,853201.7,389.08,1556.32
P_29,77482.8,49685683.45,15496.56,61986.24
P_30,9363.6,6281517.34,1872.72,7490.88

"request" indicates the customer's request, but the resource is limited, so it is impossible to satisfy everyone. So I put the constraints of min_alloc and max_alloc. I would like to seek advice from the experts here on how to maximize profits. I am using python and pandas.

Upvotes: 0

Views: 134

Answers (1)

Erwin Kalvelagen
Erwin Kalvelagen

Reputation: 16782

I suspect this model reflects what you want:

 max sum(p, profit[p]*alloc[p])
 sum(p, alloc[p]) <= total_capa
 min_alloc[p] <= alloc[p] <= max_alloc[p]  

This is an LP. The next-best solution is not well-defined for an LP (imagine just moving an epsilon away). We could use something like: compared to a previous alloc*[p], move at least Delta away (in some sense). I.e.

 sum(p, |alloc[p]-alloc*[p]| ) >= Delta

This is non-convex so will require binary variables. This may require a little bit of thought (the size of some of the allocations is a bit large).

Upvotes: 1

Related Questions