Skip to main content

Balancing penalty weights when relaxing constraints

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff 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 why not try our AI Gurobot?.
  • Greg Glockner
    Gurobi Staff Gurobi Staff

    This sounds like a good candidate for hierarchical objectives - see https://www.gurobi.com/documentation/8.1/refman/multiple_objectives.html .

    0
  • Alan Atkinson
    Gurobi-versary
    First Question
    First Comment

    And that's how I modeled it the second go around.

    The bit I don't quite get though - and I'm sure I'm missing something obvious - is whether the difference in the size of the calculated objective functions matters. 

    So if I have two objectives a and b. a maxes at 10^3 and b maxes at 10^6 (say) how do I say a is 2x the weight (importance) of b?

    Would it be 2.0 or 2*10^6/10^3?

    And if the second of the two how would I pull these numbers to set the weights.

    It's something that's not well covered in the docs (imo). Or if it is I'm clearly not getting it...

     

    0
  • Greg Glockner
    Gurobi Staff Gurobi Staff

    With a hierarchical objectives (priorities), Gurobi solves the model with the highest priority objective, then fixes that as a constraint and solves the model with the next priority objective, etc. At each step, it uses warm start information.

    With this, don't put a large weight on any objective; keep the magnitude reasonable.

    The objective constraints need not be strict; you can give a bit of tolerance when they become constraints.

    This should do exactly what you want.

    0

Post is closed for comments.