Hi Rui,<br><br>In your ampl model, have you tried using the objective command, as described in <br><a href="http://groups.google.com/group/ampl/browse_thread/thread/1b6ab5cdfb462ee4" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://groups.google.com/group/ampl/browse_thread/thread/1b6ab5cdfb462ee4
</a><br><br>Because, as Andreas just mentioned, Ipopt can only handle one objective function at a time. I've been using ampl's named problems with Ipopt without any trouble, but I'm only specifying one objective function per problem.
<br><br>hth,<br> Rodrigo.<br><br><div><span class="gmail_quote">On 5/21/07, <b class="gmail_sendername">Andreas Waechter</b> <<a href="mailto:andreasw@watson.ibm.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
andreasw@watson.ibm.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Rui,<br><br>I think that we wrote the AMPL interface in Ipopt so that it complains (in<br>the way you describe) when there are more than one objective functions in<br>the model. Maybe the trick that Michal mentioned already does the trick
<br>for you.<br><br>If not, please submit a ticket at the Ipopt trac page and attach the AMPL<br>model that give you trouble.<br><br>Thanks,<br><br>Andreas<br><br>On Sun, 20 May 2007, Michal Kaut wrote:<br><br>> Hello,
<br>><br>> you can use named problems, using the "problem" keyword. This is one of the<br>> new features of AMPL, so you won't find it in the first edition of the book.<br>> For a detailed description, including examples, see
<br>> <a href="http://ampl.com/NEW/loop2.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ampl.com/NEW/loop2.html</a><br>><br>> Regards,<br>> Michal Kaut<br>><br>><br>
> Rui Huang wrote:<br>>> Hello<br>>><br>>> I have two objective functions.
<br>>> So I have two same ampl models, except that each one has a different<br>>> objective function.<br>>> and try to solve them together without "reset"<br>>> But ampl breaks<br>>> "There is more than one objective function in the AMPL model, but
<br>>> AmplTNLP::set_active_objective has not been called",<br>>><br>>> I do not know how to call this function.<br>>> _______________________________________________<br>>> Coin-ipopt mailing list
<br>>> <a href="mailto:Coin-ipopt@list.coin-or.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Coin-ipopt@list.coin-or.org</a><br>>> <a href="http://list.coin-or.org/mailman/listinfo/coin-ipopt" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://list.coin-or.org/mailman/listinfo/coin-ipopt</a><br>
><br>> _______________________________________________<br>> Coin-ipopt mailing list<br>> <a href="mailto:Coin-ipopt@list.coin-or.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Coin-ipopt@list.coin-or.org
</a><br>> <a href="http://list.coin-or.org/mailman/listinfo/coin-ipopt" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://list.coin-or.org/mailman/listinfo/coin-ipopt</a><br>><br>_______________________________________________<br>Coin-ipopt mailing list<br><a href="mailto:Coin-ipopt@list.coin-or.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Coin-ipopt@list.coin-or.org</a>
<br><a href="http://list.coin-or.org/mailman/listinfo/coin-ipopt" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://list.coin-or.org/mailman/listinfo/coin-ipopt</a><br></blockquote></div><br><br clear="all">
<br>-- <br>Rodrigo López Negrete<br><a href="http://muon.blogdns.org/%7Erush/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://muon.blogdns.org/~rush/</a>