Originally posted by: SystemAdmin
Thanks Thomas,
to implemet your suggestion I am trying following thing
if ( subcplex.solve() )
{
System.out.println("objective = " + subcplex.getObjValue());
}
for(int q=0;q<arc_selected.length;q++)
{
System.out.println("Arc is::::::::::arc selected::"+subcplex.getValue(arc_selected[q]));
double i = subcplex.getValue(arc_selected[q]);
arc_selected[q].setLB(i);
arc_selected[q].setUB(i);
}
subcplex.setParam(IloCplex.IntParam.PopulateLim, 10);
subcplex.setParam(IloCplex.IntParam.SolnPoolIntensity, 4);
subcplex.setParam(IloCplex.IntParam.SolnPoolReplace, 1);
subcplex.setParam(IloCplex.IntParam.SolnPoolCapacity , 1000);
subcplex.setParam(IloCplex.DoubleParam.SolnPoolGap, 1000000000);
subcplex.setParam(IloCplex.DoubleParam.SolnPoolAGap, 1);
if ( subcplex.populate() )
{
System.out.println();
System.out.println("knapsack solved");
numsol = subcplex.getSolnPoolNsolns();
System.out.println("The solution pool contains " + numsol + " solutions.");
}
where arc_selected[] is Boolean variable.
But it throws an exception , it seems i can not add the constraints to the solved model.
Please suggest a way out,
Also i would like to know if can fix the search for linear variable upto maximum two points of decimal.
Reagrds
Arun LIla
#CPLEXOptimizers#DecisionOptimization