I have this (non?) linear programming problem which am not sure on how to go about solving it. So i have the following variables x,y and their bounds:
x_lower=[0,0,0,0,0,0]
x_upper=[100,20,50,200,10,50]
list_y=[1.41,1.42,5.60,5.70,8.60,8.80]
I want to pass these through the following terms:
back_true=(x*y)
back_false=(-x*y/y)
lay_true=(x+x*(y-1)**(-1))
lay_false=(-x*y/y)
where x is a random integer with bounds 0 and term x_upper[i] and is paired with a term 'y' from list_y[i]
This is in order to get the combination of x's that minimizes the difference between the maximum of the sums of the terms in the three lists while keeping the minimum value of each sum result non-negative.
res=[back_true[0],lay_false[1],back_false[2],lay_true[3],back_false[4],lay_true[5]]
res2=[back_false[0],lay_true[1],back_true[2],lay_false[3],back_false[4],lay_true[5]]
res3=[back_false[0],lay_true[1],back_false[2],lay_true[3],back_true[4],lay_false[5]])
the maximum of each would therefore be given by using the the following lsits paired with list_y:
for x in [100,0,0,200,0,50] >>> res = 439.9634 (max); res2 = -13.59 ; res3 = -159.362
for x in [0,20,50,0,0,50] >>> res = -243.59 ; res2 = 404.0293 (max); res3 = -182.381
for x in [0,20,0,50,200,0] >>> res= 92.5531; res2 = -32.381; res3 = 1848.257 (max)
sum(res (max),res2 (max) ,res3 (max))= 2692.25
i want to get the combination which minimizes the sum of the max values for the three res terms. As you can see what maximizes the term for one violates the non negative constraint in at least one other.
I not only want to keep these all above zero but get the highest possible sum of the three 'res' terms, that is:
find list of combinations of 'x' that mininimizes [sum(res,res2,res3) (maxes) minus sum(res,res2,res3) using x combination], while each of res, res2, res3 >=0
Does any one know how i could go about this?
I was playing round with linprog from scipy optimize but it doesn't seem to take more complex terms like the ones i want to use so not sure if i can use this for it.