Warm starting an optimization solve Topic is solved

Problems with modeling
Post Reply
scouser_s
User
User
Posts: 8
Joined: 4 years ago

Warm starting an optimization solve

Post by scouser_s »

I have an LP problem that I am solving using cplex solver with no issues and the results are making sense. Then, I derived the KKT conditions for the LP problem and solved it using MCP solver. However, the solutions obtained are not the same, although it should be the same if the KKT conditions are correct. To verify that the KKT conditions are not resulting into multiple optima, I want to warm-start the KKT solve with solutions obtained from the LP. My question is how do I achieve that in the code.

For example, if I obtain one of the decision variable values as follows, how do I instruct the solver to warm start with these values when solving KKT conditions?

Code: Select all

          1          2       3
x(t)     1.00       2.00    3.00;
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Warm starting an optimization solve

Post by Renger »

Hi

If you run the models in the same file, it will use the solution of the previous solve. If you want to be sure, you save the results of the first solve and use them to initialize the variables for the second solve.
Furthermore, if you set the iteration limit to zero (option iterlim = 0), you will see which equation is infeasible helping you do see if your equations are correct. Search for the equation listing and infeasibilities.
E.g.

Code: Select all

solve mymodel;
mysolution(t) = X.L(t);

X.L(t) = mysolution(t);
solve second model;

Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Post Reply