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

Why Objective must be liearn for multi-objective model in Gurobi ?

回答済み

コメント

3件のコメント

  • 正式なコメント
    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 why not try our AI Gurobot?.
  • Silke Horn
    • Gurobi Staff

    Hi Laaziz,

    For multi-objective models, all objectives must be linear, but you should be able to work around this by linearizing the non-linear term. E.g. if your objective contains the term x*y, add a new variable z and replace x*y by z in the objective. Then add an additional constraint x*y == z. Note that this must be a constraint in the model, not a Python assignment. E.g.

    model.addConstr(x*y == z)
    0
  • Laaziz Lahlou
    • Gurobi-versary
    • Curious
    • Conversationalist

    Hi Horn,

    Surprisingly, it works without the linearization method I had to use.

    Thanks

    Laaziz

    0

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