Too many output arguments while solving a constrained optimization problem.
이전 댓글 표시
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
Cris LaPierre
2021년 5월 8일
편집: Cris LaPierre
2021년 5월 8일
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
2021년 5월 8일
채택된 답변
추가 답변 (1개)
I get no problem in R2020b once the last line is modified to,
prob.solve(x0)
댓글 수: 1
The Matlab Online engine doesn't seem to have any problem either (R2021a).
optimisation
카테고리
도움말 센터 및 File Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!