Fmincon requires SQP algorithm

14 views (last 30 days)
SEEmULATER
SEEmULATER on 23 Jun 2021
Commented: SEEmULATER on 30 Jun 2021
When I run fmincon with SQP algorithm, I get no problems. However, when I switch to 'active-set' or 'interior-point', I get the error:
OPTIMOPTIONS property 'Algorithm' must be one of the following values for fmincon:
'sqp', 'sqp-legacy'
I'm trying to use a different algorithm because the documentation says that interior-point can run faster for sparse problems, so I want to test that.
  4 Comments
SEEmULATER
SEEmULATER on 29 Jun 2021
Hi
I am not using code generation. I am using MATLAB 2020b on Ubuntu 20.04. Thank you for looking at this! The files are attached. Run the Sim_Working.m script.

Sign in to comment.

Accepted Answer

Swatantra Mahato
Swatantra Mahato on 30 Jun 2021
Hi,
It looks like the error shows up in the MATLAB Funciton Block. Kindly refer the following documentation link on how MATLAB Function Blocks work
In particular, note that "C/C++ code generation limitations for MATLAB Coder also apply to MATLAB Function blocks.". To use a different algorithm for your simulation you can use "coder.extrinsic" and refactor your code as mentioned in the below link
Hope this helps
  1 Comment
SEEmULATER
SEEmULATER on 30 Jun 2021
This helps tremendously, thank you so much!!

Sign in to comment.

More Answers (0)

Categories

Find more on Systems of Nonlinear Equations in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!