[Ipopt] Lagrange multipliers for inequality (<=) constraints
Stefan Vigerske
stefan at math.hu-berlin.de
Mon Nov 7 09:01:37 EST 2016
Hi,
you should read lambda directly.
ip_data should refer to the internal representation of your problem,
where inequality constraints have been reformulated to equality
constraints (+ slack variables), so it might not be obvious what y_c()
or y_d() mean.
You can have a look at the documentation of intermediate_callback to get
some idea how to bring y_c() and y_d() into the TNLP space:
http://www.coin-or.org/Ipopt/documentation/node23.html#SECTION00053410000000000000
Hope that helps,
Stefan
On 10/28/2016 12:44 AM, Chunhua Men wrote:
> Hello,
>
> I have a convex model with some inequality (<=) nonlinear constraints. At
> the end of the optimization, I wanted to get the Lagrange multipliers for
> each constraint. I found out there were 2 ways within
> "finalize_solution(...)" to get them:
> 1) read "lambda" directly;
> 2) get from ip_data->curr()->y_d(). And I had to do some data transfer to
> get it - and what I did was "static_cast<const
> Ipopt::DenseVector*>(GetRawPtr(ip_data->curr()->y_c()))".
>
> However, these 2 methods could not give me the completely same results. In
> my case, there were 6 constraints: 3 of them were the same, and 3 of them
> were not.
>
> Did I do anything wrong? and what is the best way to get Lagrange
> multipliers? BTW, I am using " limited-memory" as "hessian_approximation",
> so I could not get Lagrange multipliers from "eval_h".
>
> Thanks! Chunhua
>
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_ipopt&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=8QCzuoqz-AgMGxJ-2JYYSS62sOzui1ScGc0vPaY2sJM&s=qrM6-XpdelsvZ3rS_QCzA2dHp6S7EvzsMi-Le1gguHw&e=
>
--
http://www.gams.com/~stefan
More information about the Ipopt
mailing list