<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I tried the code snippet below and get
the following error:<br>
<br>
<small><i>In member function ‘virtual void
WLCNLP::finalize_solution(Ipopt::SolverReturn, Ipopt::Index,
const Number*, const Number*, const Number*, Ipopt::Index,
const Number*, const Number*, Ipopt::Number, const
Ipopt::IpoptData*, Ipopt::IpoptCalculatedQuantities*)’:</i><i><br>
</i><i>error: invalid use of incomplete type ‘struct
Ipopt::IpoptCalculatedQuantities’</i><i><br>
</i><i>error: forward declaration of ‘struct
Ipopt::IpoptCalculatedQuantities’</i></small><br>
<br>
Can this be due to further missing #includes or what kind of
problem do I face here?<br>
<br>
Best,<br>
Knut.<br>
<br>
Am 17.01.2013 19:21, schrieb Hans Pirnay:<br>
</div>
<blockquote
cite="mid:CAAFw1P_E2mMMtrf6H_si-AJpqCeLGCbTDC6pRLoWicEDPKUUyQ@mail.gmail.com"
type="cite">
<pre wrap="">this should work:
SmartPtr<DenseVector> curr_grad = dynamic_cast<const
DenseVector*>(GetRawPtr(ip_cq->curr_grad_f()));
const double* grad_values = curr_grad->Values();
You'll probably have to #include "IpDenseVector.hpp" and maybe some
other dependencies.
Hans
On Thu, Jan 17, 2013 at 6:30 PM, Knut Heidemann <a class="moz-txt-link-rfc2396E" href="mailto:heidemannknut@gmail.com"><heidemannknut@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I am trying to access the objective function gradient information after my
problem has been solved.
I assume that this is done in finalize_solution(...).
Unfortunately, I do not manage to use "ip_cq" for this purpose. Can anybody
tell me how the appropriate line of code would look like?
Best regards,
Knut Heidemann.
_______________________________________________
Ipopt mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/ipopt">http://list.coin-or.org/mailman/listinfo/ipopt</a>
</pre>
</blockquote>
</blockquote>
<br>
</body>
</html>