Hi Rob, I just want to ask what if I run this code and I don't want to set an upper bound for my Variables X[1].. X[4], therefore I would like them only to be greater than or equal to zero. However, I've tried running this code multiple times and I've got different results for X and it only says that it has only the "best feasible solution" everytime I run it. I was just concerned about how can I deal with this type of problem? or Can we have options other than multistart, or shall we incorporate a search method for this? I'm clueless. Thanks for the help! 🙂 proc optmodel;
var x{1..4} >=0;
min g=(-1) * ((-1) * (((10/x[1])^x[1]) * ((12/x[2])^x[2]) *
((0.5/(2*(0.4*x[3]-0.2*x[1]-1)))^(0.4*x[3]-0.2*x[1]-1)) *
((0.4/(2*(0.55*x[4]-0.6*x[2]-1)))^(0.55*x[4]-0.6*x[2]-1)) *
((50/(0.6*x[3]-0.8*x[1]))^(0.6*x[3]-0.8*x[1])) *
((60/(0.5*x[4]-0.4*x[2]))^(0.5*x[4]-0.4*x[2])) * ((100/x[3])^(-x[3])) *
((120/x[4])^(-x[4])) * ((((-0.34*x[3]-0.08*x[1]-0.475*x[4]+0.66*x[2]+3)*4)/(195*(-0.34*x[3]-0.08*x[1]+1.6)))^(-0.34*x[3]-0.08*x[1]+1.6))
* ((((-0.34*x[3]-0.08*x[1]-0.475*x[4]+0.66*x[2]+3)*2)/(195*(-0.475*x[4]+0.66*x[2]+1.4)))^(-0.475*x[4]+0.66*x[2]+1.4)))^(-1));
impvar y {i in 1..7} =
if i = 1 then 0.4*x[3]-0.2*x[1]-1
else if i = 2 then 0.55*x[4]-0.6*x[2]-1
else if i = 3 then 0.6*x[3]-0.8*x[1]
else if i = 4 then 0.5*x[4]-0.4*x[2]
else if i = 5 then -0.34*x[3]-0.08*x[1]-0.475*x[4]+0.66*x[2]+3
else if i = 6 then -0.34*x[3]-0.08*x[1]+1.6
else if i = 7 then -0.475*x[4]+0.66*x[2]+1.4;
min f=(-1) * ((-1) * (((10/x[1])^x[1]) * ((12/x[2])^x[2]) *
((0.5/(2*y[1]))^y[1]) *
((0.4/(2*y[2]))^y[2]) *
((50/y[3])^y[3]) *
((60/y[4])^y[4]) * ((100/x[3])^(-x[3])) *
((120/x[4])^(-x[4])) * (((y[5]*4)/(195*y[6]))^y[6])
* (((y[5]*2)/(195*y[7]))^y[7]))^(-1));
solve with nlp / ms;
print x;
... View more