メインコンテンツへスキップ

Model Refinement

回答済み

コメント

2件のコメント

  • 正式なコメント
    Simranjit Kaur
    • 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?.
  • Jaromił Najman
    • Gurobi Staff

    Hi,

    You don't have to remove all constraints each time you compute new values for your dynamic variables in the model, see here. You can just remove the ones that actually change completely or are not present or simply change the coefficients only.

    With that you can add constraints which are valid for all or only a subset of trading periods and remove/leave/add them accordingly.

    It seems like you are often just changing the coefficients of your constraints. For that, it is recommended to use the chgCoeff() function instead of reconstructing the constraints from scratch.

    I also see that you call m.reset(0) and I am not sure if this is necessary in your case. It is possible that the solution of the previous optimization may provide a good warm start solution for the solver and speed up the optimization process.

    I hope the above could help.

    Best regards,
    Jaromił

    0

投稿コメントは受け付けていません。