Use optimization variable in a function in a constraint
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello :)
While trying to work around the problem-based solver for an optimization problem Im working on, I encountered the error "Unable to perform assignment because value of type 'optim.problemdef.OptimizationExpression' is not convertible to 'double'." I am trying to use an external self-written function, which uses two of my optimization variables as variables, and we need the output of the external function for the constraint value.
Antworten (1)
Rohit Kulkarni
am 12 Okt. 2023
Hi Joel,
I understand you are getting the error "Unable to perform assignment because value of type 'optim.problemdef.OptimizationExpression' is not convertible to 'double'." while working on an optimisation problem.
Often, this error comes from an improper initialization of an optimization expression.
Please refer to the documentation provided below for the detailed explanation and examples for resolving this error:
Hope it helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!