Too many output arguments while solving a constrained optimization problem.
Afficher commentaires plus anciens
Hello,
I'm trying to solve a optimization problem with a couple of non-linear constraints. When solving the problem I get the following error:
Error using writeCompiledFun2VirtualFile
Too many output arguments.
I tried different constraints and functions and I noticed that the error appears whenever I use multiplication and/or division with two optimvars. This might be due ot optimvar only supporting ./ and .* . However, replacing / and * with ./ and .* did not solve the problem.
You can find my code attached.
optimisation
Thanks in advance
2 commentaires
Cris LaPierre
le 8 Mai 2021
Modifié(e) : Cris LaPierre
le 8 Mai 2021
I modified your post to run your m file. It returns a different error. It's the same error I get if I run your m-file in R2019b.
Michael Christian Linder
le 8 Mai 2021
Réponse acceptée
Plus de réponses (1)
I get no problem in R2020b once the last line is modified to,
prob.solve(x0)
1 commentaire
The Matlab Online engine doesn't seem to have any problem either (R2021a).
optimisation
Catégories
En savoir plus sur Get Started with Optimization Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!