cherrywoods
cherrywoods

Reputation: 1361

Gurobi MVar: Accessing Attributes always throws a GurobiError

I am trying to use Gurobi's MVar class.

import gurobipy as gp

m = gp.Model()
v = m.addMVar((10,))
v.lb  # raises GurobiError, index out of range...

Upvotes: 0

Views: 119

Answers (1)

cherrywoods
cherrywoods

Reputation: 1361

Call

m.update()

before accessing lb.

Upvotes: 1

Related Questions