[Ipopt] Problem in setting "max_iter" in C++ interface
Stefan Vigerske
stefan at math.hu-berlin.de
Tue Oct 9 09:31:43 EDT 2012
Hi,
On 10/09/2012 03:17 PM, Nuno Silva wrote:
> Greetings
>
> I'm using the C++ interface and I'm trying to set the "max_iter" option,
> but I get an exception:
> "...Microsoft C++ exception: std::bad_alloc at memory location..."
So what does the debugger say where the exception is thrown?
> Here is the surrounding code, the exception is thrown at the second line:
>
> SmartPtr<IpoptApplication> app = IpoptApplicationFactory();
Shouldn't this be
SmartPtr<IpoptApplication> app = new IpoptApplication();
IpoptApplicationFactory() sounds like it comes from the C interface.
Stefan
> app->Options()->SetIntegerValue("max_iter", 500);
> ApplicationReturnStatus status = app->Initialize();
>
>
> Thanks
> Nuno
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
More information about the Ipopt
mailing list