Skip to main content

How to add m.ModelSense for multiobjective optimization?

Answered

Comments

2 comments

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

Please sign in to leave a comment.