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

Minimization Constraint not working

回答済み

コメント

3件のコメント

  • 正式なコメント
    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.
  • Riley Clement
    • Gurobi Staff

    Hi Peirong,

    This may simply be a case of needing to call m.update() to update the model.

    However please note that the display() function is now deprecated and undocumented and we recommend that you do not use it.  The preferred way of inspecting a model is to write it to a LP file and then use a text editor to inspect the file.

    If you write it to a LP file and still encounter an obstacle then please let us know.

    - Riley

     

    0
  • Slade
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Riley,

    Really Appreciate your valuable suggestion. I believe the m.display() cause me the problem. Now with 

    m.write("myModel.lp")

    I can see the constraint 2 in the .lp file.

    General Constraints
     constraint2_1_1: f[2,1] = MIN ( n[1,1] , a[2,1] , 20 )

    Thank you!

    -Slade

    0

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