Set the Priority of Variables
AnsweredHi there,
In CPLEX we have the capability to set the priority order for the variable var to pri in the format below:
public void setPriority(IloNumVar var, IloNum pri)
Does Gurobi have this option as well? I looked for it in several resources but could not find anything relevant.
Thanks,
Masoud
0
-
Hi Masoud,
Yes, you can use the integer-valued BranchPriority variable attribute to set a branching priority for each variable. For example, in Gurobi C++ API, you can use the GRBVar::set(GRB_IntAttr_BranchPriority, int) method.
A priority ordering file (ORD format) can also be read in by Gurobi to input a set of variable priority orders.
Best regards,
Maliheh
0
Please sign in to leave a comment.
Comments
1 comment