The bounds of the variables
AnsweredI have a model where I define three variables as follows :
alpha[a] = model.addVar(lb=-GRB.INFINITY, name="alpha%d" % a)
beta[i, j] = model.addVar(lb=-GRB.INFINITY, ub=0, name="beta%d,%d," % (i, j))
lamda = model.addVar(lb=0, ub=GRB.INFINITY, name="lamda")
after creating the model in the model.lp file, the variables define as follows:
alpha free
-infinity <= beta <= 0
but I can't find lamda which is supposed to be ???
lamda >= 0
where the objective function is to maximize the sum of these three variables ??
Thanks
0
-
Official comment
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?. -
The default variable bound are \([0,\infty]\). If a variable is continuous and has default bounds (as is the case for \(\lambda\)), you will not find it in the bounds section of a Gurobi LP file.
Best regards,
Jaromił0
Post is closed for comments.
Comments
2 comments