<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14pt"><div id="yiv7714554081"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt;"><div id="yiv7714554081"><div id="yiv7714554081yui_3_13_0_ym1_1_1391422669068_68790"><div class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_68707" id="yiv7714554081yui_3_13_0_ym1_1_1391422669068_68789" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt;"><div id="yiv7714554081"><div id="yiv7714554081yui_3_13_0_ym1_1_1391422669068_66067"><div class="yiv7714554081yui_3_13_0_ym1_1_1391422669068_65994 yiv7714554081yui_3_13_0_ym1_1_1391422669068_68708"
id="yiv7714554081yui_3_13_0_ym1_1_1391422669068_66066" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt;"><div id="yiv7714554081"><div id="yiv7714554081yui_3_13_0_ym1_1_1391422669068_61426"><div 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" id="yiv7714554081yui_3_13_0_ym1_1_1391422669068_61425" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt;"><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 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" id="yiv7714554081yui_3_13_0_ym1_8_1391422669068_8" style="color: rgb(0, 0, 0); font-size: 18.88888931274414px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span id="yiv7714554081yui_3_13_0_ym1_8_1391422669068_17"><br clear="none"></span></div><div 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" id="yiv7714554081yui_3_13_0_ym1_8_1391422669068_8" style="color: rgb(0, 0, 0); font-size:
18.88888931274414px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><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 class="yiv7714554081yqt3758111542" id="yiv7714554081yqt37746"><div class="yiv7714554081yqt2985416680" id="yiv7714554081yqt41735"><div class="yiv7714554081yqt2920318824" id="yiv7714554081yqt94583"><div class="yiv7714554081yqt4454348467" id="yiv7714554081yqt86737"><div
class="yiv7714554081yahoo_quoted" id="yiv7714554081yui_3_13_0_ym1_8_1391422669068_10" 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-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt;"> <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-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <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="border-left:2px solid rgb(16, 16, 255);margin-left:5px;margin-top:5px;padding-left: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="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt;"><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="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
sans-serif; font-size: 14pt;"><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7">Hi,</div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7"><br clear="none"></div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;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:18.88888931274414px;background-color:transparent;"><br clear="none" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_17"></div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;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:18.88888931274414px;background-color:transparent;"><br clear="none" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_22"></div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;">x >= 0</div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;">y >= 0</div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;">xy = 0</div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;"><br clear="none" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_32"></div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;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:18.88888931274414px;background-color:transparent;"><br clear="none" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_37"></div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;">xy <= t</div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;"><br clear="none" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_42"></div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;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:18.88888931274414px;background-color:transparent;"><br clear="none" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_47"></div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;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:18.88888931274414px;background-color:transparent;"><br clear="none" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_51"></div><div id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;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 class="yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;"><br clear="none"></div><div
class="yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;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 class="yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;"><br clear="none"></div><div class="yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;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 class="yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;"><span style="background-color:transparent;"><br clear="none"></span></div><div class="yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;"><span id="yiv7714554081yui_3_13_0_ym1_1_1391358658671_30560" style="background-color:transparent;">Best wishes,</span></div><div class="yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7" style="font-size:18.88888931274414px;background-color:transparent;"><span style="background-color:transparent;"><br clear="none"></span></div><div class="yiv7714554081yui_3_13_0_ym1_1_1390390848824_166965" id="yiv7714554081yui_3_13_0_ym1_9_1390390848824_7"
style="font-size:18.88888931274414px;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></body></html>