Extra Parameters to Nonlinear Constraints

57 views
Skip to first unread message

Robert Pritchett

unread,
Apr 19, 2017, 2:28:51 PM4/19/17
to SNOPT
Hello,

I have some Matlab algorithms on my Windows machine that use fmincon and I am currently attempting to replace fmincon with SNOPT. When using fmincon I was able to pass additional parameters to my objective and nonlinear constraint functions by declaring these functions to be anonymous. My question is whether there is a way to pass additional parameters to the objective and nonlinear constraint functions when I use SNOPT as well?

Initial testing indicates that I can't declare these functions to be anonymous without receiving an error. However, if I define my functions in the way shown in the SNOPT examples, i.e., @toyCon, then this function cannot receive the necessary extra parameters it needs and fails. Any suggestions?  

Thank You,

Robert Pritchett

SNOPT

unread,
Apr 19, 2017, 2:38:49 PM4/19/17
to SNOPT
Hi Robert,

I just fixed this issue recently.  If you update your files with the latest release (v2.4.0) on our SNOPT-matlab github repository (https://github.com/snopt/snopt-matlab/releases), then it should solve your issue. 

Please let me know if it doesn't!

--Elizabeth

Robert Pritchett

unread,
Apr 20, 2017, 9:02:11 AM4/20/17
to SNOPT, sn...@googlegroups.com
Thanks for your speedy response Elizabeth! I downloaded the latest release and my issue has been resolved!

Robert
Reply all
Reply to author
Forward
0 new messages