Thanks for your answers, Stefan and Andreas.<br><br>Have a nice weekend<br><br>Wendel<br><br><div class="gmail_quote">2011/3/22 Andreas Waechter <span dir="ltr"><<a href="mailto:andreasw@watson.ibm.com">andreasw@watson.ibm.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<br>
I don't think that telling Ipopt which constraints are linear makes a difference at this point, Ipopt is not taking advantage of this knowledge If I remember correctly, we added this feature in the interface for the Bonmin MINLP code.<br>
<font color="#888888">
<br>
Andreas</font><div><div></div><div class="h5"><br>
<br>
On Tue, 22 Mar 2011, Stefan Vigerske wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am working about a problem optimization wich has linear constraints. I<br>
have implemented these constraints like as the other (nonlinear) constraints<br>
using C++ interface (in methods eval_g and eval_jac_g of my TNLP class).<br>
However, I have saw, in the TNLP class, there is a method for constraints<br>
linearity (get_constraints_linearity). I would like to ask if is possible<br>
implementing my linear constraints using this method (instead of implemeting<br>
in eval_g). If yes, do I need include these constraints in the jacobian<br>
information, or the first derivative of these constraints is gotten in a<br>
automatic way? Again if yes, there is any convergence advantage in codifying<br>
at this way?<br>
</blockquote>
<br>
No, you need to implement linear constraints in eval_g and eval_jac_g.<br>
The method get_constraints_linearity is just to tell Ipopt which<br>
constraints are linear, so it can safe some computations by knowing that<br>
for these constraints the gradient does not change (I guess).<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am sorry if is a dummie question, but there is no example using the method<br>
get_constraints_linearity...<br>
</blockquote>
<br>
For each constraint i, i=0,...,m-1, you have to set<br>
const_types[i] to Ipopt::TNLP::LINEAR, of constraint i is linear, or<br>
Ipopt::TNLP::NON+LINEAR otherwise.<br>
<br>
You may also implement get_variables_linearity to tell Ipopt which<br>
variables appear only in linear parts of constraints and objective.<br>
<br>
Stefan<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
</blockquote>
<br>
<br>
-- <br>
Stefan Vigerske<br>
Humboldt University Berlin, Numerical Mathematics<br>
<a href="http://www.math.hu-berlin.de/%7Estefan" target="_blank">http://www.math.hu-berlin.de/~stefan</a><br>
<br>
_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
<br>
<br>
</blockquote>
</div></div></blockquote></div>