Need to know significance of 'incumbent of value ' statement in results.

667 views
Skip to first unread message

Krishnendranath Mitra

unread,
Mar 28, 2016, 2:07:55 AM3/28/16
to AMPL Modeling Language
Hello,

I am getting two statements (highlighted in bold) while running a program in AMPL.
"Found incumbent of value 50.714154 after 10.48 sec. (2991.54 ticks)"  and "Tried aggregator 2 times".
I need to know what is the meaning of these statements? What is the meaning of the apteryx '*' after the 'incumbent' statement?
Although CPLEX states "CPLEX 12.6.1.0: optimal integer solution; objective 50.71415412", the solution seems to ignore a couple of constraints when the results are analyzed manually.
What can be the possible cause for this?
The result of my program is given below:

option randseed 2403337460;

Presolve eliminates 299 arithmetic and 289 logical constraints,

and 292 variables.

Substitution eliminates 96 variables.

96 piecewise-linear terms replaced by 672 variables and 672 constraints.

Adjusted problem:

2896 variables:

288 binary variables

2128 nonlinear variables

480 linear variables

1361 algebraic constraints, all linear; 17339 nonzeros

689 equality constraints

672 inequality constraints

1918 logical constraints

1 nonlinear objective; 0 nonzeros.

CPLEX 12.6.1.0: nodefile=3

mipdisplay=3

mipgap=0.005

memoryemphasis=1

conflictalg=1

fpheur=1

lbheur=1

mipemphasis=1

mipcuts=2

treememory=5000

MIP Presolve eliminated 45 redundant SOS constraints.

MIP Presolve eliminated 311 rows and 1525 columns.

MIP Presolve added 930 rows and 465 columns.

MIP Presolve modified 263 coefficients.

Reduced MIP has 2091 rows, 1484 columns, and 14494 nonzeros.

Reduced MIP has 465 binaries, 16 generals, 51 SOSs, and 271 indicators.

Probing fixed 31 vars, tightened 1129 bounds.

Probing time = 0.14 sec. (13.64 ticks)

Cover probing fixed 0 vars, tightened 186 bounds.

MIP Presolve eliminated 430 rows and 70 columns.

MIP Presolve modified 1094 coefficients.

Reduced MIP has 1621 rows, 1370 columns, and 13692 nonzeros.

Reduced MIP has 432 binaries, 16 generals, 51 SOSs, and 267 indicators.

Probing fixed 0 vars, tightened 402 bounds.

Probing time = 0.06 sec. (9.17 ticks)

Cover probing fixed 0 vars, tightened 130 bounds.

Clique table members: 1195.

MIP emphasis: integer feasibility.

MIP search method: dynamic search.

Parallel mode: deterministic, using up to 2 threads.

Root relaxation solution time = 0.16 sec. (50.41 ticks)

Nodes Cuts/

Node Left Objective IInf Best Integer Best Bound ItCnt Gap

0 0 -48.3308 368 -48.3308 996

0 0 5264.2608 179 Cuts: 505 1948

0 0 9574.8272 215 Cuts: 505 2523

0 0 11975.6161 224 Cuts: 505 2973

0 2 11975.6161 224 11975.6161 2973

Elapsed time = 3.52 sec. (1073.91 ticks, tree = 0.01 MB)

117 94 31970.5778 113 15386.8138 8218

416 339 29855.2452 77 15386.8138 12456

650 511 29669.5150 71 15386.8138 18698

773 619 34425.8478 37 15592.8383 23119

* 816+ 0 2864.7862 15592.8383 -444.29%

Found incumbent of value 2864.786188 after 10.44 sec. (2986.96 ticks)

* 816 0 integral 0 50.7142 15592.8383 26021 ---

Found incumbent of value 50.714154 after 10.48 sec. (2991.54 ticks)

GUB cover cuts applied: 6

Clique cuts applied: 85

Cover cuts applied: 12

Implied bound cuts applied: 80

Flow cuts applied: 99

Mixed integer rounding cuts applied: 491

Flow path cuts applied: 0

Zero-half cuts applied: 10

Lift and project cuts applied: 32

Gomory fractional cuts applied: 126

Disjunctive cuts applied: 0

