Change variable type?Answered
I want to relax the integrality constraint on the variable. What I mean that I want to change variable type from integer to continuous type?
How can I do this in Gurobi?
Thank you in advance.
Thank a lot. I got an error such as Cannot invoke set(GRB.CharAttr, char) on the array type GRBVar.
Since my object is GRBVar. How will I make for array type GRBVar?
Thank you in advance0
for (Map.Entry<String, GRBVar> varEntry : DecVariables.entrySet()) //IloIntVar
varEntry.getValue(). set(GRB.CharAttr.VType, GRB.CONTINUOUS); // The error message: Cannot invoke set(GRB.CharAttr, char) on the array type GRBVar0
You have to loop over the array and set the VType attribute for each GRBVar element individually.
Please sign in to leave a comment.