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

Minimization Constraint not working

回答済み

コメント

2件のコメント

  • 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

サインインしてコメントを残してください。