Root node processing (before b&c):

Real time = 3.52 sec. (1061.80 ticks)

Parallel b&c, 2 threads:

Real time = 7.04 sec. (1929.81 ticks)

Sync time (average) = 0.34 sec.

Wait time (average) = 0.39 sec.

------------

Total (root+branch&cut) = 10.56 sec. (2991.61 ticks)

CPLEX 12.6.1.0: optimal integer solution; objective 50.71415412

26021 MIP simplex iterations

816 branch-and-bound nodes

Tried aggregator 2 times

No basis.


Thanks in advance.
Regards
KM.

Robert Fourer

unread,
Mar 28, 2016, 11:33:10 AM3/28/16
to am...@googlegroups.com
CPLEX does not ignore any constraints. If you think the solution returned by CPLEX is not satisfying some constraint, then (after solving) try the AMPL command

display yourConstr.slack;

except with the actual name of the constraint instead of "yourConstr". This will give you a table of constraint slacks, which should all theoretically be >= 0; but because CPLEX (like all solvers) tolerates very small infeasibilities, as long as the table contains only very small negative magnitudes, you can conclude that CPLEX has returned an acceptable solution.

If you do find large negative slacks, then to get further help, you will need to provide some files that we can use to reproduce the problem on our computers, along with a listing showing where you found the negative slacks.

"Found incumbent of value 2864.786188" means that CPLEX has found a new best solution (incumbent), and that the objective value of this solution is 2864.786188. Log lines where CPLEX found a new incumbent are marked with an asterisk (*). You can ignore "Tried aggregator 2 times" -- it just reports on a certain kind of simplification that CPLEX tries to make.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Krishnendranath Mitra
Sent: Monday, March 28, 2016 1:08 AM
To: AMPL Modeling Language
Subject: [AMPL 11658] Need to know significance of 'incumbent of value ' statement in results.

I am getting two statements (highlighted in bold) while running a program in AMPL.
"Found incumbent of value 50.714154 after 10.48 sec. (2991.54 ticks)" and "Tried aggregator 2 times".
I need to know what is the meaning of these statements? What is the meaning of the apteryx '*' after the 'incumbent' statement?

Although CPLEX states "CPLEX 12.6.1.0: optimal integer solution; objective 50.71415412", the solution seems to ignore a couple of constraints when the results are analyzed manually.
What can be the possible cause for this?
The result of my program is given below:

.......


Krishnendranath Mitra

unread,
Mar 29, 2016, 4:05:15 AM3/29/16
to AMPL Modeling Language, 4...@ampl.com
Sir,

Thank you for the explanation.

I have tried the .slack suffix as per your instructions but it's not working for my constraint.

The concerned constraint rengen1 is as follows:

subject to rengen1{t in time}:K1[t]=1 ==> p[t]>=pr[t] && E2[t]>=rg[t];   where K1 is a binary variable, p and E2 are variables and pr and rg are parameters.

Now as you can see form the results displayed below, at t=14(line displayed in bold), p>pr and E2>rg but K1 =0. However, K1 should be equal to 1 according to the constraint definition.

Is this because I am getting some near optimal solution instead of an optimal solution?
Can this constraint be made tighter so that value of K1 is definitely 1 when the said conditions are true? 

I am providing the relevant parts of the results below for your reference.

:   D           E1    E       E2     rg    K1   p             pr   s :=

1  82255    0.4   0.65   0.65  0.6  0     1.38627   2   73

.
.
.

13 155022  1.9  1.55   2.15  0.6  1     3.10011    2   17

14 102920  1.9  1.9     1.9    1.2  0     3.3646      2   20

15 29376    1.9  1.3     1.9    0.6  1     2.09688    2   62

.
.
.

ampl: display rengen1[14].slack;

Bad suffix .slack for rengen1

Possible suffix values for rengen1.suffix:

astatus derstage no sno

sstatus stage status val

ampl: display rengen1.slack;


The AMPL process terminates after this command.


Regards,
KM.

Robert Fourer

unread,
Mar 29, 2016, 6:49:23 PM3/29/16
to am...@googlegroups.com
Mostly the constraints that get sent to CPLEX are algebraic equalities and inequalities, for which slack is well-defined. However I didn't notice that your rengen1 constraint belongs to the one category of more general logical constraint that CPLEX recognizes (called an indicator constraint in CPLEX terminology):

