Need a specific format of decision variable i.e. <gurobi.Var C0> instead of <gurobi.Var *Awaiting Model Update*> when I iterate over loop.? any idea how to get this.? I need this format to use specific package of neural network.
AnsweredIn-order to get this format :
But still I am getting the output as :
[<gurobi.Var *Awaiting Model Update*>,
<gurobi.Var *Awaiting Model Update*>,
<gurobi.Var *Awaiting Model Update*>,
<gurobi.Var *Awaiting Model Update*>, <gurobi.Var *Awaiting Model Update*>,
-
Hi Vigneshwar,
Model modification in Gurobi is performed in a lazy fashion, meaning that the modifications don't affect the model immediately. Instead, they are queued and are applied later, with the calls to model.update(), model.optimize() or model.write() methods.
To access a variable attribute immediately after adding the variable to the model, please execute the model.update() method before accessing the variables.
You can read more about Gurobi's lazy update approach here.
Best regards,
Simran
1
Please sign in to leave a comment.
Comments
1 comment