Originally posted by: luis infante
my problem is of maximization
IloExpr fo (env);
for(int i=0; i<n; i++)
for(int k=0; k<K; k++)
fo+=*X[i][k];
CPP->add(IloMaximize(env, fo));
the array X is a binary variable but is relaxed
for(int i=0;i<n;i++)
for(int k=0;k<K;k++)
CPP->add(IloConversion(env,X[i][k],IloNumVar::Float));
CPP is the model to solve
the log of screen :
Iteration log . . .
Iteration: 1 Objective = 997.700262
Iteration: 846 Objective = 903.820717
Iteration: 1406 Objective = 878.049861
Iteration: 1692 Objective = 875.595494
Iteration: 1963 Objective = 872.527535
Iteration: 2242 Objective = 870.686760
Iteration: 2499 Objective = 868.845984
Iteration: 2761 Objective = 865.778025
Iteration: 3063 Objective = 860.869291
Iteration: 3367 Objective = 860.869291
Perturbation started.
Iteration: 3501 Objective = 860.869291
Iteration: 3640 Objective = 860.869139
Iteration: 3772 Objective = 860.868947
Iteration: 3913 Objective = 860.867992
Iteration: 4053 Objective = 860.865827
additionally I stop the solve with the parameter :
cplex->setParam(IloCplex::ItLim,iter);
I get the result for example evey 1000 iterations,
I think that the results of a iteration is a factible solution as an simplex algorithm
the parameters of the cplex are the defaults to solve, (with exception of the memory parameters)
thank for the help
#CPLEXOptimizers#DecisionOptimization