Skip to main content

Multiobjective with MLinExpr

Answered

Comments

2 comments

  • 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
  • None jthluke
    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

Please sign in to leave a comment.