<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>David,</DIV>
<DIV> </DIV>
<DIV>It’s difficult to tell why the Hessian evaluation is so time-consuming
without more detailed profiling of what ADOL-C is doing. You can try setting the
Ipopt option hessian_approximation to limited_memory, which can be less
expensive than evaluating the exact second derivatives but since it is only a
Quasi-Newton approximation Ipopt will likely require more iterations to
converge.</DIV>
<DIV> </DIV>
<DIV>Regarding complementarity problems, if there is a way to modify constraints
from iteration to iteration I wouldn’t expect Ipopt to perform very robustly. If
you’re only solving approximate problems based on a relaxation parameter, I
would think you don’t need an exact tight-tolerances solution to the approximate
problems in order to get a good starting point for the next outer iteration with
a lower relaxation parameter... could you terminate early after an iteration or
time limit or looser tolerance and still get a useful point?</DIV>
<DIV> </DIV>
<DIV>Your understanding on the complementarity-supporting version of Ipopt only
being implemented in Fortran matches what I know about it. You might want to
look into a more general-purpose solver like SCIP <A title=http://scip.zib.de/
href="http://scip.zib.de/">http://scip.zib.de/</A> or using a mixed-integer
formulation of the complementarity constraints with Bonmin/Couenne.</DIV>
<DIV> </DIV>
<DIV>-Tony</DIV>
<DIV> </DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=davegreer211@yahoo.co.uk
href="mailto:davegreer211@yahoo.co.uk">david greer</A> </DIV>
<DIV><B>Sent:</B> Tuesday, February 04, 2014 6:47 AM</DIV>
<DIV><B>To:</B> <A title=ipopt@list.coin-or.org
href="mailto:ipopt@list.coin-or.org">ipopt@list.coin-or.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Ipopt] complementarity constraints and changing bounds
duringsolver run</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV
style="FONT-SIZE: 14pt; FONT-FAMILY: helveticaneue, helvetica neue, helvetica, arial, lucida grande, sans-serif; COLOR: #000; BACKGROUND-COLOR: #fff">
<DIV id=yiv7714554081>
<DIV>
<DIV
style="FONT-SIZE: 14pt; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif; COLOR: rgb(0,0,0); BACKGROUND-COLOR: rgb(255,255,255)">
<DIV id=yiv7714554081>
<DIV id=yiv7714554081yui_3_13_0_ym1_1_1391422669068_68790>
<DIV id=yiv7714554081yui_3_13_0_ym1_1_1391422669068_68789
class=yiv7714554081yui_3_13_0_ym1_1_1391422669068_68707
style="FONT-SIZE: 14pt; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif; COLOR: rgb(0,0,0); BACKGROUND-COLOR: rgb(255,255,255)">
<DIV id=yiv7714554081>
<DIV id=yiv7714554081yui_3_13_0_ym1_1_1391422669068_66067>
<DIV id=yiv7714554081yui_3_13_0_ym1_1_1391422669068_66066
class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_65994 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68708"
style="FONT-SIZE: 14pt; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif; COLOR: rgb(0,0,0); BACKGROUND-COLOR: rgb(255,255,255)">
<DIV id=yiv7714554081>
<DIV id=yiv7714554081yui_3_13_0_ym1_1_1391422669068_61426>
<DIV id=yiv7714554081yui_3_13_0_ym1_1_1391422669068_61425
class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_61281 yiv7714554081yui_3_13_0_ym1_1_1391422669068_65995 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68709"
style="FONT-SIZE: 14pt; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif; COLOR: rgb(0,0,0); BACKGROUND-COLOR: rgb(255,255,255)">
<DIV id=yiv7714554081yui_3_13_0_ym1_8_1391422669068_8><SPAN
id=yiv7714554081yui_3_13_0_ym1_8_1391422669068_14>I think I've answered one of
my own questions - I made a small change to improve the scaling of my problem
formulation and the iteration count went down by a factor of about
10.</SPAN></DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_8_1391422669068_8
class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_61282 yiv7714554081yui_3_13_0_ym1_1_1391422669068_65996 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68710"
style="FONT-SIZE: 18px; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif; COLOR: rgb(0,0,0); FONT-STYLE: normal; BACKGROUND-COLOR: transparent"><SPAN
id=yiv7714554081yui_3_13_0_ym1_8_1391422669068_17><BR clear=none></SPAN></DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_8_1391422669068_8
class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_61283 yiv7714554081yui_3_13_0_ym1_1_1391422669068_65997 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68711"
style="FONT-SIZE: 18px; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif; COLOR: rgb(0,0,0); FONT-STYLE: normal; BACKGROUND-COLOR: transparent"><SPAN
id=yiv7714554081yui_3_13_0_ym1_8_1391422669068_20>I'm still worried about the
Lagrangian Hessian evaluation taking about 99% of the function evaluation time,
and about 85% of the overall runtime. The number of non-zero elements in
the Hessian is comparable to the NNZ of the constraint Jacobians, and I would
naively have thought that calculating each element would be a similar amount of
work so does this suggest that something very inefficient is happening in my
Hessian evaluation? </SPAN></DIV>
<DIV id=yiv7714554081yqt37746 class=yiv7714554081yqt3758111542>
<DIV id=yiv7714554081yqt41735 class=yiv7714554081yqt2985416680>
<DIV id=yiv7714554081yqt94583 class=yiv7714554081yqt2920318824>
<DIV id=yiv7714554081yqt86737 class=yiv7714554081yqt4454348467>
<DIV id=yiv7714554081yui_3_13_0_ym1_8_1391422669068_10
class=yiv7714554081yahoo_quoted style="DISPLAY: block"><BR clear=none><BR
clear=none>
<DIV
class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_59907 yiv7714554081yui_3_13_0_ym1_1_1391422669068_61285 yiv7714554081yui_3_13_0_ym1_1_1391422669068_65999 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68713"
style="FONT-SIZE: 14pt; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif">
<DIV
class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_59908 yiv7714554081yui_3_13_0_ym1_1_1391422669068_61286 yiv7714554081yui_3_13_0_ym1_1_1391422669068_66000 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68714"
style="FONT-SIZE: 12pt; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif">
<DIV dir=ltr><FONT size=2 face=Arial>On Tuesday, 4 February 2014, 8:47, david
greer <davegreer211@yahoo.co.uk> wrote:<BR clear=none></FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid; MARGIN-TOP: 5px">
<DIV class=yiv7714554081y_msg_container>
<DIV id=yiv7714554081>
<DIV>
<DIV
class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_59911 yiv7714554081yui_3_13_0_ym1_1_1391422669068_61289 yiv7714554081yui_3_13_0_ym1_1_1391422669068_66003 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68717"
style="FONT-SIZE: 14pt; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif; COLOR: rgb(0,0,0); BACKGROUND-COLOR: rgb(255,255,255)">
<DIV id=yiv7714554081>
<DIV>
<DIV
class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_59912 yiv7714554081yui_3_13_0_ym1_1_1391422669068_61290 yiv7714554081yui_3_13_0_ym1_1_1391422669068_66004 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68718"
style="FONT-SIZE: 14pt; FONT-FAMILY: helveticaneue, 'Helvetica Neue', helvetica, arial, 'Lucida Grande', sans-serif; COLOR: rgb(0,0,0); BACKGROUND-COLOR: rgb(255,255,255)">
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7>Hi,</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">first of all, thanks a
lot for providing such a powerful solver and continuing to maintain and
support it so actively.</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">I am trying to solve a
problem which contains many complementarity constraints, i.e. constraints of
the type</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">x >= 0</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">y >= 0</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">xy = 0</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">which I believe are
awkward for interior point solvers because the solution lies on the boundary
and the IP solver is trying to stay strictly inside a feasible region. A
well-known way to handle this issue is to replace the final constraint
with</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">xy <= t</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">for some small t which
is then driven to 0 as the solver progresses. Using this approach I have
been able to find solutions for successively smaller values of t in separate
solver runs, feeding in the solution from each run as the starting point for
the next run, but it is a large problem which takes quite some time to
converge and I was wondering if it would be possible to modify the value of t
during a single solver run, for example by reducing it when the barrier term
is lowered.</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">I believe there was a
modification to IPOPT called IPOPT-C which used this approach for
complementarity problems, but as I understand it IPOPT-C has not been
maintained for some time and was only available in fortran, which I would
prefer to avoid.</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">Is there a way to
change the value of a constraint bound (my current implementation has t as a
fixed upper bound) during execution, or some neat way to reformulate the
problem? I did wonder if it would be possible to do something like make
t a variable, fiddle with its derivatives so that the algorithm doesn't try to
modify it, and then overwrite its value during the intermediate_callback
function?</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
class=yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
class=yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">I am also interested in
improving performance. The solver seems to be progressing pretty
smoothly to a solution once it finds a feasible region, but appears to take a
rather large number of iterations (see
https://docs.google.com/document/d/14Ta84ggR4psvTzwpbpr0s26vAx7O0wB0Vca4voAt4m0/edit?usp=sharing
for example output). Might this indicate a problem with scaling?
If so, what is the easiest way to examine the scaling? I thought about
exporting the numerical values of the Hessian for one iteration and examining
them, but is there a better way? Previous threads regarding performance
on the mailing list often suggest using the derivative checker to test if the
derivatives are valid. I have not tried this yet, but the derivatives
all come from ADOL-C so I think they should be OK.</DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
class=yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"> </DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
class=yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent">Another performance
issue I want to look at is that the NLP function evaluation seems to be taking
a lot of the time. I used the <SPAN
id=yiv7714554081yui_3_13_0_ym1_1_1391358658671_30461
style="BACKGROUND-COLOR: transparent">print_timing_statistics option to
investigate further and found that almost all of the time is spent in the
Lagrangian Hessian evaluation. Is it possible to get any more detailed
information to identify if one particular section of that evaluation is
dominating the CPU time?</SPAN></DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
class=yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"><SPAN
style="BACKGROUND-COLOR: transparent"><BR clear=none></SPAN></DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
class=yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"><SPAN
id=yiv7714554081yui_3_13_0_ym1_1_1391358658671_30560
style="BACKGROUND-COLOR: transparent">Best wishes,</SPAN></DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
class=yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"><SPAN
style="BACKGROUND-COLOR: transparent"><BR clear=none></SPAN></DIV>
<DIV id=yiv7714554081yui_3_13_0_ym1_9_1390390848824_7
class=yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965
style="FONT-SIZE: 18px; BACKGROUND-COLOR: transparent"><SPAN
id=yiv7714554081yui_3_13_0_ym1_1_1391358658671_30559
style="BACKGROUND-COLOR: transparent">David</SPAN></DIV></DIV></DIV></DIV></DIV></DIV></DIV><BR
clear=none><BR
clear=none></DIV></BLOCKQUOTE></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV>
<P>
<HR>
_______________________________________________<BR>Ipopt mailing
list<BR>Ipopt@list.coin-or.org<BR>http://list.coin-or.org/mailman/listinfo/ipopt<BR></DIV></DIV></DIV></BODY></HTML>