Skip to main content

Removing an objective or getting dual variables with multiple objectives

Answered

Comments

2 comments

  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi Francois,

    To return back to a single-objective optimization you need to set model.NumObj=0, call model.update(), and then reset the primary objective function (model.setObjective).

    You can also query the current optimization mode using IsMultiObj

    I hope that helps.

    Cheers,
    Matthias

    0
  • francois lamothe
    Gurobi-versary
    First Comment
    First Question

    Thanks it seems to work!

    0

Please sign in to leave a comment.