How to formulate nonlinear optimization problem with large number of variables and constraints
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
i have a problem formulating a nonlinear optimization problem with matlab and don't really know how to start or if i go the right approach.
I have a nonlinear equation looking like
with total of 10 variables --> x()
Then i have about 500 constraints with the same equation as above with fixed but different k, const.a, const.b and const.c.
I want to optimize so that i have best values for x(1) to x(10) to have best possible solution for k when inserting different const.a b and c.
Will the optimizer handle the fact that the expression in the log should not be negative? or does that have to be a constraint as well?
What is the best way to formulate it for the optimizer? I am even not sure if i described my problem properly.
I use Matlab 2019b
Best regards
Karl
2 Kommentare
Alan Weiss
am 20 Mai 2021
Sorry, I don't really understand what you are trying to do. What does it mean to optimize an equation? Do you want an objective function to be minimal or maximal, subject to some constraints? Or are you trying to fit a curve to some data?
Ican tell you that, in general, optimizers do not automatically keep expressions from going negative unless you somehow incorporate that requirement into constraints.
Alan Weiss
MATLAB mathematical toolbox documentation
Antworten (1)
Alan Weiss
am 20 Mai 2021
It sounds to me as if you want to fit an expression to data, possibly in a least-squares sense. For examples and details, see Nonlinear Least Squares (Curve Fitting). Maybe these examples from that section will help in some way: Nonlinear Least-Squares, Problem-Based, Nonlinear Data-Fitting Using Several Problem-Based Approaches, Nonlinear Data-Fitting, or Nonlinear Curve Fitting with lsqcurvefit.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
0 Kommentare
Siehe auch
Kategorien
Mehr zu Nonlinear Optimization 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!