Originally posted by: SystemAdmin
Hi,
I'm trying to add a mip start to a problem that does not have a solution after 1 hour solving when numbers of rows and columns are too big.
My "addMIPStart" method works, except in rare cases when calling IloCplex.addMIPStart(IloNumVar
], double[) throws following exception.
java.lang.NullPointerException
at ilog.cplex.CpxNumVar.getVarIndexValue(CpxNumVar.java:268)
at ilog.cplex.CplexI.addMIPStart(CplexI.java:2779)
at ilog.cplex.IloCplex.addMIPStart(IloCplex.java:6845)
at ilog.cplex.IloCplex.addMIPStart(IloCplex.java:6855)
at ilog.cplex.IloCplex.addMIPStart(IloCplex.java:6879)
at myClass...
after commenting/uncommenting some parts of my code I found the vars that where implied in this exception, but I still do not understand what is the problem :
-
All the vars I instantiate with the addMIPStart where created with the IloCplex object I use
-
None are null (I check every var just before adding them to the IloNumVar[])
-
Values are valid
I can prevent the exception to be thrown if I add a constraint IloCplex.addGe(myVar, 0) for each var I need to instantiate, knowing that every var in my problem are IloCplex.intVar(0,1) or IloCplex.intVar(0, Integer.MAX_VALUE). If I do that, the problem is solved and my MIP Start is a feasible solution.
Can someone explain me what is my problem ?
Thanks,
Frédéric
#CPLEXOptimizers#DecisionOptimization