Skip to main content

Multiobjective with MLinExpr

Answered

Comments

3 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?.
  • Richard Oberdieck
    Gurobi Staff Gurobi Staff

    Hi,

    thank you for bringing this to our attention. I was able to reproduce this problem with the following code snippet:

    import gurobipy as gp
    model = gp.Model()
    x = model.addMVar(5)
    y = model.addVar()

    # This works
    model.setObjectiveN(y,0)
    model.setObjectiveN(y,1)

    # This does not work
    model.setObjectiveN(x[0],0)
    model.setObjectiveN(y,1)

    # This does not work
    model.setObjectiveN(y,0)
    model.setObjectiveN(x[0],1

    We'll have a look at it internally. Was this also your experience?

    Thanks

    Richard

    0
  • Justin Luke
    Gurobi-versary
    First Question
    First Comment

    Hi Richard,

    Yes, that is!  Thank you and the team for looking into this.  Looking forward to a fix.

    0

Post is closed for comments.