Attachment 1 is the algorithm that I am trying to solve.
Attachment 2 and 3 contain the problem (McCormick relaxation is applied to linearized the product of continuous variables)
4th is the initial feasible solution
5th is the result of bounds improvement
I am trying to reproduce the results.
I am having issues.
I don't know how to provide initial solution to cplex particularly in this case and also how to add a constraint that x has to be between bounds provided in the iteration.
following is the code.
I will be thankful if you can help
float l1 = ...;
float l2 = ...;
float l3 = ...;
float u1 = ...;
float u2 = ...;
float u3 =...;
float zf = 967.5207101;
dvar float x1;
dvar float x2;
dvar float x3;
dvar float w11;
dvar float w22;
dvar float w33;
dvar float w12;
dvar float w13;
minimize
x1;
subject to{
1000- w11 - 2*w22 - w33 - w12 - w13 <= zf;
8*x1 +14*x2 +7*x3 == 56;
w11 + w22 + w33 == 25;
w11 >= - u1*u1 + 2*u1*x1;
w11 >= - l1*l1 + 2*l1*x1;
w11 <= - u1*l1 + 5*x1 + l1*x1;
w22 >= - u2*u2 + 2*u2*x2;
w22 >= - l2*l2 + 2*l2*x2;
w22 <= - u2*l2 + 4*x2 + l2*x2;
w33 >= - u3*u3 + 2*u3*x3;
w33 >= -l3*l3 + 2*l3*x3;
w33 <= - u3*l3 + 5*x3 + l3*x3;
w12 >= - u1*u2 + u2*x1 + u1*x2;
w12 >= - l1*l2 + l2*x1 + l1*x2;
w12 <= - u1*l2 + l2*x1 + u1*x2;
w12 <= - l1*u2 + u2*x1 + l1*x2;
w13 >= - u1*u3 + u3*x1 + u1*x3;
w13 >= - l1*l3 + l3*x1 + l1*x3;
w13 <= - u1*l3 + l3*x1 + u1*x3;
w13 <= - l1*u3 + u3*x1 + l1*x3;
x1 >= l1;
x2 >= l2;
x3 >= l3;
x1 <= u1;
x2 <= u2;
x3 <= u3;
}
main {
thisOplModel.generate();
var produce = thisOplModel;
var L1 = produce.l1;
var tol = 0.0001;
var xl1iter = 0;
while (1){
xl1iter = L1;
writeln("Solve with L1 = ",L1);
if ( cplex.solve() ) {
xl1iter = cplex.getObjValue();
writeln();
writeln("OBJECTIVE: ",xl1iter);
}
else {
writeln("No Sloution");
break;
}
if ((Opl.abs(L1 - xl1iter)) < tol) break;
L1 = xl1iter;
}
}
------------------------------
Tooba Binte Asif
------------------------------
#DecisionOptimization