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

LP Problem Formulation

回答済み

コメント

5件のコメント

  • 正式なコメント
    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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jonasz Staszek
    • Community Moderator
    • Gurobi-versary
    • Thought Leader
    • First Question

    Dear Mohamad,

    I believe these resources (here and here) should be of help to you.

    Best regards
    Jonasz

    1
  • Mohamad Abouras
    • Gurobi-versary
    • Conversationalist
    • First Question

    Dear Jonasz,
    thank you for the resources, they helped a lot!

    Would you mind taking a look at a small code snippet just to make sure that I am going in the right direction?

    Structure 

    - Is this the correct way of defining the objective function?

    Some of the constraints:



    - Does the way I am formulating the constraints make sense? I am trying to make constrains redundant in case they should be ignored.

    Best regards

     

     

    0
  • Jonasz Staszek
    • Community Moderator
    • Gurobi-versary
    • Thought Leader
    • First Question

    I can't see any obvious red flags from afar. In the future, we will be better able to help you if you paste your code (and format it as such) in the post, rather than pasting a screenshot.

    To assess the constraints, you can also write the model to a file using

    m.write("model.lp")

    and then study the file to check whether the constraints look they way you wish.

    Best regards
    Jonasz

    1
  • Mohamad Abouras
    • Gurobi-versary
    • Conversationalist
    • First Question

    Sorry for the late replay.

    The idea with the .lp file is really amazing, and it helped a lot.

    Thank you very much!

    Best Regards 
    Mohamad

    0

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