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

How to add m.ModelSense for multiobjective optimization?

回答済み

コメント

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.
  • Simon Bowly
    • Gurobi Staff

    Hi Tanmoy,

    As noted in Specifying Multiple Objectives, a multiobjective model has only one sense. Negating the objective will certainly do the job, but a better alternative is to use weights. If obj1 is to be maximized, obj2 is to be minimized, and you set

    m.ModelSense = GRB.MINIMIZE

    then you should set weight=-1 when you apply obj1 using setObjectiveN.

    1
  • Tanmoy Das
    • Gurobi-versary
    • Investigator
    • Collaborator

    thank you. I applied your suggestion to the model.

    0

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