Originally posted by: Thomas_321
Hello,
I do have a problem with my model in Cplex and I really hop you guys can help me with it.
I searched the forum but didn´t find an answer, so I really hope you guys can help me with this.
So I simplified my model and this is where I do get the error message: CPLEX (default) cannot extract the expression.
I assume it has something to do with the devision but I can´t figure out a way around it.
Model:
//Set
{string} K = ...;
//Parameters
float p_l[K] = ...;
float p_i[K] = ...;
// Decision variable
dvar boolean x[K];
// Decision expression
dexpr float L = sum (k in K) (p_l[k]*x[k]);
dexpr float I = sum (k in K) (p_i[k]*(1-x[k]));
dexpr float obj = L/(L+I); //CPLEX(default) cannot extract the expression
//Target function
minimize obj ;
Data:
// Set
K = {K1,K2,K3,K4,K5,K6,K7,K8,K9,K10,K11};
// Parameters
p_l = [257.1, 103.38, 192.26, 190.34, 200.45, 2.50, 36.21, 500.50, 9.03, 2.54, 27.24];
p_i = [173.4, 112.50, 212.00, 137.50, 215.20, 3.00, 32.21, 510.20, 9.55, 4.08, 36.66];
Thank you for your help!!!
#DecisionOptimization#OPLusingCPLEXOptimizer