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

Does modification on presolved model affect original model?

回答済み

コメント

4件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Elisabeth Rodríguez Heck
    • Gurobi Staff

    Hi Liu,

    If you optimize p, this will not affect the original model object m. 

    Concerning the modification of variable bounds on p, this also does not affect the original model object m. However, please note that the variables in the presolved model p do in general not match the variables in the original model m, so a modification of the bounds in p might not directly translate to a modification of the bounds in m. 

    The article How does presolve work? explains this in detail.

    Best regards,

    Elisabeth

    0
  • liu heng
    • Gurobi-versary
    • Conversationalist
    • Investigator

    Thanks a lot! Can I just assume that when I call p = m.presolve(), then p and m are independent, modifications on either model will not affect the other?

    0
  • Elisabeth Rodríguez Heck
    • Gurobi Staff

    Yes, p and m are independent objects, so modifying one will not affect the other.

    Best,

    Elisabeth

    0

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