Nonlinear Programming: Constraints with Callback

137 views
Skip to first unread message

Sumedh Sathe

unread,
Feb 12, 2023, 2:03:07 PM2/12/23
to CasADi
Hello,

I am trying to solve the problem listed at https://web.casadi.org/docs/#nonlinear-programming (see attached screenshot), only difference being that I'm trying to use callbacks in the constraint, as I later wanna use NN/ GP in a similar kind of a problem.

My code is as follows:


I am getting an error message "Last elements of offset (2) must equal the number of columns (1)", eventhough the number of elements is precisely equal to the number of columns.

I would really appreciate some guide advice on where I'm incorrect programmatically and help on resolving this.

Thank you in advance,
Sumedh




Dhathri Somavarapu

unread,
Feb 25, 2023, 5:01:15 PM2/25/23
to CasADi
Hi Sumedh,
        It looks like there is a special setup for enabling IPOPT callbacks: https://github.com/casadi/casadi/wiki/enableIpoptCallback.
In your case, do you have proof that IPOPT is actually entering the callback function?

Dhathri

Arnab Joardar

unread,
Mar 27, 2023, 10:05:46 PM3/27/23
to CasADi
Regarding the copying of the headers, where exactly am I supposed to write/keep them? I am trying to implement IPOPT callbacks in matlab on windows, but I am not sure where exactly am I supposed to collect them and keep the header list. 

Any advice would be most appreciated.

Reply all
Reply to author
Forward
0 new messages