Skip to main content

Modification of the objective function at each iteration. Is there a better way to formulate a MPC problem??

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Daniel Espinoza

    Hi,

    I think you need to give more information.... mow many problems are you solving? how long does each one takes? Are you certain that you can not solve the problem in one go? Do you have any (Gurobi) logs? what are the termination conditions for the solver?

    Daniel

    0
  • Giusi Buttitta
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Daniel,

     

    Thank you for your reply. 

    I'm sorry but I didn't write that I'm trying to formulate an MPC problem. In this case, the very first time slot of the result of the optimisation problem solved in the Control Horizon is then used as the initial condition to solve the optimisation problem in the next iteration. That's why I cannot solve the problem in one go but I need multiple iterations. 

    I don't have ant Gurobi logs but I run the simulation again to produce one as soon as possible so that I can post it here.

     

    0
  • Greg Droge
    • Gurobi-versary
    • First Comment

    I have a similar problem in that I am solving a Model Predictive Control problem and need to repeatedly solve a problem which is very similar. I am using the Matlab interface (https://www.gurobi.com/documentation/9.0/refman/matlab_api_overview.html#matlab:problem) where my Q and A matrices are the same at each time instant, but my c and b matrices change every time I solve the problem. I am transitioning from using osqp as osqp does not allow for mixed-integer constraints. One feature in osqp that I am looking for is that, in osqp, you can create the problem once and update the matrices at each iteration. This allows osqp to do a great deal of the pre-optimization configuration once, speeding up the optimization at subsequent calls.

    0

Post is closed for comments.