The first attachment is the algorithm
second and third is the problem (McCormick relaxation is applied to the original problem to linearize the product of continuous variables)
third is the feasible solution and tolerance is 0.0001
fourth is the result of algorithm 1 given in the paper
I am trying to implement this algorithm on the same attached problem but I can only apply on one variable at a time and moreover it's not giving the same results. Like for the upper bound of x2, it improves the bounds to 2.5 but then stops.
Also, I don't understand how to provide the complex with the given initial solution, particularly in this problem.
I will be thank full if you can help.
following is the code I am using
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;
maximize
x2;
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 U2 = produce.u2;
var tol = 0.0001;
var xu2iter = 0;
while (1){
xu2iter = U2;
writeln("Solve with U2 = ",U2);
if ( cplex.solve() ) {
xu2iter = cplex.getObjValue();
writeln();
writeln("OBJECTIVE: ",xu2iter);
}
else {
writeln("No Sloution");
break;
}
if ((Opl.abs(U2 - xu2iter)) < tol) break;
U2 = xu2iter;
}
}
------------------------------
Tooba Binte Asif
------------------------------
#DecisionOptimization