subject to rengen1{t in time}: K1[t]=1 ==> p[t]>=pr[t] && E2[t]>=rg[t];

Logical operators connect several equalities and inequalities here, so the concept of constraint slack is not well defined. Thus you would have to write a display statement specifically to check this constraint; for example;

display {t in time: K1[t]=1} (p[t]-pr[t], E2[t]-rg[t]);

But in any case, this constraint only says that when K1[t] = 1, then p[t]>=pr[t] and E2[t]>=rg[t]. The converse statement is not so easy. At best you can say that when p[t]>pr[t] and E2[t]>rg[t], then K1[t] = 1, which can be enforced by two indicator constraints and another linear constraint, involving two more binary variables:

K1a[t] = 1 ==> p[t]<=pr[t]
K1b[t] = 1 ==> E2[t]<=rg[t]
K1[t] + K1a[t] + K1b[t] >= 1

However this doesn't extend to p[t]>=pr[t], E2[t]>=rg[t] unless the variables are integer-valued. (If you try to replace <= by < in the above two indicator constraints, then it will be rejected because then the optimization is not well-defined.)

Krishnendranath Mitra

unread,
Mar 30, 2016, 5:14:27 AM3/30/16
to AMPL Modeling Language, 4...@ampl.com
 Sir,

Thank you for your support.
I tried by breaking down the constraint in 3 parts as you suggested. These are shown below.

subject to rengen1a{t in time}:K1a[t] = 1 ==> p[t]<=pr[t];

subject to rengen1b{t in time}:K1b[t] = 1 ==> E2[t]<=rg[t];

subject to rengen1{t in time}:K1[t] + K1a[t] + K1b[t] >= 1;


However this still does not enforce the values of K1 and K1a with the said conditions. A part of the result display is given below for your reference.


For example, at t=1,3,14 &15,  p is less that pr and hence K1a should be 1 as per the constraint rengen1a, but it assumes a value of 0. Also, K1 is expected to be 0 in such a condition but it turns out to be 1.

Is there some other way for representing this logical constraint so as to ensure K1=1 exactly when p>pr AND E2>rg and K1=0 otherwise?

Also, please let me know if there is any solver available that can deal with non-linear and logical constraints?
Auto Generated Inline Image 1

Robert Fourer

unread,
Mar 30, 2016, 5:15:47 PM3/30/16
to am...@googlegroups.com
You need to keep your original indicator constraint regen1 to enforce

K1[t]=1 implies p[t]>=pr[t] and E2[t]>=rg[t]

and then *add* these three constraints to enforce

p[t]>pr[t] && E2[t]>rg[t] implies K1[t]=1

If you replace regen1 with these three constraints, then you will only get the second condition, which does not by itself do what you want.

There are some solvers that can with more general logical constraints; see http://ampl.com/resources/logic-and-constraint-programming-extensions/. Sometimes however you can get better performance by converting to a form that CPLEX (or another MIP solver) can handle.

Bob Fourer
4...@ampl.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Krishnendranath Mitra
Sent: Wednesday, March 30, 2016 4:14 AM
To: AMPL Modeling Language
Cc: 4...@ampl.com
Subject: Re: [AMPL 11686] Need to know significance of 'incumbent of value ' statement in results.

Thank you for your support.
I tried by breaking down the constraint in 3 parts as you suggested. These are shown below.

subject to rengen1a{t in time}:K1a[t] = 1 ==> p[t]<=pr[t];
subject to rengen1b{t in time}:K1b[t] = 1 ==> E2[t]<=rg[t];
subject to rengen1{t in time}:K1[t] + K1a[t] + K1b[t] >= 1;

However this still does not enforce the values of K1 and K1a with the said conditions. A part of the result display is given below for your reference.

Krishnendranath Mitra

unread,
Mar 31, 2016, 1:33:48 AM3/31/16
to AMPL Modeling Language, 4...@ampl.com
Thanks a lot.
It works perfectly this time. I understand the logic now.

Regards,
KM.
Reply all
Reply to author
Forward
0 new messages