m.getVars()[h].BranchPriority = 9
However, I got this error message:
m.getVars()[h].BranchPriority = 9
TypeError: list indices must be integers, not list.
So, if anyone can help me, how can I set branch priority on a variable?
Thank you so much,
Zuhal
h = []
for i in N:
h.append(m.addVar(vtype=GRB.BINARY, name="h%s"))
And I want to give branch priority on my "h" variable which can be done in CPLEX like:
m.setPriorityOrder(h,1,"UP")
Is there any way that I can make the same thing in GUROBI as well?
Regards,
Zuhal