Questions Tagged With cplexhttp://www.or-exchange.com/tags/cplex/?type=rssquestions tagged <span class="tag">cplex</span>enSat, 21 Apr 2018 11:35:41 -0400CPLEX column generation example in Java - compilation errorhttp://www.or-exchange.com/questions/15587/cplex-column-generation-example-in-java-compilation-error<p>I am trying to compile the column generation example cutstock.java that comes along the IBM ILOG technology. The code is available here:</p>
<pre><code><a href="https://www.ibm.com/support/knowledgecenter/SSSA5P_12.6.1/ilog.odms.ide.help/examples/html/opl_interfaces/java/cutstock/src/cutstock/Cutstock.java.html">https://www.ibm.com/support/knowledgecenter/SSSA5P_12.6.1/ilog.odms.ide.help/examples/html/opl_interfaces/java/cutstock/src/cutstock/Cutstock.java.html</a>
</code></pre>
<p>In my installation, all sources of this example are in directory</p>
<pre><code>/opt/ibm/ILOG/CPLEX_Studio1251/opl/examples/opl_interfaces/java/cutstock
</code></pre>
<p>I copy the entire directory with the source files to my working directory and use the following command to compile it: </p>
<pre><code>javac -cp /opt/ibm/ILOG/CPLEX_Studio1251/cplex/lib/cplex.jar:/opt/ibm/ILOG/CPLEX_Studio1251/opl/lib/oplall.jar:. src/cutstock/Cutstock.java -d bin/ -Xdiags:verbose
</code></pre>
<p>I get the following error messages:</p>
<pre><code>rc/cutstock/Cutstock.java:85: error: method getDual in class IloCplex cannot be applied to given types;
duals.set(i, masterCplex.getDual(forAll));
^
required: IloRange
found: IloForAllRange
reason: argument mismatch; IloForAllRange cannot be converted to IloRange
src/cutstock/Cutstock.java:105: error: cannot find symbol
IloIntMap newFill = masterCplex.intMap(items);
^
symbol: method intMap(IloIntRange)
location: variable masterCplex of type IloCplex
2 errors
</code></pre>
<p>I haven't made any changes in the example, so I expected it to work normally. I am new to the Concert technology and would like to learn how to develop a column generation procedure. Can anyone please suggest how to fix these errors and successfully compile the code?</p>MarikaSat, 21 Apr 2018 11:35:41 -0400http://www.or-exchange.com/questions/15587/cplex-column-generation-example-in-java-compilation-errorconcert-technologycolumn-generationcplexHow to use "addMIPStart() "http://www.or-exchange.com/questions/15564/how-to-use-addmipstart<p>Hello everyone!</p>
<p>I have two variables in my MIP modle, <code>x[i][j] ∈ {0,1}, y[i] ∈ R</code> and I use C++ to work with Cplex. </p>
<p>I have obtained the values of the two variables using a heuristic algorithm now, and I want to pass these values to CPLEX as start solution using these values. </p>
<p>I using <code>addMIPStart()</code> method for this. After reading the related problem <a href="https://www.or-exchange.org/questions/8191/addmipstart-problem">https://www.or-exchange.org/questions/8191/addmipstart-problem</a>, I learn about some information -- but there still some errors.</p>
<p>My approach is as:</p>
<p>I defined </p>
<pre><code>IloIntArray tstart(env);
IloIntArray2 xstart(env);
IloIntArray xstartyiwei(env); // Turn 2D xstart to 1D xstartyiwei
</code></pre>
<p>and similarly </p>
<pre><code>IIloArray<iloboolvararray> X(env, TotalNode);
IloNumVarArray Xyiwei(env, TotalNodeTotalNode, 0, 1) // Turn 2D X to 1D Xyiwei
IloIntVarArray t(env, TotalNode, 0, Tteam);
</code></pre>
<p>and also defined memory for both of these arrays.</p>
<p>Then I stored the values of <code>x[i][j]</code>, <code>y[i]</code> in <code>xstart(env)</code>, <code>tstart(env)</code> </p>
<p>Now I am calling <code>addMipStart</code> as follows: </p>
<pre><code>cplex.exportModel("model.lp");
IloNumVarArray startVar(env);
IloNumArray startVal(env);
for (int i = 0; i < TotalNode*TotalNode; i++) {
startVar.add(Xyiwei[i]);
startVal.add(xstartyiwei[i]);
}
for (int i = 0; i < TotalNode; i++) {
startVar.add(t[i]);
startVal.add(tstart[i]);
}
IloCplex::MIPStartEffort effort = IloCplex::MIPStartEffort::MIPStartAuto;
cplex.addMIPStart(startVar, startVal, effort, "startsolusion.mst");
cplex.readMIPStarts("startsolusion.mst");
cplex.solve();
startVal.end();
startVar.end();
</code></pre>
<p>When it turns to the statement</p>
<pre><code>cplex.addMIPStart(startVar, startVal, effort, "startsolusion.mst")
</code></pre>
<p>it gives me the error <code>Error: IloExtractable 1 IloNumVarI has not been extracted by IloAlgorithm 0000028CD910E0D0</code>.</p>
<p>But if I comment out the follow statement：</p>
<pre><code>for (int i = 0; i < TotalNode*TotalNode; i++) {
startVar.add(Xyiwei[i]);
startVal.add(xstartyiwei[i]);
}
</code></pre>
<p>there is no error <code>Error: IloExtractable 1 IloNumVarI has not been extracted by IloAlgorithm 0000028CD910E0D0</code>. However, another error will be when it turns to the statement:</p>
<pre><code>cplex.readMIPStarts("startsolusion.mst");"
</code></pre>
<p>Actually, there is not a <code>startsolusion.mst</code> file accur after the ststement</p>
<pre><code>cplex.addMIPStart(startVar, startVal, effort, "startsolusion.mst");
</code></pre>
<p>So,I think the last two parameters <code>effort</code> and <code>startsolusion.mst</code> in</p>
<pre><code>cplex.addMIPStart(startVar, startVal, effort, "startsolusion.mst");
</code></pre>
<p>are not true.</p>
<p>My English is poor, please bear with me.</p>
<p>I have two questions:</p>
<ol>
<li>
<p>Why when I use <code>cplex.addMIPStart()</code> to pass the 2D variable <code>x[i][j]</code> the error <code>Error: IloExtractable 1 IloNumVarI has not been extracted by IloAlgorithm 0000028CD910E0D0</code> appears, but it won't appear if there is only pass to the variable <code>y[i]</code>? Is it related to variable type or to variable dimension? I have turned 2D to 1D before.</p>
</li>
<li>
<p>How to set the last two parameters in the <code>cplex.addMIPStart()</code>? Can the <code>cplex.addMIPStart</code> generate a <code>.mst</code> file through the last parameter?</p>
</li>
</ol>
<p>I am a new learner in this area, and I can find more information about this problems,I will be greatful if you can help me. </p>JunMon, 16 Apr 2018 23:16:42 -0400http://www.or-exchange.com/questions/15564/how-to-use-addmipstartcplexCannot obtain the results from the hub location literature using CPLEXhttp://www.or-exchange.com/questions/15443/cannot-obtain-the-results-from-the-hub-location-literature-using-cplex<p>I have wrote the .mod file for the Single Allocation Hub Location Problem, following the mathematical program given in this paper: </p>
<blockquote>
<p>Skorin-Kapov D, Skorin-Kapov J,
O'Kelly M (1996) Tight linear
programming relaxations of
uncapacitated p-hub median problems.
European Journal of Operational
Research 94 (1996) 582-593</p>
</blockquote>
<p>Somehow I can not obtain the results provided by the authors. I am doing something wrong, but I can not find out what I am doing wrong. </p>
<pre><code>// nodes
int n = ...;
range N = 0..n-1;
// direct-line transport cost
float directTransportCost[N][N] = ...;
// discount coefficient
float alpha = ...;
// demand
float w[N][N] = ...;
// transport cost
float c[i in N][j in N][k in N][m in N] =
directTransportCost[i][k] + alpha * directTransportCost[k][m] + directTransportCost[m][j];
// decision variables
dvar boolean z[N][N];
dvar float+ x[N][N][N][N];
// cost minimization objective
minimize
(sum(i in N, j in N, k in N, m in N) w[i][j] * c[i][j][k][m] * x[i][j][k][m]);
subject to {
// number of hubs
// ctNumberOfHubs:
sum(k in N) z[k][k] == 4; // Inconsistency is observed not only for 4 hubs, but for every given number of hubs
// single allocation
forall(i in N)
//ctSingleAllocation:
sum(k in N) z[i][k] == 1;
// allocation to hub
forall(i in N, k in N)
//ctAllocation2Hub:
z[i][k] <= z[k][k];
// allocation of flow from origin
forall(i in N, j in N, k in N)
//ctOriginFlowAllocation:
sum(m in N) x[i][j][k][m] == z[i][k];
// allocation of flow to destination
forall(i in N, j in N, m in N)
//ctDestinationFlowAllocation:
sum(k in N) x[i][j][k][m] == z[j][m];
}
</code></pre>DDChFri, 23 Feb 2018 19:46:12 -0500http://www.or-exchange.com/questions/15443/cannot-obtain-the-results-from-the-hub-location-literature-using-cplexoplhub-locationcplexHow to set conditional termination criterion for CPLEXhttp://www.or-exchange.com/questions/15379/how-to-set-conditional-termination-criterion-for-cplex<p>Dear all. I am using CPLEX engine solver in C# environment to solve a mixed integer program and I want to set a conditional termination criterion. For example, if computational time is less than 30 minutes, the model should be solved with relative_gap=0. However, if computational time is more than 30 minutes, I want that the model to be solved with relative_gap=5%. Can I know if it is possible and in case of possibility how?</p>
<p>Thanks</p>Amin-ShMon, 05 Feb 2018 02:55:51 -0500http://www.or-exchange.com/questions/15379/how-to-set-conditional-termination-criterion-for-cplexc#cplexMemory issues when running CPLEX vs. Gurobihttp://www.or-exchange.com/questions/15365/memory-issues-when-running-cplex-vs-gurobi<p>I'm solving a very large MILP using Gurobi -- I typically let it run for days without it proving the optimum. I recently switched to CPLEX because I wanted to try their new automated Benders feature. I was surprised however, that within a day or so, CPLEX runs out of memory (I haven't tried the Benders feature yet). This never happened when I tried solving the model with Gurobi (even after running it once for a week!). I understand from reading about memory issues with CPLEX that this is because the branch and bound tree has gotten very large. Still, I was rather surprised because I'm running this on a linux server with 240 GB RAM (24 threads, 10 GB/thread) and thought that would be sufficient, regardless.</p>
<p>Is there something that Gurobi does behind the scenes that takes care of this memory issue that I need (can?) turn on in CPLEX? I've seen suggestions to turn on the memory emphasis parameter, allowing CPLEX to store nodes in a temporary file on disk, reducing the number of threads, and setting the VarSel parameter to strong branching.</p>
<p>Has anyone used these approaches and have any recommendations? (Should I just go back to Gurobi?)</p>
<p>Thanks!</p>leruckleSat, 03 Feb 2018 09:42:08 -0500http://www.or-exchange.com/questions/15365/memory-issues-when-running-cplex-vs-gurobigurobicplexPython CPLEX API: Unloading Basis while reading problem from sav file with CPLEXhttp://www.or-exchange.com/questions/15295/python-cplex-api-unloading-basis-while-reading-problem-from-sav-file-with-cplex<p>Is there a way to read math model from SAV file but not load the basis? In my benders decomposition implementation the sub problem is taking too long. I guess this is because of the basis in the SAV file has the optimization algorithm begin from further away than from starting from clean slate, or the basis has some numerical issues. I could use LP file, but I like the speed in which SAV file read/write is possible. Is there a way to not load basis or remove basis after reading the model from SAV file?</p>
<p>The method I was experimenting was (when model is the cplex object that has the model read to):
model.start.set_basis([0 for i in model.variables.get_num()],[0 for i in model.linear_constraints.get_num()]) </p>
<p>That does not seem right because it is not equal to starting from clean slate. Anybody can help on this?</p>Naveen DivakaranThu, 18 Jan 2018 11:21:13 -0500http://www.or-exchange.com/questions/15295/python-cplex-api-unloading-basis-while-reading-problem-from-sav-file-with-cplexbasissavfilecplexProblem Type & Suitable Optimization Algorithm (without using CPLEX Tuning tool)http://www.or-exchange.com/questions/15290/problem-type-suitable-optimization-algorithm-without-using-cplex-tuning-tool<p>CPLEX comes with a good tool to do tuning that allows the modeler to set which algorithm to use for the problems of a certain structure/type. But outside of the tuning tool are there any rules of thumb or relationship between the kind of problems and the best algorithm suiting them and that too just for LPs with just continuous variables? I am talking about primal, primal devex, dual, dual steep1, dual steep2 etc..</p>
<p>I am observing that the subproblem in my implementation of Benders Decomposition performs faster with primal simplex method in the beginning few iterations, and then towards later iterations dual simplex performs better. All that is changing in the sub problem is the right hand side of a subset of constraints.</p>Naveen DivakaranThu, 18 Jan 2018 02:38:59 -0500http://www.or-exchange.com/questions/15290/problem-type-suitable-optimization-algorithm-without-using-cplex-tuning-toolbenders-decompositionbenderstuningcplexCplex scheduling unvailability period on flowshop problemhttp://www.or-exchange.com/questions/15186/cplex-scheduling-unvailability-period-on-flowshop-problem<p>Hello everybody, I am a Cplex beginner. Please i want to ask how can i, with Cplex, define an interval "IntCov" that cover a set of other intervals (the exact number of covered intervals is unknown) where their size is limited by a MaximumSize. I want to schedule an unavailability period after processing some tasks (the total processing time should not exceed MaximumSize. Any other suggestions are accepted. Thank you in advance.</p>wahibaTue, 05 Dec 2017 16:35:40 -0500http://www.or-exchange.com/questions/15186/cplex-scheduling-unvailability-period-on-flowshop-problemunvailabilityflowshopcplexheuristic callbackhttp://www.or-exchange.com/questions/15167/heuristic-callback<p>I am trying to code heuristic in branch&Cut code but, he can't modify the best integer solution in the main i put this instruction to call the heuristic "status = CPXsetheuristiccallbackfunc (env, mst_heuri, NULL);"
and this is the code of the heuristic :
static int CPXPUBLIC
mst_heuri (CPXCENVptr env,
void <em>cbdata,
int wherefrom,
void </em>cbhandle,
double <em>objval_p,
double </em>x,
int <em>checkfeas_p,
int </em>useraction_p)
{
int status = 0;</p>
<p>int i,j,i0,j0, qq, cols;
int nodecnt, kkk;
int a=0,b=0,u=0,v=0,n_mst,ne=1;
double min,mincost=0;
double ** cost;
double * p_cal =NULL;</p>
<p>double opt_remain, opt_int, opt_mst,roundobjval;
int <em>feas = NULL;
CPXCLPptr lp;
double </em>objcoefs = NULL;</p>
<p>int ** aretes_mst =NULL;
double * poids_mst =NULL;
double pp;</p>
<p>double optt = 0.0;</p>
<p>*useraction_p = CPX_CALLBACK_DEFAULT;
opt_mst=0;</p>
<p>/<em> Heuristic motivated by knapsack constrained problems.
Rounding down all fractional values will give an integer
solution that is feasible, since all constraints are <=
with positive coefficients </em>/
//printf("heuristique dans\n");
status = CPXgetcallbacklp (env, cbdata, wherefrom, &lp);
if ( status ) {
printf ("Can't get lp pointer.");
goto TERMINATE;
}</p>
<p>cols = CPXgetnumcols (env, lp);
if ( cols <= 0 ) {
printf ("numcols = %d. \n", cols);
status = CPXERR_CALLBACK;
goto TERMINATE;
}</p>
<p>aretes_mst = malloc ( nb_a * sizeof(int <em>) );
for (i0=0; i0 <nb_a ; i0++) aretes_mst[i0] = malloc ( 2 * sizeof(int) );
poids_mst = malloc ( nb_a * sizeof(double) );
for (i0=0; i0 <nb_a ; i0++){
aretes_mst[i0][0]=-1;
aretes_mst[i0][1]=-1;
poids_mst[i0]=-1;
} <br>
objcoefs = (double </em>) malloc (cols * sizeof (double));
feas = (int *) malloc (cols * sizeof (int));</p>
<p>parent = malloc ((nb_n+1) * sizeof (int));</p>
<p>cost = malloc ( (nb_n+1) * sizeof(double *) );
for (i=0; i <(nb_n+1) ; i++) cost[i] = malloc ( (nb_n+1) * sizeof(double) );
for (i=0; i <(nb_n+1) ; i++) parent[i]=0;</p>
<p>if ( feas == NULL ) {
printf ("Out of memory.");
status = CPXERR_CALLBACK;
goto TERMINATE;
} </p>
<p>status = CPXgetobj (env, lp, objcoefs, 0, cols-1);
if ( status ) {
printf ("Can't get objective.");
goto TERMINATE;
}</p>
<p>status = CPXgetcallbacknodeintfeas (env, cbdata, wherefrom, feas,
0, cols-1);</p>
<p>if ( status ) {
printf ("Can't get variable feasible status for node.");
goto TERMINATE;
}</p>
<pre><code>status = CPXgetcallbackinfo (env, cbdata, wherefrom,CPX_CALLBACK_INFO_NODE_COUNT, &nodecnt);
if ( status ) goto TERMINATE;
status = CPXgetcallbackinfo (env, cbdata, wherefrom,CPX_CALLBACK_INFO_BEST_REMAINING, &opt_remain);
if ( status ) goto TERMINATE;
//printf("OPT_REMAIN = %lf \n",opt_remain);
status = CPXgetcallbackinfo (env, cbdata, wherefrom,CPX_CALLBACK_INFO_BEST_INTEGER, &opt_int);
if ( status ) goto TERMINATE;
printf("OPT_INTEGER = %lf \n",opt_int);
j = 0;
bool entier = TRUE;
while(j < cols){
if(feas[j] == CPX_INTEGER_INFEASIBLE)
entier = FALSE,j = cols+1;
else j++;
}
/*******************************/
for (j = 0; j < cols; j++)
{ x[j]=arrondie (x[j]);
optt=optt+coeff[j]*x[j];
//if(j<nb_a)
//printf("***heur func X[%d] = %lf ************** \n",j, x[j]);
}
printf("optt heuris = %lf \n",optt);
/*******************************/
if(nodecnt == 0){
opt1=optt;
printf("opt1 heu = %lf \n",opt1);
if(premierefois){
opt0=optt;
printf("opt0 heu = %lf \n",opt0);
premierefois = FALSE;
}
}
roundobjval = *objval_p;
printf("objval_p AVANT = %lf \n",roundobjval);
if (entier == FALSE){
if(roundobjval < opt_int ){
</code></pre>
<p>//roundobjval = <em>objval_p;
/<strong><em>*</em></strong><strong><em>*</em></strong><strong><em>*</em></strong><strong><em>*</em></strong><strong>*</strong>/
n_mst=nb_n;
for(i=1;i<=n_mst;i++) cost[i][i]=INFI;
j=0;
while (j<nb_a){
cost[(table_graphe[j][0])][table_graphe[j][1]]= ((table_graphe_poids[j])</em> arrondie(1-x[j]));
cost[(table_graphe[j][1])][table_graphe[j][0]]= ((table_graphe_poids[j])* arrondie(1-x[j]));
j++;
}
// for(i=0;i<=cols;i++)printf("x(%d)= %lf \n",i,x[i]);
// for(i=1;i<=n_mst;i++){
// for(j=1;j<=n_mst;j++) printf("cost(%d,%d)= %d \t",i,j,cost[i][j]);
// printf("\n");
// }</p>
<p>kkk=0;
//printf("\nThe edges of Minimum Cost Spanning Tree are\n\n");
while(ne<n_mst)
{
for(i=1,min=INFI;i<=n_mst;i++)
{
for(j=1;j<=n_mst;j++)
{
if(cost[i][j]<min)
{
min=cost[i][j];
a=u=i;
b=v=j;
}
}
}
u=find(u);
v=find(v);</p>
<p>if(uni(u,v))
{
//printf("\n%d edge (%d,%d) =%d\n",ne++,a,b,min);
ne++;
mincost +=min;
aretes_mst[kkk][0]=a;
aretes_mst[kkk][1]=b;
// poids_mst[kkk]=x[indice_arete(a, b)]*table_graphe_poids[indice_arete(a, b)];
//printf("indice_arete(%d, %d) = %d \n",a,b, indice_arete(a, b));
poids_mst[kkk]=table_graphe_poids[indice_arete(a, b)];
kkk++;
}
cost[a][b]=cost[b][a]=INFI;
}
//printf("\n\tMST = %ld \n",mincost);
p_cal = malloc ( nb_n * sizeof(double) );
for (i0=0 ; i0 < nb_n ; i0++) p_cal[i0] = 0;
for (j0=0 ; j0 < kkk ; j0++){
if(poids_mst[j0] > p_cal[aretes_mst[j0][0]-1]) {pp=poids_mst[j0]; p_cal[aretes_mst[j0][0]-1]= pp;}</p>
<pre><code> if(poids_mst[j0] > p_cal[aretes_mst[j0][1]-1]) {pp=poids_mst[j0]; p_cal[aretes_mst[j0][1]-1]= pp;}
</code></pre>
<p>}
opt_mst=0;
for (i0=0 ; i0 < nb_n ; i0++) opt_mst=opt_mst+p_cal[i0];
pp=0;
for (j0=0 ; j0 < kkk ; j0++)pp=pp+poids_mst[j0];</p>
<p>printf("\n c(MST) = %lf \t MESNC(MST)= %lf \n",pp,opt_mst);
heuris++;
if(opt_mst < opt_int){
for (i0=0 ; i0 < cols ; i0++) x[i0] = 0;
for (i0=0 ; i0 < kkk ; i0++) x[indice_arete(aretes_mst[i0][0], aretes_mst[i0][1])]=1;
/<em>%%%%%%%%%%%%%%%%%%</em>/
j0=nb_a;
for (i0=0 ; i0 < nb_n ; i0++){
pp=0;
qq=j0;
while((pp+coeff[qq]) <= p_cal[i0]){
x[qq]=1;
pp=pp+coeff[qq];
qq++;
}
j0=j0+(nb_n-1);
}
/<em>%%%%%%%%%%%%%%%%%%</em>/
pp=0;
for (i0=0 ; i0 < cols ; i0++) pp=pp+objcoefs[i0]*x[i0];
//for (i0=0 ; i0 < nb_n ; i0++) x[i0+nb_a] = p_cal[i0];
//roundobjval=opt_mst;
roundobjval=pp;
heuris_eff++;</p>
<pre><code> *useraction_p = CPX_CALLBACK_SET;
//for (i0=0 ; i0 < cols ; i0++){printf("***heur func z[%d] = %lf ************** \n",i0, x[i0]);}
}
</code></pre>
<p>}</p>
<p>}
/<strong><em>*</em></strong><strong><em>*</em></strong><strong><em>*</em></strong><strong><em>*</em></strong><strong>*</strong>/
// for (j = 0; j < nb_a; j++) {</p>
<pre><code> // /* Set the fractional variable to zero and update
// the objective value */
// if ( feas[j] == CPX_INTEGER_INFEASIBLE ) {
// roundobjval -= x[j] * objcoefs[j];
// x[j] = 0.0;
// }
</code></pre>
<p>// }
<em>objval_p = roundobjval;
printf("objval_p APRES = %lf \n",roundobjval);
/</em> Have CPLEX check the solution for integer feasibility */</p>
<p>*checkfeas_p = 1;</p>
<p>/<em> Tell CPLEX that a solution is being returned </em>/</p>
<p>*useraction_p = CPX_CALLBACK_SET;</p>
<p>TERMINATE:
free_and_null ((char <strong>) &aretes_mst);
free_and_null ((char </strong>) &poids_mst);
free_and_null ((char <strong>) & p_cal);
free_and_null ((char </strong>) &cost);
free_and_null ((char <strong>) &parent);
free_and_null ((char </strong>) &objcoefs);
free_and_null ((char **) &feas); </p>
<p>return (status);</p>
<p>}</p>
<p>Please help me</p>SalsabilTue, 14 Nov 2017 10:33:11 -0500http://www.or-exchange.com/questions/15167/heuristic-callbackheuristicscplexSeveral Common Optimization Toolshttp://www.or-exchange.com/questions/15145/several-common-optimization-tools<p>Hi everyone, </p>
<p>I want to share my perspective and experience on optimization software that I learned since college. Please correct me if my opinion is wrong and any comment is welcomed. </p>
<p>Excel</p>
<p>Advantage: easy to demonstrate the result visually. Also everyone has Excel installed in their laptop.
Disadvantage: not very efficient in terms of modeling and solver performance when solving a large-scale (or even mid-scale) problem. Also Excel solver is based on branch-and-bound not branch-and-cut, the performance can be very poor when solving a Mixed-integer programming problem.</p>
<p>Good for business major students or introductory level OR class</p>
<p>AMPL/GAMS</p>
<p>Advantage: Algebraic language enables us to write the model simply like writing the math formulation directly. AMPL also provide script (I am sure GAMS has too but I've never used script in GAMS) for us to code some iterative algorithm such as Bender's decomposition, Lagrangian Relaxation, Column Generation. It's also possible to run batch data when testing the performance of algorithm or heuristic. Easy to do maintenance. </p>
<p>Disadvantage: Once AMPL pass the model and data to the solver such as CPLEX, users have no control on the solver. Aka no lower-level control on the solver. It is impossible to write branch-and-cut via AMPL since it requires to code separation problem at every node (interrupt the solving process) to determine the strongest cut.</p>
<p>However, AMPL enables users to specify "user cut" and it will report how many user cuts are added when terminated. The information is the total user cuts added, so we can't know how many cuts are added at what node. So far I have no ideas how AMPL select these user cuts to add. </p>
<p>C++/Java/Python (basic language) together with CPLEX, Gurobi</p>
<p>Advantage: allows you to have lower-level control on the solver and you have great flexibility on coding/testing any algorithm. This skill set is a must for every OR PhD student in my opinion.</p>
<p>Disadvantage: need to be familiar with those basic language first. </p>
<p>Recently, I am forced to use Lingo since the professor (Non-OR field) only knows Lingo. When I try to promote AMPL/GAMS to him, he claims that many companies are using Lingo, which I am very suspicious about it. Does anyone know the real situation about these optimization software market share?</p>leonard239Fri, 03 Nov 2017 00:57:16 -0400http://www.or-exchange.com/questions/15145/several-common-optimization-toolsoptimization-softwaregurobicplexamplCPLEX with AMPL OPL or C++http://www.or-exchange.com/questions/15142/cplex-with-ampl-opl-or-c<p>Dear Jean.
My name is Juan, I'm student in Brazil.
I would like to know if there is any difference in the CPLEX performance for a large scale model using OPL AMPL or C++.</p>Juan_Home_UNESPThu, 02 Nov 2017 20:40:52 -0400http://www.or-exchange.com/questions/15142/cplex-with-ampl-opl-or-ccplexSolving SOCP in CPLEX, cannot find solutionhttp://www.or-exchange.com/questions/15126/solving-socp-in-cplex-cannot-find-solution<p>Hi,</p>
<p>I am solving this SOCP problem with CPLEX. There should be solution in this problem. But cplex shows error:1217, No solution exists. Can anybody help me find out what's wrong?
Thanks.</p>
<p>Minimize</p>
<p>obj: 1.9 x1 + 0.3 x2 - 2.1 x3 + 0.3 x6 + 0.7 x7</p>
<p>Subject To</p>
<p>c1: - 2 x1 <= -5</p>
<p>c2: x1 - 2 x2 - x4 <= 1</p>
<p>c3: x1 - 2 x2 + x4 >= 1</p>
<p>c4: x1 + x3 - x5 <= 3</p>
<p>c5: x1 + x3 + x5 >= 3</p>
<p>q1: [ x4 ^2 - x6 ^2 ] <= 0</p>
<p>q2: [ x5 ^2 - x7 ^2 ] <= 0</p>
<p>Bounds</p>
<pre><code> x1 Free
x2 Free
x3 Free
</code></pre>
<p>Generals</p>
<p>x1 x2 x3 </p>
<p>End</p>newusernameMon, 30 Oct 2017 12:06:22 -0400http://www.or-exchange.com/questions/15126/solving-socp-in-cplex-cannot-find-solutionmixed-integer-programmingcplexsocpGetting non-optimal solutions with user cut and lazy constraint callbackhttp://www.or-exchange.com/questions/15082/getting-non-optimal-solutions-with-user-cut-and-lazy-constraint-callback<p>Hi all,</p>
<p>There is a set of constraints in my original integer program. When I solve the problem without them, most of the time they are not violated. Therefore I add them using the lazyconstraint callback and the results are fine (faster than solving the original ip). However when I use usercut callback together with the lazy, cplex reports non-optimal solutions as optimal.</p>
<p>Do you have any idea why it gives non-optimal solutions?</p>
<p>Thanks</p>crookshanks89Sat, 14 Oct 2017 11:41:20 -0400http://www.or-exchange.com/questions/15082/getting-non-optimal-solutions-with-user-cut-and-lazy-constraint-callbackuser-cutslazycplexnon-optimalHow to deal with Degeneracy in large LP Problem?http://www.or-exchange.com/questions/14989/how-to-deal-with-degeneracy-in-large-lp-problem<p>Hello All,</p>
<p>I am solving a problem with Reduced LP of the order 5879207 columns. I am using Barrier technique with Primal Crossover. Once the crossover has started, the problem goes into degeneracy and does not solve even in 1:30 hrs. How can I come out of degeneracy without getting stuck? The LP works fine for smaller problems (till 40 lakhs).
I tried solving with Primal Simplex as well as Dual Simplex, still no luck. I have 2 queries:
1. How can the situation of degeneracy avoided?
2. If degeneracy occurs, what is the efficient way to come out of it?
I am attaching the log below:</p>
<p>Presolve has eliminated 0 rows and 240 columns...
Presolve has eliminated 2060 rows and 2373257 columns...
Aggregator has done 6238 substitutions...
Presolve has eliminated 3636 rows and 2376413 columns...
Aggregator has done 7833 substitutions...
Presolve has eliminated 3637 rows and 2378521 columns...
Aggregator has done 7833 substitutions...
Tried aggregator 1 time.
LP Presolve eliminated 3637 rows and 2378522 columns.
Aggregator did 7833 substitutions.
Reduced LP has 6480 rows, 5879207 columns, and 72082857 nonzeros.
Presolve time = 44.44 sec.
Parallel mode: using up to 16 threads for barrier.
Number of nonzeros in lower triangle of A*A' = 2789007
Using Nested Dissection ordering
Total time for automatic ordering = 22.42 sec.
Summary statistics for Cholesky factor:
Threads = 16
Rows in Factor = 6480
Integer space required = 229199
Total non-zeros in factor = 8209350
Total FP ops to factor = 17092576332
Itn Primal Obj Dual Obj Prim Inf Upper Inf Dual Inf <br>
0 5.6255808e+010 -5.9923715e+009 7.07e+008 1.12e+008 1.21e+005
1 1.0458191e+010 -5.1199514e+009 1.31e+008 2.07e+007 2.82e+004
2 6.7986914e+009 -4.3465186e+009 8.54e+007 1.35e+007 1.39e+004
3 3.2217462e+009 -2.8256688e+009 4.05e+007 6.39e+006 5.06e+003
4 1.1757445e+009 -2.1914900e+009 1.48e+007 2.33e+006 2.90e+003
5 5.4961872e+008 -1.5970363e+009 6.89e+006 1.09e+006 1.88e+003
6 3.3649139e+008 -1.5294382e+009 4.22e+006 6.65e+005 1.73e+003
7 2.0003803e+008 -1.2896831e+009 2.50e+006 3.95e+005 1.38e+003
8 1.0744972e+008 -1.0319230e+009 1.34e+006 2.12e+005 1.00e+003
9 6.8903420e+007 -1.0003303e+009 8.60e+005 1.36e+005 9.61e+002
10 3.9705633e+007 -9.6695909e+008 4.94e+005 7.79e+004 9.20e+002
11 2.6207094e+007 -7.5573079e+008 3.25e+005 5.12e+004 6.47e+002
12 1.7789688e+007 -7.0949917e+008 2.19e+005 3.46e+004 5.87e+002
13 1.4564711e+007 -6.4530915e+008 1.79e+005 2.82e+004 4.87e+002
14 9.9028063e+006 -5.8613623e+008 1.20e+005 1.90e+004 4.27e+002
15 7.2657354e+006 -5.4808155e+008 8.73e+004 1.38e+004 3.74e+002
16 5.9410009e+006 -5.0340942e+008 7.06e+004 1.11e+004 3.06e+002
17 5.3573266e+006 -4.8247006e+008 6.32e+004 9.98e+003 2.77e+002
18 4.8459021e+006 -4.2343318e+008 5.69e+004 8.98e+003 2.24e+002
19 4.6760479e+006 -4.1426240e+008 5.47e+004 8.64e+003 2.11e+002
20 4.6661721e+006 -4.1208374e+008 5.46e+004 8.62e+003 2.07e+002
21 4.6193382e+006 -4.0577419e+008 5.40e+004 8.53e+003 1.98e+002
22 4.5324513e+006 -3.9989132e+008 5.29e+004 8.35e+003 1.92e+002
23 4.4589131e+006 -3.7976125e+008 5.20e+004 8.21e+003 1.72e+002
24 3.8351537e+006 -3.5288220e+008 4.42e+004 6.98e+003 1.47e+002
25 3.4940650e+006 -3.4541073e+008 4.00e+004 6.31e+003 1.39e+002
26 2.6387873e+006 -3.3056136e+008 2.94e+004 4.64e+003 1.27e+002
27 2.1543028e+006 -3.2480996e+008 2.33e+004 3.68e+003 1.21e+002
28 1.6537915e+006 -3.1459372e+008 1.71e+004 2.70e+003 1.14e+002
29 1.3286269e+006 -3.0183557e+008 1.32e+004 2.08e+003 1.06e+002
30 1.3147903e+006 -3.0148394e+008 1.30e+004 2.06e+003 1.06e+002
31 1.0737271e+006 -2.5588542e+008 1.02e+004 1.60e+003 8.31e+001
32 1.0031452e+006 -2.3833150e+008 9.28e+003 1.47e+003 7.03e+001
33 9.7764280e+005 -2.2341294e+008 8.96e+003 1.41e+003 5.90e+001
34 9.3342479e+005 -2.1441093e+008 8.41e+003 1.33e+003 5.16e+001
35 8.0623569e+005 -1.9603280e+008 6.85e+003 1.08e+003 4.13e+001
36 7.2113713e+005 -1.8604874e+008 5.80e+003 9.15e+002 3.53e+001
37 6.4279083e+005 -1.7817549e+008 4.82e+003 7.61e+002 3.09e+001
38 5.8421378e+005 -1.6704624e+008 4.12e+003 6.51e+002 2.66e+001
39 5.1383133e+005 -1.5118668e+008 3.30e+003 5.20e+002 2.13e+001
40 4.6667152e+005 -1.4635706e+008 2.71e+003 4.28e+002 1.94e+001
41 4.0973663e+005 -1.2437910e+008 2.04e+003 3.22e+002 1.31e+001
42 3.7158223e+005 -1.0359626e+008 1.59e+003 2.51e+002 8.78e+000
43 3.6074419e+005 -9.8098855e+007 1.42e+003 2.25e+002 7.77e+000
44 3.7665384e+005 -9.4401300e+007 1.13e+003 1.78e+002 7.19e+000
45 5.2071651e+005 -9.2167448e+007 1.03e+003 1.63e+002 6.71e+000
46 7.0554961e+005 -9.1081551e+007 9.42e+002 1.49e+002 6.48e+000
47 7.6908063e+005 -8.8547420e+007 9.19e+002 1.45e+002 6.01e+000
48 9.2480396e+005 -8.7899903e+007 8.76e+002 1.38e+002 5.86e+000
49 1.0464194e+006 -8.3251153e+007 8.25e+002 1.30e+002 5.36e+000
50 1.3148256e+006 -8.2127689e+007 7.78e+002 1.23e+002 5.14e+000
51 1.5052913e+006 -8.1128060e+007 7.24e+002 1.14e+002 5.02e+000
52 1.5902564e+006 -7.2659067e+007 6.72e+002 1.06e+002 4.31e+000
53 1.8456331e+006 -7.0299060e+007 6.06e+002 9.56e+001 4.04e+000
54 2.0291787e+006 -6.8991676e+007 5.66e+002 8.94e+001 3.88e+000
55 2.2938247e+006 -6.7604321e+007 5.12e+002 8.08e+001 3.71e+000
56 2.4492556e+006 -6.5944131e+007 4.84e+002 7.64e+001 3.50e+000
57 2.6325703e+006 -6.4931725e+007 4.59e+002 7.25e+001 3.35e+000
58 2.8897164e+006 -6.2970002e+007 3.92e+002 6.19e+001 3.17e+000
59 3.2816447e+006 -6.0585682e+007 3.28e+002 5.18e+001 2.91e+000
60 3.3181562e+006 -5.8198964e+007 2.84e+002 4.48e+001 2.74e+000
61 3.4429204e+006 -5.5524325e+007 2.32e+002 3.66e+001 2.55e+000
62 3.6841841e+006 -5.4178718e+007 2.04e+002 3.22e+001 2.43e+000
63 3.6897428e+006 -5.1402482e+007 1.76e+002 2.78e+001 2.26e+000
64 3.7700529e+006 -4.8686131e+007 1.57e+002 2.48e+001 2.09e+000
65 3.9170663e+006 -4.7518433e+007 1.45e+002 2.29e+001 2.00e+000
66 3.8064862e+006 -4.4528419e+007 1.06e+002 1.67e+001 1.83e+000
67 3.0613741e+006 -3.3543314e+007 6.63e+001 1.05e+001 1.33e+000
68 2.8503972e+006 -2.9238395e+007 5.67e+001 8.96e+000 1.14e+000
69 2.8882517e+006 -2.8434296e+007 4.76e+001 7.52e+000 1.10e+000
70 2.4046737e+006 -2.4068241e+007 3.36e+001 5.30e+000 9.12e-001
71 1.9390147e+006 -2.0587759e+007 2.31e+001 3.64e+000 7.71e-001
72 1.7679182e+006 -1.8366679e+007 1.91e+001 3.02e+000 6.81e-001
73 1.4404071e+006 -1.4985477e+007 1.25e+001 1.97e+000 5.47e-001
74 1.2091000e+006 -1.2714469e+007 8.59e+000 1.36e+000 4.58e-001
75 1.0943286e+006 -1.0906087e+007 5.82e+000 9.19e-001 3.86e-001
76 8.5940390e+005 -9.9864316e+006 3.42e+000 5.40e-001 3.52e-001
77 7.5073840e+005 -5.3241021e+006 2.90e+000 4.58e-001 1.92e-001
78 5.0458742e+005 -2.4838763e+006 1.73e+000 2.73e-001 9.47e-002
79 4.1593835e+005 -1.6004739e+006 1.31e+000 2.07e-001 6.47e-002
80 3.6602046e+005 -1.4443829e+006 1.08e+000 1.70e-001 5.98e-002
81 3.1485467e+005 -9.1590182e+005 8.40e-001 1.33e-001 4.13e-002
82 3.1462566e+005 -9.0674178e+005 8.39e-001 1.32e-001 4.16e-002
83 2.8505687e+005 -7.0498765e+005 7.03e-001 1.11e-001 3.46e-002
84 2.5490178e+005 -5.1142762e+005 5.64e-001 8.91e-002 2.81e-002
85 2.5481155e+005 -5.1033865e+005 5.64e-001 8.90e-002 2.84e-002
86 2.4676141e+005 -3.7910006e+005 5.27e-001 8.32e-002 2.38e-002
87 2.3601020e+005 -3.0614556e+005 4.79e-001 7.56e-002 2.13e-002
88 2.2696506e+005 -2.6103391e+005 4.38e-001 6.92e-002 1.99e-002
89 2.1049159e+005 -1.9016434e+005 3.65e-001 5.76e-002 1.75e-002
90 2.0134301e+005 -1.7117801e+005 3.25e-001 5.13e-002 1.73e-002
91 1.9561152e+005 -1.2813874e+005 3.00e-001 4.73e-002 1.55e-002
92 1.8790266e+005 -9.3092391e+004 2.67e-001 4.21e-002 1.40e-002
93 1.8279657e+005 -6.5151315e+004 2.45e-001 3.86e-002 1.29e-002
94 1.7604261e+005 -4.8286854e+004 2.16e-001 3.41e-002 1.26e-002
95 1.7538769e+005 -2.2119411e+004 2.13e-001 3.36e-002 1.15e-002
96 1.7489024e+005 -9.4658759e+003 2.11e-001 3.33e-002 1.12e-002
97 1.6908503e+005 3.9384343e+003 1.87e-001 2.96e-002 1.07e-002
98 1.6895684e+005 5.4748362e+003 1.87e-001 2.95e-002 1.10e-002
99 1.6840844e+005 1.6920085e+004 1.85e-001 2.91e-002 1.08e-002
100 1.6586445e+005 2.5635542e+004 1.74e-001 2.75e-002 1.03e-002
101 1.6289656e+005 3.2709670e+004 1.63e-001 2.57e-002 1.03e-002
102 1.5826977e+005 4.3274428e+004 1.44e-001 2.28e-002 9.72e-003
103 1.5445160e+005 4.8993564e+004 1.29e-001 2.04e-002 9.84e-003
104 1.5192759e+005 5.4295396e+004 1.19e-001 1.88e-002 9.57e-003
105 1.4970712e+005 6.3746211e+004 1.10e-001 1.74e-002 9.14e-003
106 1.4860055e+005 6.6024305e+004 1.06e-001 1.68e-002 9.30e-003
107 1.4641800e+005 7.4320384e+004 9.77e-002 1.54e-002 8.72e-003
108 1.4622862e+005 7.6166484e+004 9.69e-002 1.53e-002 8.78e-003
109 1.4151055e+005 8.0886163e+004 7.89e-002 1.25e-002 8.38e-003
110 1.4128254e+005 8.6358150e+004 7.80e-002 1.23e-002 8.27e-003
111 1.4128112e+005 8.8790354e+004 7.80e-002 1.23e-002 8.21e-003
112 1.4065280e+005 9.0894409e+004 7.57e-002 1.19e-002 8.15e-003
113 1.4065245e+005 9.1045975e+004 7.57e-002 1.19e-002 8.52e-003
114 1.3891371e+005 9.3075222e+004 6.92e-002 1.09e-002 8.44e-003
115 1.3655121e+005 9.6297811e+004 6.05e-002 9.55e-003 8.08e-003
116 1.3574987e+005 9.7710427e+004 5.76e-002 9.09e-003 8.12e-003
117 1.3410216e+005 1.0016025e+005 5.16e-002 8.15e-003 7.87e-003
118 1.3314486e+005 1.0028024e+005 4.81e-002 7.59e-003 8.28e-003
119 1.3195888e+005 1.0076290e+005 4.37e-002 6.90e-003 8.48e-003
120 1.3080453e+005 1.0372697e+005 3.95e-002 6.23e-003 7.93e-003
121 1.3077521e+005 1.0379000e+005 3.94e-002 6.22e-003 8.20e-003
122 1.2955928e+005 1.0499321e+005 3.50e-002 5.52e-003 8.17e-003
123 1.2812358e+005 1.0765335e+005 2.98e-002 4.70e-003 7.24e-003
124 1.2799796e+005 1.0987397e+005 2.93e-002 4.63e-003 6.81e-003
125 1.2799415e+005 1.1008747e+005 2.93e-002 4.63e-003 7.09e-003
126 1.2723137e+005 1.1100078e+005 2.66e-002 4.20e-003 7.31e-003
127 1.2602531e+005 1.1209692e+005 2.23e-002 3.52e-003 7.06e-003
128 1.2538491e+005 1.1311803e+005 2.00e-002 3.16e-003 6.99e-003
129 1.2507739e+005 1.1437081e+005 1.89e-002 2.98e-003 6.62e-003
130 1.2412239e+005 1.1533285e+005 1.55e-002 2.44e-003 6.37e-003
131 1.2316800e+005 1.1620431e+005 1.21e-002 1.90e-003 6.00e-003
132 1.2274892e+005 1.1658785e+005 1.06e-002 1.67e-003 6.08e-003
133 1.2206061e+005 1.1741041e+005 8.10e-003 1.28e-003 5.79e-003
134 1.2167062e+005 1.1818889e+005 6.70e-003 1.06e-003 5.53e-003
135 1.2115062e+005 1.1848444e+005 4.83e-003 7.62e-004 5.42e-003
136 1.2083277e+005 1.1884383e+005 3.69e-003 5.82e-004 5.50e-003
137 1.2073653e+005 1.1896486e+005 3.35e-003 5.28e-004 5.45e-003
138 1.2047254e+005 1.1919233e+005 2.40e-003 3.78e-004 5.37e-003
139 1.2027945e+005 1.1929357e+005 1.71e-003 2.67e-004 5.32e-003
140 1.2014607e+005 1.1944756e+005 1.23e-003 1.92e-004 5.32e-003
141 1.2003508e+005 1.1954898e+005 8.26e-004 1.29e-004 5.19e-003
142 1.2001650e+005 1.1965692e+005 7.63e-004 1.19e-004 5.00e-003
143 1.1996258e+005 1.1973682e+005 5.68e-004 8.86e-005 4.81e-003
144 1.1988234e+005 1.1975236e+005 2.76e-004 4.30e-005 4.90e-003
145 1.1984151e+005 1.1975823e+005 1.29e-004 1.99e-005 5.17e-003
146 1.1983997e+005 1.1975829e+005 1.25e-004 1.93e-005 5.72e-003
147 1.1982680e+005 1.1977530e+005 7.59e-005 1.16e-005 5.27e-003
148 1.1982625e+005 1.1979008e+005 8.18e-005 1.20e-005 5.02e-003
149 1.1982545e+005 1.1979749e+005 8.30e-005 1.18e-005 4.61e-003
150 1.1981773e+005 1.1979824e+005 4.94e-005 6.98e-006 5.09e-003
151 1.1981053e+005 1.1980415e+005 1.69e-005 2.34e-006 4.75e-003
152 1.1981053e+005 1.1980415e+005 2.17e-005 2.74e-006 5.12e-003
153 1.1981036e+005 1.1980563e+005 2.29e-005 2.80e-006 4.59e-003
154 1.1981011e+005 1.1980638e+005 2.33e-005 2.77e-006 4.55e-003
155 1.1980945e+005 1.1980709e+005 2.01e-005 2.32e-006 4.60e-003
Parallel barrier real time = 393.16 sec.</p>
<p>Primal crossover.
Primal: Fixing 5816 variables.
5815 PMoves: Infeasibility 2.36747634e-002 Objective 1.19610884e+005
1644 PMoves: Infeasibility 9.54327705e-003 Objective 1.13055528e+005
0 PMoves: Infeasibility 3.14479416e-003 Objective 1.16656660e+005
Primal: Pushed 4185, exchanged 1631.
Dual: Fixing 4479 variables.
4478 DMoves: Infeasibility 1.62824849e+000 Objective 1.16656722e+005
Elapsed crossover time = 13.03 sec. (4200 DMoves)
Elapsed crossover time = 24.61 sec. (1800 DMoves)
Elapsed crossover time = 35.53 sec. (1400 DMoves)
Elapsed crossover time = 51.84 sec. (1200 DMoves)
1179 DMoves: Infeasibility 1.61005612e+000 Objective 1.16656715e+005
Elapsed crossover time = 64.64 sec. (600 DMoves)
Elapsed crossover time = 92.53 sec. (400 DMoves)
Elapsed crossover time = 124.49 sec. (200 DMoves)
0 DMoves: Infeasibility 1.35068335e+000 Objective 1.16657329e+005
Dual: Pushed 2711, exchanged 1724.</p>
<p>Iteration log . . .
Iteration: 1 Objective = 116656.667362
Perturbation started.
Iteration: 602 Objective = 116656.667278
Elapsed time = 550.73 sec. (1000 iterations).
Iteration: 1229 Objective = 116639.403779
Iteration: 1857 Objective = 116623.702910
Iteration: 2446 Objective = 116623.400416
Iteration: 3024 Objective = 116623.081113
Iteration: 3629 Objective = 116623.059461
Iteration: 3997 Objective = 116623.048655
Iteration: 4407 Objective = 116623.035894
Iteration: 4895 Objective = 116623.020255
Iteration: 5292 Objective = 116623.008241
Iteration: 5749 Objective = 116622.993986
Iteration: 6306 Objective = 116622.977008
Iteration: 6747 Objective = 116622.964052
Iteration: 7239 Objective = 116622.949206
Iteration: 7587 Objective = 116622.937252
Iteration: 7980 Objective = 116622.924526
Iteration: 8397 Objective = 116622.911751
Iteration: 8820 Objective = 116622.898790
Iteration: 9247 Objective = 116622.885263
Iteration: 9573 Objective = 116622.874655
Iteration: 9991 Objective = 116622.859957
Iteration: 10372 Objective = 116622.848357
Iteration: 10664 Objective = 116622.837990
Iteration: 11083 Objective = 116622.824149
Iteration: 11460 Objective = 116622.810768
Iteration: 11846 Objective = 116622.795180
Iteration: 12261 Objective = 116622.781136
Iteration: 12652 Objective = 116622.765492
Iteration: 13087 Objective = 116622.748633
Iteration: 13410 Objective = 116622.736145
Iteration: 13736 Objective = 116622.723440
Elapsed time = 561.44 sec. (14000 iterations).
Iteration: 14071 Objective = 116622.708691
Iteration: 14429 Objective = 116622.696066
Iteration: 14828 Objective = 116622.681491
Iteration: 15173 Objective = 116622.670176
Iteration: 15569 Objective = 116622.656188
Iteration: 16084 Objective = 116622.637249
Iteration: 16459 Objective = 116622.623814
Iteration: 16886 Objective = 116622.607227
Iteration: 17117 Objective = 116622.596396
Iteration: 17473 Objective = 116622.581740
Iteration: 17824 Objective = 116622.568286
Iteration: 18169 Objective = 116622.553203
Iteration: 18609 Objective = 116622.535085
Iteration: 18969 Objective = 116622.522322
Iteration: 19444 Objective = 116622.504672
Iteration: 19790 Objective = 116622.489282
Iteration: 20201 Objective = 116622.472840
Iteration: 20608 Objective = 116622.457737
Iteration: 20931 Objective = 116622.447199
Iteration: 21250 Objective = 116622.435909
Iteration: 21587 Objective = 116622.422952
Iteration: 21996 Objective = 116622.406617
Iteration: 22314 Objective = 116622.393048
Iteration: 22681 Objective = 116622.375657
Iteration: 23040 Objective = 116622.361111
Iteration: 23493 Objective = 116622.343494
Iteration: 23845 Objective = 116622.329824
Iteration: 24140 Objective = 116622.318369
Iteration: 24533 Objective = 116622.301885
Iteration: 24934 Objective = 116622.284579
Iteration: 25254 Objective = 116622.269989
Iteration: 25570 Objective = 116622.257761
Iteration: 26028 Objective = 116622.237773
Iteration: 26318 Objective = 116622.226006
Iteration: 26683 Objective = 116622.210816
Iteration: 27095 Objective = 116622.192786
Iteration: 27403 Objective = 116622.178525
Iteration: 27758 Objective = 116622.161127
Elapsed time = 571.72 sec. (28000 iterations).
Iteration: 28115 Objective = 116622.143597
Iteration: 28507 Objective = 116622.122392
Iteration: 28878 Objective = 116622.099634
Iteration: 29366 Objective = 116622.073318
Iteration: 29819 Objective = 116622.048803
Iteration: 30215 Objective = 116622.029418
Iteration: 30619 Objective = 116622.006104
Iteration: 31023 Objective = 116621.981909
Iteration: 31447 Objective = 116621.954384
Iteration: 31841 Objective = 116621.927906
Iteration: 32140 Objective = 116621.909594
Iteration: 32576 Objective = 116621.884861
Iteration: 32933 Objective = 116621.865225
Iteration: 33287 Objective = 116621.846247
Iteration: 33613 Objective = 116621.827415
Iteration: 33984 Objective = 116621.810093
Iteration: 34409 Objective = 116621.786341
Iteration: 34892 Objective = 116621.757971
Iteration: 35274 Objective = 116621.737535
Iteration: 35520 Objective = 116621.724743
Iteration: 36065 Objective = 116621.691613
Iteration: 36455 Objective = 116621.669401
Iteration: 36845 Objective = 116621.646403
Iteration: 37155 Objective = 116621.623679
Iteration: 37586 Objective = 116621.597828
Iteration: 37952 Objective = 116621.571938
Iteration: 38309 Objective = 116621.547732
Iteration: 38705 Objective = 116621.523297
Iteration: 39009 Objective = 116621.502481
Iteration: 39469 Objective = 116621.474218
Iteration: 39827 Objective = 116621.452082
Iteration: 39995 Objective = 116621.441722
Iteration: 40398 Objective = 116621.417717
Iteration: 40690 Objective = 116621.398416
Iteration: 41139 Objective = 116621.368804
Iteration: 41571 Objective = 116621.343497
Iteration: 41911 Objective = 116621.320379
Elapsed time = 581.73 sec. (42000 iterations).
Iteration: 42410 Objective = 116621.289426
Iteration: 42823 Objective = 116621.261586
Iteration: 43214 Objective = 116621.233134
Iteration: 43568 Objective = 116621.207343
Iteration: 43892 Objective = 116621.184798
Iteration: 44245 Objective = 116621.160651
Iteration: 44608 Objective = 116621.137738
Iteration: 44993 Objective = 116621.112584
Iteration: 45354 Objective = 116621.093171
Iteration: 45621 Objective = 116621.078527
Iteration: 46064 Objective = 116621.046255
Iteration: 46360 Objective = 116621.024684
Iteration: 46782 Objective = 116620.997274
Iteration: 47225 Objective = 116620.964029
Iteration: 47663 Objective = 116620.935685
Iteration: 48037 Objective = 116620.912094
Iteration: 48410 Objective = 116620.887736
Iteration: 48841 Objective = 116620.860933
Iteration: 49378 Objective = 116620.825854
Iteration: 49811 Objective = 116620.799250
Iteration: 50298 Objective = 116601.410473
Iteration: 50583 Objective = 116601.387997
Iteration: 50883 Objective = 116601.364885
Iteration: 51421 Objective = 116597.119288
Iteration: 51722 Objective = 116597.093399
Iteration: 52094 Objective = 116597.068437
Iteration: 52548 Objective = 116597.030549
Iteration: 52978 Objective = 116596.999213
Iteration: 53417 Objective = 116592.983738
Iteration: 53810 Objective = 116592.946676
Iteration: 54334 Objective = 116592.902602
Iteration: 54775 Objective = 116592.867106
Iteration: 55201 Objective = 116592.840592
Iteration: 55516 Objective = 116592.819713
Iteration: 55919 Objective = 116592.791909
Iteration: 56182 Objective = 116592.775344
Iteration: 56599 Objective = 116592.747762
Iteration: 56947 Objective = 116592.726097
Elapsed time = 591.86 sec. (57000 iterations).
Iteration: 57223 Objective = 116592.711155
Iteration: 57711 Objective = 116592.681233
Iteration: 58252 Objective = 116592.644957
Iteration: 58623 Objective = 116592.621269
Iteration: 58958 Objective = 116592.602548
Iteration: 59401 Objective = 116592.577633
Iteration: 59888 Objective = 116592.548079
Iteration: 60235 Objective = 116592.528487
Iteration: 60570 Objective = 116592.506329
Iteration: 60993 Objective = 116592.482322
Iteration: 61337 Objective = 116592.459076
Iteration: 61724 Objective = 116592.431309
Iteration: 62188 Objective = 116592.401366
Iteration: 62503 Objective = 116592.382081
Iteration: 62836 Objective = 116592.360560
Iteration: 63190 Objective = 116592.341613
Iteration: 63554 Objective = 116592.322495
Iteration: 63854 Objective = 116592.304664
Iteration: 64240 Objective = 116592.283984
Iteration: 64636 Objective = 116592.260565
Iteration: 65005 Objective = 116592.239363
Iteration: 65306 Objective = 116592.223198
Iteration: 65678 Objective = 116592.205036
Iteration: 66067 Objective = 116592.182111
Iteration: 66415 Objective = 116592.161682
Iteration: 66749 Objective = 116592.140183
Iteration: 67048 Objective = 116592.122744
Iteration: 67390 Objective = 116592.104855
Iteration: 67733 Objective = 116592.084982
Iteration: 67987 Objective = 116592.068985
Iteration: 68409 Objective = 116592.042225
Iteration: 68763 Objective = 116592.020412
Iteration: 69095 Objective = 116592.002813
Iteration: 69434 Objective = 116591.982008
Iteration: 69756 Objective = 116591.964472
Iteration: 70186 Objective = 116591.940041
Iteration: 70500 Objective = 116591.916707
Iteration: 70867 Objective = 116591.894608
Iteration: 71229 Objective = 116591.872725
Iteration: 71655 Objective = 116591.850738
Iteration: 72034 Objective = 116591.828568
Iteration: 72489 Objective = 116591.803687
Iteration: 72768 Objective = 116591.787172
Elapsed time = 602.17 sec. (73000 iterations).
Iteration: 73033 Objective = 116591.773780
Iteration: 73391 Objective = 116591.754108
Iteration: 73641 Objective = 116591.740111
Iteration: 74119 Objective = 116591.713601
Iteration: 74323 Objective = 116591.702220
Iteration: 74794 Objective = 116591.676070
Iteration: 75124 Objective = 116591.657816
Iteration: 75459 Objective = 116591.639637
Iteration: 75873 Objective = 116591.617452
Iteration: 76165 Objective = 116591.601659
Iteration: 76543 Objective = 116591.580666
Iteration: 76944 Objective = 116591.558950
Iteration: 77238 Objective = 116591.542681
Iteration: 77501 Objective = 116591.527250
Iteration: 78029 Objective = 116591.497371
Iteration: 78421 Objective = 116591.477567
Iteration: 78994 Objective = 116591.428561
Iteration: 79424 Objective = 116591.397350
Iteration: 79765 Objective = 116591.377042
Iteration: 80114 Objective = 116591.357874
Iteration: 80408 Objective = 116591.341335
Iteration: 80898 Objective = 116591.314698
Iteration: 81237 Objective = 116591.298458
Iteration: 81767 Objective = 116591.264653
Iteration: 82183 Objective = 116591.235771
Iteration: 82667 Objective = 116591.206100
Iteration: 83037 Objective = 116591.183742
Iteration: 83468 Objective = 116591.159525
Iteration: 83794 Objective = 116591.140527
Iteration: 84212 Objective = 116591.113679
Iteration: 84550 Objective = 116591.091556
Iteration: 85151 Objective = 116591.056991
Iteration: 85529 Objective = 116591.032250
Iteration: 85886 Objective = 116591.009120
Iteration: 86322 Objective = 116590.982381
Iteration: 86838 Objective = 116590.954705
Iteration: 87107 Objective = 116590.940154
Iteration: 87428 Objective = 116590.921899
Iteration: 87880 Objective = 116590.897533
Iteration: 88187 Objective = 116590.881437
Iteration: 88619 Objective = 116590.862072
Elapsed time = 612.50 sec. (89000 iterations).
Iteration: 89012 Objective = 116590.839361
Iteration: 89400 Objective = 116590.815957
Iteration: 89686 Objective = 116590.797470
Iteration: 90176 Objective = 116590.769602
Iteration: 90648 Objective = 116590.741500
Iteration: 91113 Objective = 116590.715106
Iteration: 91476 Objective = 116590.694678
Iteration: 91815 Objective = 116590.673978
Iteration: 92198 Objective = 116590.652399
Iteration: 92617 Objective = 116590.632312
Iteration: 93009 Objective = 116590.611971
Iteration: 93430 Objective = 116590.588987
Iteration: 93805 Objective = 116590.569438
Iteration: 94258 Objective = 116590.547372
Iteration: 94582 Objective = 116590.527144
Iteration: 94893 Objective = 116590.509872
Iteration: 95277 Objective = 116590.486155
Iteration: 95728 Objective = 116590.452333
Iteration: 96334 Objective = 116590.412245
Iteration: 96752 Objective = 116590.385764
Iteration: 97235 Objective = 116590.352473
Iteration: 97631 Objective = 116590.330489
Iteration: 98070 Objective = 116590.302293
Iteration: 98473 Objective = 116590.277336
Iteration: 98809 Objective = 116590.256239
Iteration: 99231 Objective = 116590.229024
Iteration: 99800 Objective = 116590.194748
Iteration: 100213 Objective = 116590.171637
Iteration: 100618 Objective = 116590.146753
Iteration: 100935 Objective = 116590.128594
Iteration: 101276 Objective = 116590.109891
Iteration: 101693 Objective = 116590.086742
Iteration: 102087 Objective = 116590.063938
Iteration: 102373 Objective = 116590.047811
Iteration: 102724 Objective = 116590.029627
Iteration: 103150 Objective = 116590.006211
Iteration: 103441 Objective = 116589.990981
Iteration: 103838 Objective = 116589.969031
Iteration: 104127 Objective = 116589.951933
Iteration: 104530 Objective = 116589.926931
Iteration: 104953 Objective = 116589.903146
Elapsed time = 622.78 sec. (105000 iterations).
Iteration: 105310 Objective = 116589.883709
Iteration: 105723 Objective = 116589.859396
Iteration: 106167 Objective = 116589.836554
Iteration: 106597 Objective = 116589.816751
Iteration: 106953 Objective = 116589.797921
Iteration: 107434 Objective = 116589.766192
Iteration: 107780 Objective = 116589.747019
Iteration: 108213 Objective = 116589.723661
Iteration: 108635 Objective = 116589.700345
Iteration: 109102 Objective = 116589.673270
Iteration: 109562 Objective = 116589.646531
Iteration: 109930 Objective = 116589.627473
Iteration: 110209 Objective = 116589.611547
Iteration: 110658 Objective = 116589.588749
Iteration: 111006 Objective = 116589.570768
Iteration: 111406 Objective = 116589.548499
Iteration: 111942 Objective = 116589.517715
Iteration: 112338 Objective = 116589.496873
Iteration: 112841 Objective = 116589.465336
Iteration: 113122 Objective = 116589.449617
Iteration: 113438 Objective = 116589.433445
Iteration: 113862 Objective = 116589.412168
Iteration: 114277 Objective = 116589.389743
Iteration: 114637 Objective = 116589.371162
Iteration: 114946 Objective = 116589.354317
Iteration: 115395 Objective = 116589.328529
Iteration: 115661 Objective = 116589.313476
Iteration: 116025 Objective = 116589.292597
Iteration: 116532 Objective = 116589.264065
Iteration: 116975 Objective = 116589.238370
Iteration: 117395 Objective = 116589.213226
Iteration: 117753 Objective = 116589.193202
Iteration: 118236 Objective = 116589.164925
Iteration: 118718 Objective = 116589.134922
Iteration: 119169 Objective = 116589.108819
Iteration: 119512 Objective = 116589.090925
Iteration: 119934 Objective = 116589.067131
Iteration: 120280 Objective = 116589.049556
Iteration: 120561 Objective = 116589.035799
Iteration: 120834 Objective = 116589.006162
Iteration: 121133 Objective = 116588.974996
Iteration: 121544 Objective = 116588.943055
Iteration: 121918 Objective = 116588.918539
Elapsed time = 633.45 sec. (122000 iterations).
Iteration: 122272 Objective = 116588.897000
Iteration: 122775 Objective = 116588.863452
Iteration: 123230 Objective = 116588.835259
Iteration: 123532 Objective = 116588.816731
Iteration: 123943 Objective = 116588.790887
Iteration: 124236 Objective = 116588.774840
Iteration: 124573 Objective = 116588.754025
Iteration: 124900 Objective = 116588.735215
Iteration: 125338 Objective = 116588.709413
Iteration: 125651 Objective = 116588.691371
Iteration: 126147 Objective = 116588.664029
Iteration: 126554 Objective = 116588.641976
Iteration: 126875 Objective = 116588.622659
Iteration: 127311 Objective = 116588.601330
Iteration: 127684 Objective = 116588.580255
Iteration: 128095 Objective = 116588.551590
Iteration: 128471 Objective = 116588.526606
Iteration: 128805 Objective = 116588.504777
Iteration: 129194 Objective = 116588.484405
Iteration: 129638 Objective = 116588.460737
Iteration: 129947 Objective = 116588.445211
Iteration: 130233 Objective = 116588.428641
Iteration: 130647 Objective = 116588.406080
Iteration: 131172 Objective = 116588.369798
Iteration: 131681 Objective = 116588.336653
Iteration: 132096 Objective = 116588.311856
Iteration: 132565 Objective = 116588.288625
Iteration: 132864 Objective = 116588.271446
Iteration: 133248 Objective = 116588.247763
Iteration: 133647 Objective = 116588.226606
Iteration: 134110 Objective = 116588.202152
Iteration: 134535 Objective = 116588.175877
Iteration: 134952 Objective = 116588.151100
Iteration: 135344 Objective = 116588.112547
Iteration: 135769 Objective = 116588.079592
Iteration: 136214 Objective = 116588.045107
Iteration: 136643 Objective = 116588.016111
Iteration: 137083 Objective = 116587.992614
Iteration: 137408 Objective = 116587.976048
Iteration: 137817 Objective = 116587.952559
Elapsed time = 643.59 sec. (138000 iterations).
Iteration: 138189 Objective = 116587.931024
Iteration: 138543 Objective = 116587.911848
Iteration: 138991 Objective = 116587.887705
Iteration: 139334 Objective = 116587.870700
Iteration: 139801 Objective = 116587.845527
Iteration: 140179 Objective = 116587.825747
Iteration: 140454 Objective = 116587.811195
Iteration: 140853 Objective = 116587.791685
Iteration: 141175 Objective = 116587.777689
Iteration: 141488 Objective = 116587.762675
Iteration: 141920 Objective = 116587.741835
Iteration: 142349 Objective = 116587.718505
Iteration: 142808 Objective = 116587.691762
Iteration: 143255 Objective = 116587.669652
Iteration: 143590 Objective = 116587.653977
Iteration: 143981 Objective = 116587.633224
Iteration: 144218 Objective = 116587.618883
Iteration: 144626 Objective = 116587.600104
Iteration: 144871 Objective = 116587.586597
Iteration: 145280 Objective = 116587.562945
Iteration: 145674 Objective = 116587.541356
Iteration: 146063 Objective = 116587.520124
Iteration: 146659 Objective = 116587.489223
Iteration: 147027 Objective = 116587.469261
Iteration: 147433 Objective = 116587.451647
Iteration: 147995 Objective = 116587.422408
Iteration: 148334 Objective = 116587.404420
Iteration: 148696 Objective = 116587.389618
Iteration: 149026 Objective = 116587.373639
Iteration: 149473 Objective = 116587.351748
Iteration: 149764 Objective = 116587.338292
Iteration: 150096 Objective = 116587.321621
Iteration: 150325 Objective = 116587.309923
Iteration: 150865 Objective = 116587.280893
Iteration: 151199 Objective = 116587.265436
Iteration: 151424 Objective = 116587.254671
Iteration: 151808 Objective = 116587.235091
Iteration: 152203 Objective = 116587.218535
Iteration: 152515 Objective = 116587.201285
Iteration: 152841 Objective = 116587.187639
Iteration: 153374 Objective = 116587.164099
Iteration: 153880 Objective = 116587.139177
Elapsed time = 653.59 sec. (154000 iterations).
Iteration: 154421 Objective = 116587.113930
Iteration: 154874 Objective = 116587.092530
Iteration: 155323 Objective = 116587.068075
Iteration: 155824 Objective = 116587.045755
Iteration: 156107 Objective = 116587.031571
Iteration: 156539 Objective = 116587.010226
Iteration: 156929 Objective = 116586.992225
Iteration: 157172 Objective = 116586.978393
Iteration: 157502 Objective = 116586.962667
Iteration: 157925 Objective = 116586.945699
Iteration: 158447 Objective = 116586.908924
Iteration: 158717 Objective = 116586.891814
Iteration: 159232 Objective = 116586.862890
Iteration: 159527 Objective = 116586.850203
Iteration: 160020 Objective = 116586.825887
Iteration: 160517 Objective = 116586.795669
Iteration: 160887 Objective = 116586.776630
Iteration: 161220 Objective = 116586.758313
Iteration: 161670 Objective = 116586.728946
Iteration: 162008 Objective = 116586.711306
Iteration: 162444 Objective = 116586.687471
Iteration: 162804 Objective = 116586.672008
Iteration: 163165 Objective = 116586.651124
Iteration: 163534 Objective = 116586.632164
Iteration: 163920 Objective = 116586.614574
Iteration: 164433 Objective = 116586.590268
Iteration: 164855 Objective = 116586.571370
Iteration: 165314 Objective = 116586.549319
Iteration: 165711 Objective = 116586.530463
Iteration: 166048 Objective = 116586.517368
Iteration: 166595 Objective = 116586.489670
Iteration: 167077 Objective = 116586.464467
Iteration: 167514 Objective = 116586.441989
Iteration: 168067 Objective = 116586.409441
Iteration: 168368 Objective = 116586.393000
Iteration: 168875 Objective = 116586.362282
Iteration: 169253 Objective = 116586.341481
Iteration: 169671 Objective = 116586.311726
Iteration: 169932 Objective = 116586.291752
Iteration: 170289 Objective = 116586.265102
Iteration: 170781 Objective = 116586.230009
Elapsed time = 664.16 sec. (171000 iterations).
Iteration: 171290 Objective = 116586.202213
Iteration: 171663 Objective = 116586.182909
Iteration: 172055 Objective = 116586.159139
Iteration: 172532 Objective = 116586.135447
Iteration: 173159 Objective = 116586.103205
Iteration: 173727 Objective = 116586.073830
Iteration: 174158 Objective = 116586.049341
Iteration: 174483 Objective = 116586.031703
Iteration: 174961 Objective = 116586.006852
Iteration: 175443 Objective = 116585.983856
Iteration: 175927 Objective = 116585.958373
Iteration: 176357 Objective = 116585.932181
Iteration: 176689 Objective = 116585.911208
Iteration: 177075 Objective = 116585.890489
Iteration: 177456 Objective = 116585.869735
Iteration: 178156 Objective = 116585.835866
Iteration: 178481 Objective = 116585.818000
Iteration: 178906 Objective = 116585.794048
Iteration: 179391 Objective = 116585.767275
Iteration: 179758 Objective = 116585.748730
Iteration: 180090 Objective = 116585.730952
Iteration: 180455 Objective = 116585.711959
Iteration: 180742 Objective = 116585.695772
Iteration: 181158 Objective = 116585.673647
Iteration: 181697 Objective = 116585.647635
Iteration: 181983 Objective = 116585.635116
Iteration: 182453 Objective = 116585.610681
Iteration: 182898 Objective = 116585.587255
Iteration: 183204 Objective = 116585.573254
Iteration: 183653 Objective = 116585.553723
Iteration: 184252 Objective = 116585.526639
Iteration: 184696 Objective = 116585.503747
Iteration: 185043 Objective = 116585.483314
Iteration: 185528 Objective = 116585.460815
Iteration: 185993 Objective = 116585.437460
Iteration: 186382 Objective = 116585.420707
Iteration: 186783 Objective = 116585.402913
Iteration: 187094 Objective = 116585.387356
Iteration: 187615 Objective = 116585.362115
Elapsed time = 674.33 sec. (188000 iterations).
Iteration: 188155 Objective = 116585.335954
Iteration: 188407 Objective = 116585.322576
Iteration: 188946 Objective = 116585.295206
Iteration: 189415 Objective = 116585.274115
Iteration: 189770 Objective = 116585.256699
Iteration: 190295 Objective = 116585.232807
Iteration: 190654 Objective = 116585.216008
Iteration: 190980 Objective = 116585.201285
Iteration: 191452 Objective = 116585.179246
Iteration: 191824 Objective = 116585.158686
Iteration: 192248 Objective = 116585.137913
Iteration: 192646 Objective = 116585.117396
Iteration: 193211 Objective = 116585.090501
Iteration: 193723 Objective = 116585.062937
Iteration: 194066 Objective = 116585.044525
Iteration: 194548 Objective = 116585.018083
Iteration: 195103 Objective = 116584.987294
Iteration: 195575 Objective = 116584.965328
Iteration: 196008 Objective = 116584.947048
Iteration: 196458 Objective = 116584.924874
Iteration: 196934 Objective = 116584.904150
Iteration: 197388 Objective = 116584.881394
Iteration: 197823 Objective = 116584.861691
Iteration: 198289 Objective = 116584.839719
Iteration: 198692 Objective = 116584.820868
Iteration: 199041 Objective = 116584.804940
Iteration: 199410 Objective = 116584.785179
Iteration: 199962 Objective = 116584.749866
Iteration: 200339 Objective = 116584.713645
Iteration: 200721 Objective = 116584.681873
Iteration: 201235 Objective = 116584.637868
Iteration: 201554 Objective = 116584.616916
Iteration: 201949 Objective = 116584.593543
Iteration: 202255 Objective = 116584.576366
Iteration: 202617 Objective = 116584.554383
Iteration: 202990 Objective = 116584.534757
Iteration: 203518 Objective = 116584.505830
Iteration: 203954 Objective = 116584.483109
Iteration: 204424 Objective = 116584.457247
Iteration: 204798 Objective = 116584.438132
Elapsed time = 684.61 sec. (205000 iterations).
Iteration: 205238 Objective = 116584.417248
Iteration: 205703 Objective = 116584.393056
Iteration: 206148 Objective = 116584.369173
Iteration: 206364 Objective = 116584.357733
Iteration: 206720 Objective = 116584.339926
Iteration: 207010 Objective = 116584.327728
Iteration: 207397 Objective = 116584.305760
Iteration: 207846 Objective = 116584.284066
Iteration: 208271 Objective = 116584.263561
Iteration: 208610 Objective = 116584.245630
Iteration: 209015 Objective = 116584.226916
Iteration: 209457 Objective = 116584.204864
Iteration: 209751 Objective = 116584.192151
Iteration: 210348 Objective = 116584.165020
Iteration: 210795 Objective = 116584.144438
Iteration: 211445 Objective = 116584.112584
Iteration: 211833 Objective = 116584.096654
Iteration: 212221 Objective = 116584.078658
Iteration: 212574 Objective = 116584.063121
Iteration: 212964 Objective = 116584.044977
Iteration: 213358 Objective = 116584.026686
Iteration: 213780 Objective = 116584.007948
Iteration: 214142 Objective = 116583.984840
Iteration: 214676 Objective = 116583.956570
Iteration: 215181 Objective = 116583.936039
Iteration: 215690 Objective = 116583.910094
Iteration: 216275 Objective = 116583.887017
Iteration: 216715 Objective = 116583.867589
Iteration: 217060 Objective = 116583.853858
Iteration: 217402 Objective = 116583.840915
Iteration: 217877 Objective = 116583.820372
Iteration: 218332 Objective = 116583.801199
Iteration: 218752 Objective = 116583.776342
Iteration: 219106 Objective = 116583.755907
Iteration: 219471 Objective = 116583.738319
Iteration: 219985 Objective = 116583.709212
Iteration: 220404 Objective = 116583.688737
Iteration: 220748 Objective = 116583.672393
Iteration: 221190 Objective = 116583.651043
Iteration: 221474 Objective = 116583.635741
Iteration: 221904 Objective = 116583.616884
Elapsed time = 694.84 sec. (222000 iterations).
Iteration: 222396 Objective = 116583.592834
Iteration: 222755 Objective = 116583.577947
Iteration: 223265 Objective = 116583.554458
Iteration: 223860 Objective = 116583.525693
Iteration: 224340 Objective = 116583.503458
Iteration: 224877 Objective = 116583.475279
Iteration: 225153 Objective = 116583.461184
Iteration: 225554 Objective = 116583.441171
Iteration: 225936 Objective = 116583.423234
Iteration: 226511 Objective = 116583.395234
Iteration: 227001 Objective = 116583.370139
Iteration: 227432 Objective = 116583.335934
Iteration: 227744 Objective = 116583.297263
Iteration: 228179 Objective = 116583.256287
Iteration: 228532 Objective = 116583.225332
Iteration: 229053 Objective = 116583.192491
Iteration: 229449 Objective = 116583.167951
Iteration: 229837 Objective = 116583.145109
Iteration: 230294 Objective = 116583.121442
Iteration: 230760 Objective = 116583.097468
Iteration: 231394 Objective = 116583.066476
Iteration: 231945 Objective = 116583.040089
Iteration: 232399 Objective = 116583.015825
Iteration: 232887 Objective = 116582.991789
Iteration: 233395 Objective = 116582.967752
Iteration: 233842 Objective = 116582.943239
Iteration: 234145 Objective = 116582.927376
Iteration: 234475 Objective = 116582.909788
Iteration: 234813 Objective = 116582.892812
Iteration: 235196 Objective = 116582.873454
Iteration: 235559 Objective = 116582.856361
Iteration: 235946 Objective = 116582.840820
Iteration: 236558 Objective = 116582.813005
Iteration: 236989 Objective = 116582.792541
Iteration: 237457 Objective = 116582.768948
Iteration: 237987 Objective = 116582.745617
Iteration: 238528 Objective = 116582.718145
Iteration: 239043 Objective = 116582.697672
Iteration: 239378 Objective = 116582.683743
Iteration: 239649 Objective = 116582.670718
Elapsed time = 705.41 sec. (240000 iterations).
Iteration: 240046 Objective = 116582.653097
Iteration: 240548 Objective = 116582.632017
Iteration: 240843 Objective = 116582.620536
Iteration: 241156 Objective = 116582.609981
Iteration: 241641 Objective = 116582.588568
Iteration: 241953 Objective = 116582.573636
Iteration: 242429 Objective = 116582.550142
Iteration: 242766 Objective = 116582.535489
Iteration: 243064 Objective = 116582.519354
Iteration: 243572 Objective = 116582.496952
Iteration: 243962 Objective = 116582.480899
Iteration: 244527 Objective = 116582.459107
Iteration: 245018 Objective = 116582.437232
Iteration: 245630 Objective = 116582.406564
Iteration: 246097 Objective = 116582.387379
Iteration: 246557 Objective = 116582.365921
Iteration: 247039 Objective = 116582.344701
Iteration: 247341 Objective = 116582.331998
Iteration: 247872 Objective = 116582.309186
Iteration: 248257 Objective = 116582.293724
Iteration: 248575 Objective = 116582.279102
Iteration: 249288 Objective = 116582.250318
Iteration: 249819 Objective = 116582.226135
Iteration: 250277 Objective = 116582.208766
Iteration: 250586 Objective = 116582.196005
Iteration: 251198 Objective = 116582.162130
Iteration: 251597 Objective = 116582.129563
Iteration: 252065 Objective = 116582.075858
Iteration: 252600 Objective = 116582.033298
Iteration: 253041 Objective = 116582.008616
Iteration: 253312 Objective = 116581.995075
Iteration: 253726 Objective = 116581.976920
Iteration: 253972 Objective = 116581.964580
Iteration: 254443 Objective = 116581.939076
Iteration: 254886 Objective = 116581.919012
Iteration: 255333 Objective = 116581.899790
Iteration: 255743 Objective = 116581.881828
Iteration: 256266 Objective = 116581.858388
Iteration: 256683 Objective = 116581.841259
Iteration: 257113 Objective = 116581.823524
Iteration: 257581 Objective = 116581.797705
Iteration: 257942 Objective = 116581.780811
Elapsed time = 715.91 sec. (258000 iterations).
Iteration: 258529 Objective = 116581.756931
Iteration: 258826 Objective = 116581.745767
Iteration: 259319 Objective = 116581.724766
Iteration: 259786 Objective = 116581.704526
Iteration: 260235 Objective = 116581.687597
Iteration: 260714 Objective = 116581.670429
Iteration: 261292 Objective = 116581.645160
Iteration: 261829 Objective = 116581.622728
Iteration: 262343 Objective = 116581.601453
Iteration: 262887 Objective = 116581.581823
Iteration: 263416 Objective = 116581.549580
Iteration: 264040 Objective = 116581.518164
Iteration: 264507 Objective = 116581.496219
Iteration: 264913 Objective = 116581.475748
Iteration: 265582 Objective = 116581.445474
Iteration: 266108 Objective = 116581.422955
Iteration: 266548 Objective = 116581.405220
Iteration: 267046 Objective = 116581.382514
Iteration: 267501 Objective = 116581.364515
Iteration: 268030 Objective = 116581.336535
Iteration: 268489 Objective = 116581.316528
Iteration: 269065 Objective = 116581.293603
Iteration: 269530 Objective = 116581.274561
Iteration: 269762 Objective = 116581.265647
Iteration: 270353 Objective = 116581.240465
Iteration: 270846 Objective = 116581.219957
Iteration: 271206 Objective = 116581.205946
Iteration: 271632 Objective = 116581.186867
Iteration: 272033 Objective = 116581.157177
Iteration: 272486 Objective = 116581.122032
Iteration: 273097 Objective = 116581.077935
Iteration: 273525 Objective = 116581.057494
Iteration: 274063 Objective = 116581.025774
Iteration: 274645 Objective = 116580.997361
Iteration: 275212 Objective = 116580.970769
Iteration: 275549 Objective = 116580.947600
Elapsed time = 726.02 sec. (276000 iterations).
Iteration: 276144 Objective = 116580.919221
Iteration: 276467 Objective = 116580.902957
Iteration: 276822 Objective = 116580.885816
Iteration: 277205 Objective = 116580.870219
Iteration: 277677 Objective = 116580.847531
Iteration: 278079 Objective = 116580.828042
Iteration: 278598 Objective = 116580.807305
Iteration: 279151 Objective = 116580.781581
Iteration: 279617 Objective = 116580.759754
Iteration: 280127 Objective = 116580.741402
Iteration: 280604 Objective = 116580.721114
Iteration: 280974 Objective = 116580.706837
Iteration: 281604 Objective = 116580.681823
Iteration: 281956 Objective = 116580.669604
Iteration: 282403 Objective = 116580.652078
Iteration: 282821 Objective = 116580.635117
Iteration: 283378 Objective = 116580.608515
Iteration: 283978 Objective = 116580.580776
Iteration: 284420 Objective = 116580.559240
Iteration: 284852 Objective = 116580.539810
Iteration: 285399 Objective = 116580.519041
Iteration: 285956 Objective = 116580.494665
Iteration: 286452 Objective = 116580.474831
Iteration: 286692 Objective = 116580.465402
Iteration: 287041 Objective = 116580.450311
Iteration: 287572 Objective = 116580.424708
Iteration: 287868 Objective = 116580.411702
Iteration: 288505 Objective = 116580.388168
Iteration: 289140 Objective = 116580.361218
Iteration: 289798 Objective = 116580.334312
Iteration: 290222 Objective = 116580.319378
Iteration: 290768 Objective = 116580.279721
Iteration: 291294 Objective = 116580.242390
Iteration: 292103 Objective = 116580.205592
Iteration: 292581 Objective = 116580.182532
Iteration: 292833 Objective = 116580.171401
Iteration: 293222 Objective = 116580.153825
Iteration: 293778 Objective = 116580.129474
Elapsed time = 736.33 sec. (294000 iterations).
Iteration: 294390 Objective = 116580.104534
Iteration: 295139 Objective = 116580.077695
Iteration: 295445 Objective = 116580.064760
Iteration: 295885 Objective = 116580.047234
Iteration: 296373 Objective = 116580.023502
Iteration: 296883 Objective = 116580.006060
Iteration: 297198 Objective = 116579.995917
Iteration: 297724 Objective = 116579.977994
Iteration: 298218 Objective = 116579.960515
Iteration: 298714 Objective = 116579.940190
Iteration: 299223 Objective = 116579.910328
Iteration: 299793 Objective = 116579.879990
Iteration: 300242 Objective = 116579.857785
Iteration: 300813 Objective = 116579.831072
Iteration: 301113 Objective = 116579.818422
Iteration: 301792 Objective = 116579.791563
Iteration: 302290 Objective = 116579.770779
Iteration: 302832 Objective = 116579.746211
Iteration: 303260 Objective = 116579.731585
Iteration: 303819 Objective = 116579.696365
Iteration: 304518 Objective = 116579.657649
Iteration: 305001 Objective = 116579.635293
Iteration: 305627 Objective = 116579.612551
Iteration: 306296 Objective = 116579.583928
Iteration: 306648 Objective = 116579.570885
Iteration: 307038 Objective = 116579.552703
Iteration: 307473 Objective = 116579.518032
Iteration: 308031 Objective = 116579.457977
Iteration: 308521 Objective = 116579.424857
Iteration: 309171 Objective = 116579.392440
Iteration: 309763 Objective = 116579.364982
Iteration: 310144 Objective = 116579.348874
Iteration: 310842 Objective = 116579.318396
Iteration: 311506 Objective = 116579.287691
Iteration: 312150 Objective = 116579.261760
Elapsed time = 746.78 sec. (313000 iterations).
Iteration: 313116 Objective = 116579.213748
Iteration: 313496 Objective = 116579.195365
Iteration: 314106 Objective = 116579.171282
Iteration: 314515 Objective = 116579.155003
Iteration: 315240 Objective = 116579.118672
Iteration: 315608 Objective = 116579.105238
Iteration: 316178 Objective = 116579.079150
Iteration: 316906 Objective = 116579.050209
Iteration: 317380 Objective = 116579.028232
Iteration: 318081 Objective = 116579.002992
Iteration: 318572 Objective = 116578.981425
Iteration: 319330 Objective = 116578.950894
Iteration: 319891 Objective = 116578.931313
Iteration: 320345 Objective = 116578.916338
Iteration: 321073 Objective = 116578.882251
Iteration: 321412 Objective = 116578.870311
Iteration: 322055 Objective = 116578.847924
Iteration: 322647 Objective = 116578.827075
Iteration: 323111 Objective = 116578.783423
Iteration: 323666 Objective = 116578.731815
Iteration: 324525 Objective = 116578.679307
Iteration: 325153 Objective = 116578.649132
Iteration: 325514 Objective = 116578.632009
Iteration: 325995 Objective = 116578.612488
Iteration: 326387 Objective = 116578.597905
Iteration: 326963 Objective = 116578.577028
Iteration: 327306 Objective = 116578.563921
Iteration: 327806 Objective = 116578.546663
Iteration: 328256 Objective = 116578.527470
Iteration: 328569 Objective = 116578.514994
Iteration: 329004 Objective = 116578.500050
Iteration: 329534 Objective = 116578.480047
Iteration: 330035 Objective = 116578.461987
Iteration: 330484 Objective = 116578.444939
Elapsed time = 756.78 sec. (331000 iterations).
Iteration: 331449 Objective = 116578.407799
Iteration: 332107 Objective = 116578.381233
Iteration: 332904 Objective = 116578.350810
Iteration: 333415 Objective = 116578.328744
Iteration: 333935 Objective = 116578.307229
Iteration: 334349 Objective = 116578.292384
Iteration: 334957 Objective = 116578.270416
Iteration: 335584 Objective = 116578.249947
Iteration: 336061 Objective = 116578.232955
Iteration: 336601 Objective = 116578.214064
Iteration: 337170 Objective = 116578.165392
Iteration: 337606 Objective = 116578.100151
Iteration: 337940 Objective = 116578.081300
Iteration: 338410 Objective = 116578.060852
Iteration: 338949 Objective = 116578.040176
Iteration: 339524 Objective = 116578.017214
Iteration: 340020 Objective = 116577.996659
Iteration: 340371 Objective = 116577.980130
Iteration: 340944 Objective = 116577.958609
Iteration: 341648 Objective = 116577.931787
Iteration: 342431 Objective = 116577.898916
Iteration: 342901 Objective = 116577.879601
Iteration: 343409 Objective = 116577.856559
Iteration: 343986 Objective = 116577.834385
Iteration: 344762 Objective = 116577.802805
Iteration: 345570 Objective = 116577.767657
Iteration: 346220 Objective = 116577.743208
Iteration: 346749 Objective = 116577.722908
Iteration: 347260 Objective = 116577.701498
Iteration: 347910 Objective = 116577.678900
Iteration: 348421 Objective = 116577.659027
Iteration: 348801 Objective = 116577.644443
Iteration: 349248 Objective = 116577.622033
Iteration: 349847 Objective = 116577.560482
Elapsed time = 767.22 sec. (350000 iterations).
Iteration: 350479 Objective = 116577.524495
Iteration: 351086 Objective = 116577.490988
Iteration: 351464 Objective = 116577.467232
Iteration: 352210 Objective = 116577.437726
Iteration: 352804 Objective = 116577.413578
Iteration: 353182 Objective = 116577.398324
Iteration: 353900 Objective = 116577.371071
Iteration: 354425 Objective = 116577.353083
Iteration: 354976 Objective = 116577.334530
Iteration: 355501 Objective = 116577.314920
Iteration: 355870 Objective = 116577.302482
Iteration: 356478 Objective = 116577.279729
Iteration: 356864 Objective = 116577.268314
Iteration: 357262 Objective = 116577.257414
Iteration: 357666 Objective = 116577.245360
Iteration: 358076 Objective = 116577.233927
Iteration: 358867 Objective = 116577.210046
Iteration: 359570 Objective = 116577.187732
Iteration: 360314 Objective = 116577.161434
Iteration: 360843 Objective = 116577.140618
Iteration: 361453 Objective = 116577.109956
Iteration: 362107 Objective = 116577.072096
Iteration: 362640 Objective = 116577.049603
Iteration: 362986 Objective = 116577.034091
Iteration: 363583 Objective = 116577.012159
Iteration: 363952 Objective = 116577.000622
Iteration: 364351 Objective = 116576.983815
Iteration: 364813 Objective = 116576.968666
Iteration: 365478 Objective = 116576.946620
Iteration: 366182 Objective = 116576.923514
Iteration: 366632 Objective = 116576.910270
Iteration: 367109 Objective = 116576.897959
Iteration: 367783 Objective = 116576.874995
Iteration: 368260 Objective = 116576.857925
Iteration: 368766 Objective = 116576.837634
Elapsed time = 777.73 sec. (369000 iterations).
Iteration: 369333 Objective = 116576.815867
Iteration: 370071 Objective = 116576.788130
Iteration: 370878 Objective = 116576.759426
Iteration: 371413 Objective = 116576.726667
Iteration: 372054 Objective = 116576.681162
Iteration: 372569 Objective = 116576.656608
Iteration: 372949 Objective = 116576.636508
Iteration: 373491 Objective = 116576.617699
Iteration: 374206 Objective = 116576.588207
Iteration: 374808 Objective = 116576.566696
Iteration: 375310 Objective = 116576.547756
Iteration: 376043 Objective = 116576.521560
Iteration: 376635 Objective = 116576.500529
Iteration: 377288 Objective = 116576.480874
Iteration: 377871 Objective = 116576.463020
Iteration: 378310 Objective = 116576.447519
Iteration: 378683 Objective = 116576.435398
Iteration: 379213 Objective = 116576.417662
Iteration: 379683 Objective = 116576.401403
Iteration: 380216 Objective = 116576.383936
Iteration: 380744 Objective = 116576.354703
Iteration: 381181 Objective = 116576.326147
Iteration: 381633 Objective = 116576.298305
Iteration: 382152 Objective = 116576.279840
Iteration: 382550 Objective = 116576.264276
Iteration: 383060 Objective = 116576.245939
Iteration: 383622 Objective = 116576.222773
Iteration: 384252 Objective = 116576.199167
Iteration: 384869 Objective = 116576.176159
Iteration: 385316 Objective = 116576.162795
Iteration: 385994 Objective = 116576.141554
Iteration: 386851 Objective = 116576.108937
Elapsed time = 787.73 sec. (387000 iterations).
Iteration: 387400 Objective = 116576.094295
Iteration: 387824 Objective = 116576.081723
Iteration: 388284 Objective = 116576.065960
Iteration: 388904 Objective = 116576.046784
Iteration: 389313 Objective RajFri, 15 Sep 2017 09:23:25 -0400http://www.or-exchange.com/questions/14989/how-to-deal-with-degeneracy-in-large-lp-problembarriercplexlpdegeneracysolving .mod models with cplexhttp://www.or-exchange.com/questions/14923/solving-mod-models-with-cplex<p>I am generating .mod models which I need to solve in batch mode. If I use
oplrun
then I cannot get intermediate (i.e., feasible but not optimal) results.
So I thought of using
oplrun -e model.mod
which exports it to a .lp file, and then I can use cplex, which does support printing intermediate results.
The problem I have is that when running
oplrun -e model.mod
it does not exports and quits, rather it exports and continues to solve the model. Is there any way to only translate .mod to .lp (or some other format that cplex supports) ? </p>oferSun, 20 Aug 2017 00:32:21 -0400http://www.or-exchange.com/questions/14923/solving-mod-models-with-cplexcplexoprunInterpreting the output of cplex - variable names and precision.http://www.or-exchange.com/questions/14919/interpreting-the-output-of-cplex-variable-names-and-precision<p>Two questions about the output that Cplex generates (I am seeing this in the intermediate solution files, e.g. pref-00001.sol):</p>
<p>A. Cplex renames variables, and I need to know if this is avoidable, and what is the meaning of this.
so, for example
"a1"
became
"a1#0"
in the output file, </p>
<p>and "Ex_094141_A"
became
"_Ex_094141_A#40"
(note the additional '_' in the beginning.)
Are these the original variables, renamed, or something else ? </p>
<p>B. I am getting as part of the output a value e.g., "5.999999999..." for a variables that is defined as an integer. This upsets my post-processing of the solution. Any remedy ? </p>oferThu, 17 Aug 2017 23:16:31 -0400http://www.or-exchange.com/questions/14919/interpreting-the-output-of-cplex-variable-names-and-precisioncplexWriting constraint for a tuplehttp://www.or-exchange.com/questions/14853/writing-constraint-for-a-tuple<p>I have defined the following tuple:</p>
<pre><code>tuple capacity3
{
int sup; // varies from 1 to 5
int comp; // varies from 1 to 3
int peri; // varies from 1 to 6
int val3; // values corresponding to sup, comp, peri
}
{capacity3} aa=...;
I have written my tuple as
aa={<1,1,1,620>,<1,1,2,610>,<1,1,3,630>,<1,1,4,620>,<1,1,5,640>,<1,1,6,630>, ...and so on.
</code></pre>
<p>Now I have the following constraint;</p>
<pre><code>forall(i in I, c in C, p in P)
sum(j in J)X[i][j][c][p]<= RHS
</code></pre>
<p>At RHS, I need to write the value defined as val3 (620, 610 ....) in tuple corresponding to specific i,c and p which are defined as sup, comp and peri in my tuple.</p>
<p>How will I write my constraint i.e. value in pace of RHS ? or I am going wrong elsewhere also?</p>
<p>I am new to CPLEX.</p>ManjotSun, 16 Jul 2017 10:29:36 -0400http://www.or-exchange.com/questions/14853/writing-constraint-for-a-tupleoplor-communitycplexformulationsCPLEX Nondeterministichttp://www.or-exchange.com/questions/14751/cplex-nondeterministic<p>Hello everyone, I’m using docplex, CPLEX library for python to solve ILP models, whereas I realized feeding the same model to CPLEX does not necessarily guarantee to return the same result. Even the worse, sometimes it returns me no feasible solution. Any idea on why CPLEX being so nondeterministic? Thanks a lot in advance.</p>NNINGFri, 30 Dec 2016 17:46:43 -0500http://www.or-exchange.com/questions/14751/cplex-nondeterministiccplexArbitrage LPhttp://www.or-exchange.com/questions/14664/arbitrage-lp<p>Hello,</p>
<p>I am trying to finish a model of arbitrage calculation for a project. I have written the mathematical modelling and trying to make it work through CPLEX ILOG. You can find both Mathematical Model and inital code I wrote in the attachments.</p>
<p>Basically I have to make a working model that start with any currency and leaves the system returning to the same currency and creating an arbitrage value if there is any.</p>
<p>At first I though I can solve it as many times as there is currency and take the maximum arbitrage value but that is not efficient at all. To solve this issue I have introduced a dummy currency in the beginning. This dummy currency has 1-1 exchange rate with all the other currencies. It starts via going to any currency and returns to the dummy currency only by the currency it has entered. (To prevent issues such as from dummy currency to GBP, then GBP to JPY and JPY to Dummy creating a non-existen arbitrage value I introduced a boolean that states y[0][i] == y[i][0] for all i ensuring that dummy can enter and leave through a single currency).</p>
<p>You can find simple arbitrage calculations starting from a predetermined currecny but I couldn't find too much information about modelling for all possible currencies. (The single model just maximizes inflow-outflow to initial node for any of those who are interested)</p>
<p>Whenever I run the code cplex returns me a trivial solutions. Is the problem at my code or at my mathematical model? </p>
<p>Thank you for all your help!</p>
<p><a href="https://www.dropbox.com/sh/cwm8amp3x3glbgd/AAAF1lN1soYJZS64NaWPemqZa/OR?dl=0">https://www.dropbox.com/sh/cwm8amp3x3glbgd/AAAF1lN1soYJZS64NaWPemqZa/OR?dl=0</a> </p>OR-EnthusiastSat, 17 Dec 2016 19:02:51 -0500http://www.or-exchange.com/questions/14664/arbitrage-lplinear-programmingmathematical-modelingilogcplexSolving a Sequence of Similar IPshttp://www.or-exchange.com/questions/14433/solving-a-sequence-of-similar-ips<p>Hello,</p>
<p>I am solving multi IPs in a sequence, each of them differing only in a few constraints and objective coefficients. Technically it's a mixed-IP, but all of the important decision variables are all Boolean, while the couple of nonBoolean ones are tied to the Boolean ones (e.g. nonBoolean is the weighted sum of some Boolean variables) and serve to encodes a few constraints. </p>
<p>What could one do to speed up the process, given that the IPs are somewhat similar? I thought about using warm starts, although c++ concert technology for cplex does not allow warm starts for Boolean variables (I could change my Booleans to be IloNums and constraining the value between 0 and 1, though).</p>EmirMon, 28 Nov 2016 04:19:42 -0500http://www.or-exchange.com/questions/14433/solving-a-sequence-of-similar-ipscplex-concert-technologymipilocplexconcert-technologycplexFeeding lower bounds as >= constraints to MIP solvers...http://www.or-exchange.com/questions/14393/feeding-lower-bounds-as-constraints-to-mip-solvers<p>Given a MIP problem that aims at minimizing some objective function [actually: think of the TSP] and some lower bound that's valid for all optimal solutions: for what (technical?) reason[s] wouldn't you feed this bound as ">=" constraint to your [favo(u)rite] MIP solver [Gurobi, CPLEX, ...]?</p>fbahrTue, 15 Nov 2016 15:13:24 -0500http://www.or-exchange.com/questions/14393/feeding-lower-bounds-as-constraints-to-mip-solversmipgurobimixed-integer-programmingtspcplexAdding Variables or Modifying Existing Constraints During Callbacks with Cplex (C++)http://www.or-exchange.com/questions/14311/adding-variables-or-modifying-existing-constraints-during-callbacks-with-cplex-c<p>I am trying to implement an optimization algorithm using cplex C++ Concert Technology and I have two questions:</p>
<p>1) Is it possible to use a callback (e.g. a lazy constraint) to <em>change</em> an existing constraint of the problem? From what I understand this is not possible, but I am wondering if there is a work around.</p>
<p>2) Can I add new variables to the model with a callback? Encoding some constraints in my lazy constraint callback would be much more convenient if I could define helper variables. Similar as before, I think it is not possible, but perhaps there are some alternatives.</p>
<p>In short, during the callback I can learn some information about the problem and based on this I would like to add some constraints. I have a constraint b = b1 + b2 + .... , but there are exponentially many bi plus I do not know all of them in advance. However, every time I compute a feasible solution I could add one of the bi to the sum that defines b. Clearly there can be a memory blowup here, but I am hoping that I will find a suitable solution before that happens.</p>
<p>p.s. One solution that I have is that I can simply abort the current solving, add and modify the constraints, and then call solve() again. This is one possibility, but I assume there is a better way.</p>
<p>Thank you in advance!</p>EmirThu, 20 Oct 2016 13:42:48 -0400http://www.or-exchange.com/questions/14311/adding-variables-or-modifying-existing-constraints-during-callbacks-with-cplex-ccplex-concert-technologycallbackcplexc++CPLEX Infeasible rowhttp://www.or-exchange.com/questions/14285/cplex-infeasible-row<p>I am building a CPLEX model (VRP-like). In one of the model constraints I am forcing an initial flow from the depot to the each one of the different sets of customers I have, at least, sufficient to cope with the demands of the customers of the sets.</p>
<p>As such, say I have <code>n</code> different <code>I[i]</code> sets, with <code>i = 1..n</code>. And then, for each <code>I[i]</code> the sum of the arcs leaving the depot to each one of the elements in <code>I[i]</code> shall count as the capacity of a truck, say <code>Q</code>, if the arc is traversed. Hence, the aforementioned sum shall be greater or equal to the sum of the demands, say <code>d[I[i][j]]</code> for each one of the customers <code>j</code> in <code>I[i]</code> to ensure enough trucks will enter the set <code>I[i]</code>.</p>
<p>In other "words": <code>\sum_{j\in I_i} {Q*x_{0, j}}\geq\sum_j\in I_i{d_j}</code>. If I export the CPLEX model I have those constraints, e.g.</p>
<pre><code>V.1.FlowCreation_a(1)#1484: 600000 ArcRouting(2)(1)(1)(44)#17223
+ 600000 ArcRouting(2)(1)(1)(45)#17225
+ 600000 ArcRouting(2)(2)(1)(44)#17229
+ 600000 ArcRouting(2)(2)(1)(45)#17231
+ 600000 ArcRouting(2)(3)(1)(44)#17235
+ 600000 ArcRouting(2)(3)(1)(45)#17237
+ 600000 ArcRouting(2)(4)(1)(44)#17241
+ 600000 ArcRouting(2)(4)(1)(45)#17243
+ 600000 ArcRouting(2)(5)(1)(44)#17247
+ 600000 ArcRouting(2)(5)(1)(45)#17249
+ 600000 ArcRouting(2)(6)(1)(44)#17253
+ 600000 ArcRouting(2)(6)(1)(45)#17255
+ 600000 ArcRouting(2)(7)(1)(44)#17259
+ 600000 ArcRouting(2)(7)(1)(45)#17261
+ 600000 ArcRouting(2)(8)(1)(44)#17265
+ 600000 ArcRouting(2)(8)(1)(45)#17267
+ 600000 ArcRouting(2)(9)(1)(44)#17271
+ 600000 ArcRouting(2)(9)(1)(45)#17273
+ 600000 ArcRouting(2)(10)(1)(44)#17277
+ 600000 ArcRouting(2)(10)(1)(45)#17279
>= 12000
</code></pre>
<p>The first dimension on the <code>ArcRouting(..)(..)(..)(..)</code> variables describes the number of the set of elements, 2 in that case, the second one the vehicle number, ranging from 1 to 10, while the third describes the departure node, and the fourth one the arrival node. That is why the third one is always 1, since node 0 is renamed as 1 during the LP exportation, and the fourth one only contains 44 and 45 since that specific set only contains a couple of elements.</p>
<p>As you can notice, it suffices that an arc be set to one (regardless of the vehicle used or customer from <code>I[2]</code> to visit) to meet the constraint, since, one truck could deliver up to 600.000 units while customers' joint demand is only 12.000 units.</p>
<p>The problem is that when I try to solve the model I get the following error:</p>
<pre><code>Warning: Control callbacks may disable some MIP features.
Lazy constraint(s) or lazy constraint callback is present.
Disabling dual reductions (CPX_PARAM_REDUCE) in presolve.
Disabling non-linear reductions (CPX_PARAM_PRELINEAR) in presolve.
Infeasibility row 'V.1.FlowCreation_a[1]': 0 >= 12000.
Presolve time = 0.08 sec. (20.62 ticks)
Root node processing (before b&c):
Real time = 0.09 sec. (21.15 ticks)
Sequential b&c:
Real time = 0.00 sec. (0.00 ticks)
------------
Total (root+branch&cut) = 0.09 sec. (21.15 ticks)
</code></pre>
<p>What is the <code>Infeasibility row 'V.1.FlowCreation_a[1]': 0 >= 12000</code>. letting me know of my model that I don't fully understand?</p>JackobianFri, 14 Oct 2016 13:44:34 -0400http://www.or-exchange.com/questions/14285/cplex-infeasible-rowmilpcplexc++Trouble in retrieving dual values in an LPhttp://www.or-exchange.com/questions/14244/trouble-in-retrieving-dual-values-in-an-lp<p>Hi everybody,
I'm a beginner in Cplex trying to solve a problem (linear programming) to get dual values related to the constraints so as to use those values for the next application. My preliminary search reveals that we can get the dual values by using cplex.getDuals() function. I also understand that a prerequisite to use getDuals() is to write the constraints using IloRangeArray(). I have applied these in my problem context as follows: </p>
<pre><code>IloModel model(env);
IloRangeArray constraints(env, Nb_constraints); // Nb_constraints are total number of constraints
// data input
// a sample constraint is given as
for( .. ){
for( .. ){
for( .. ){
constraints.add(sum_food_inv <= capacity[s][w] * Delta_wh_hire_contract[s][w]);
}
}
}
model.add(constraints);
.
.
cplex.solve();
double vals[Nb_constraints]; // this is the array which stores the dual values.
for(int c=0; c<Nb_constraints; c++)
cplex.getDual(constraints[c]);
</code></pre>
<p>However, with this code though the program is able to solve the LP, it is unable to produce the dual values. Can anybody help me out to understand where am I going wrong with the code? </p>
<p>I greatly appreciate any help in this regards. </p>AjinkyaMon, 03 Oct 2016 06:47:48 -0400http://www.or-exchange.com/questions/14244/trouble-in-retrieving-dual-values-in-an-lplinear-programmingilocplexcplexdualProblem with Heuristic Callback - Reading Incumbent Solutionhttp://www.or-exchange.com/questions/14222/problem-with-heuristic-callback-reading-incumbent-solution<p>Hello,</p>
<p>I'm having troubles understanding how to get the values of the incumbent solution in a heuristic callback and I would be very grateful if someone could help me. It's been troubling me for hours and I see no way to solve the problem on my own. I suspect it has a simple solution, probably related to basic cplex usage.</p>
<p>To illustrate my problem I took the example of a heuristic callback given in iloadmipex2.cpp (C++ implementation). I receive the error message "Concert exception caught: The referenced IloExtractable has not been extracted by the IloAlgorithm", but I "know" that the variables are in the model as without the callback the code works fine. Please take a look at the (pseudo) code below. For simplicity I omit the function that reads input data from my file (can provide it if needed). </p>
<pre><code>//THIS IS THE EXAMPLE GIVEN IN iloadmipex2.cpp
// I changed the parameter from IloNumVarArray to IloBoolVarArray
ILOHEURISTICCALLBACK1(Rounddown, IloBoolVarArray, vars) {
IntegerFeasibilityArray feas;
IloNumArray obj;
IloNumArray x;
try {
feas = IntegerFeasibilityArray(getEnv());
obj = IloNumArray(getEnv());
x = IloNumArray(getEnv());
getFeasibilities(feas, vars); //HERE IS WHERE THE EXCEPTION/ERROR IS THROWN
getObjCoefs (obj , vars);
getValues (x , vars);
IloNum objval = getObjValue();
IloInt cols = vars.getSize();
for (IloInt j = 0; j < cols; j++) {
// Set the fractional variable to zero and update the objective value
if ( feas[j] == Infeasible ) {
objval -= x[j] * obj[j];
x[j] = 0.0;
}
}
setSolution(vars, x, objval);
}
catch (...) {
feas.end();
obj.end();
x.end();
throw;
}
feas.end();
obj.end();
x.end();
}
//MY CODE STARTS HERE
int main(){
IloEnv env;
try{
IloModel model(env);
IloBoolVarArray X(env, pd._n_sets+1);
//read the data via my method - not important for the problem
problem_description pd = readInstance("benchmarks\\scp4x\\scp41.txt");
//build the model - I think this is not so important
for(int i = 0; i < pd._n_variables; i++){
IloBoolExpr exp(env);
for(unsigned int j = 0; j < pd._cover_info[i].size(); j++){
exp += X[pd._cover_info[i][j]];
}
model.add(exp >= k);
}
IloIntExpr obj(env);
for(int i = 0; i < pd._n_sets; i++){
obj += X[i+1];
}
model.add(IloMinimize(env, obj));
IloCplex cplex(model);
//IF I COMMENT OUT THIS cplex.use LINE IT WORKS AS EXPECTED
cplex.use(Rounddown(env, X));
cplex.setParam(IloCplex::Threads, 1);
cplex.setParam(IloCplex::MIPSearch, 1); //use traditional branch and cut
cplex.solve();
cout << "Objective value: " << cplex.getObjValue() << endl;
for(int i = 1; i <= pd._n_sets; i++){
cout << i << ": " << cplex.getValue(X[i]) << endl;
}
env.end();
system("pause");
}
catch (IloException& e) {
cerr << "Concert exception caught: " << e << endl;
}
catch (...) {
cerr << "Unknown exception caught" << endl;
}
return 0;
}
</code></pre>
<p>Even if I create a global pointer to X, and pass it in the callback, it still reports an error. Perhaps it has something to do with the fact that cplex does preprocessing, but still without the callback it works as expected. It is very puzzling for me. I would very much appreciate your help.</p>EmirWed, 28 Sep 2016 18:04:43 -0400http://www.or-exchange.com/questions/14222/problem-with-heuristic-callback-reading-incumbent-solutionilocplexconcert-technologycplexc++iloextracableinitializing parameter in Cplex concert technology C++http://www.or-exchange.com/questions/14220/initializing-parameter-in-cplex-concert-technology-c<p>In my problem, N = set of nodes, s Є N = index used for sources, d Є N = index used for destinations.
Zsd = 1 , if the path between (s )and (d ) is disrupted. The problem has to be iterated (w) times. I have to initialize one notation in cplex c++ concert technology. The notaion is
Zw = {(s,d) Є NXN|Zsdw = 1}:indices for disrupted flows in at iteration (w).
I am not able to initialize for (Zw). Thanks for any help.</p>deygirishTue, 27 Sep 2016 07:43:08 -0400http://www.or-exchange.com/questions/14220/initializing-parameter-in-cplex-concert-technology-cconcert-technologycplexc++Constraint formulationhttp://www.or-exchange.com/questions/14207/constraint-formulation<p>Hello,</p>
<p>My problem consists to determine the exact period of patient treatment.
The duration of period is 30 minutes.</p>
<pre><code>Indices:
P patients
T periods
M doctor
Parameter:
dur[p] : the treatment duration of patient p
Decision Variables
Occup[m][t] {1: if a doctor is available at period t, 0:else}
Trait[p][t]:{1: If patient p is treated at period t, 0:else}
</code></pre>
<p>=> A patient is treated once on T periods.</p>
<p>I have this constraint:</p>
<p>At period t, if the sum of patient "p" treatment time with patients' treatment time to come before him does not exceed 30 minutes then
Trait[p][t]=1 else
Trait[p][t]=0</p>
<p>The formulation of constraint on CPLEX opl is</p>
<pre><code> forall(m in doctors, t in periods)
sum(p in 1..P)(dur[p]*Trait[p][t])<=30*Occup[m][t];
</code></pre>
<p>My problem when i add another constraint some patients will not treated at the exact period.</p>
<p>My question is: how can I force this constraint to determine the exact treatment period.</p>
<p>Best regards</p>lollaMon, 19 Sep 2016 12:17:40 -0400http://www.or-exchange.com/questions/14207/constraint-formulationlinear-programmingcplexconstraintHow to declare a decision vector in OPL/CPLEX with varying range indexes.http://www.or-exchange.com/questions/14195/how-to-declare-a-decision-vector-in-oplcplex-with-varying-range-indexes<p>I would like to define a decision vector xij in OPL such that the range of index j is dependent on index i. This is, for i in I, j assumes a value in a range f(i)..J.</p>AnselmoWed, 14 Sep 2016 15:32:41 -0400http://www.or-exchange.com/questions/14195/how-to-declare-a-decision-vector-in-oplcplex-with-varying-range-indexesoplvariablesdecisioncplexLP is taking too long time to solvehttp://www.or-exchange.com/questions/14123/lp-is-taking-too-long-time-to-solve<p>Problem is having 480000 columns and 68000 Rows. Model is combination of Set partioning and Flow model. I tried methods available solving LP in Cplex using parameter cplex.lpmethod. All methods are taking more than 1 hour.Dear OR Experts, Could you please help me to solve this LP problem faster in cplex?</p>Amit SarkarThu, 18 Aug 2016 10:12:33 -0400http://www.or-exchange.com/questions/14123/lp-is-taking-too-long-time-to-solvelinear-programmingoperations-researchcplexGAMS- nonconvex quadratic programminghttp://www.or-exchange.com/questions/14073/gams-nonconvex-quadratic-programming<p>I have a Mixed Integer Quadratic problem that is coded by GAMS software. (non convex quadratic objective function with linear constraints- product of two continuous variables in the objective function makes it non convex) I have confronted with two serious problems after running the model and ask you for help:</p>
<p>1- first,I use to solve my problem using CPLEX solver by setting optimality target as 3, but unfortunately the solution returned by the GAMS is not feasible, however Cplex reports Gap!!!! and it seems that some of constraints are not considered in the presented solution.(it is remarkable that the model had a time limitation.) is it possible that the GAMS software returns an infeasible solution?and what is the reason of this happening?</p>
<p>2-secondly, I used to solve the problem using Baron solver. I got "the problem is infeasible" error..but when I deleted the quadratic term of objective function which makes it non convex , Baron could solve the problem without any error!!! does the problem feasiblity change by changing the objective function? would you please explain the reason and the way I can solve it..</p>m_bkSun, 31 Jul 2016 04:53:51 -0400http://www.or-exchange.com/questions/14073/gams-nonconvex-quadratic-programmingquadratic-programminggamscplex