Calculation time

36 views
Skip to first unread message

tina

unread,
Jan 4, 2015, 5:52:49 AM1/4/15
to yal...@googlegroups.com
Hallo Johan,

I use now linear programming to solve my MPC problem. When I make the stepsize shorter (from 25m to 15m). The calculation time for some steps increases dramatically.(e.g. from 0.03s to 45s) But not all the steps are calculated so long. What' s the reason? Otherwise when I use the nonlinear solver the calculation time for many steps are also very long as more than 40s. Is it reasonable? Thank you very much!

Tina

tina

unread,
Jan 4, 2015, 6:32:22 AM1/4/15
to yal...@googlegroups.com
When I change the linear programming to quadratic programming, namely the optimal objective as square of the old linear objective, the calculation time becomes right.(ca. 0.03s for every step) What is the reason? Thanks!

Tina

Johan Löfberg

unread,
Jan 4, 2015, 9:53:15 AM1/4/15
to yal...@googlegroups.com
My guess (as you don't supply any reproducible code or output) is that the model gets numerically ill-conditioned and the quadratic objective is seen as non-convex due to numerical cancellations etc, and the solver is switched from, e.g., mosek to a general nonlinear solver.

tina

unread,
Jan 5, 2015, 8:38:58 AM1/5/15
to yal...@googlegroups.com
Johan,

Thank you very much!
Reply all
Reply to author
Forward
0 new messages