Expressing non-linear conditions in an NLP optimization problem
Afficher commentaires plus anciens
Dear Community,
I would like to solve following NLP optimization problem (for example with the fmincon function):
My objective function (to be minimized) is
f=2*x1+3*x2
where x1 and x2 are my two variables.
Furthermore:
y01=5*x1
y02=3*x2
where y01 and y02 are the initial conditions used to solve following ODE system:
dy1dl=(-a0/y2)*log((b0-c0)/(b0-(1-exp(-(a*y1^1.7+y2*y1^1.2)))))
dy2dl=d0*(e0-y2)+(-a0/y2)*log((b0-c0)/(b0-(1-exp(-(a*y1^1.7+y2*y1^1.2)))))/(1+y1)
y1 and y2 for the whole interval L are calculated by iterational solving of the ODE system using ODE45 (since the parameters a0, b0, c0, d0, e0 are different on each small interval)
Now I have the constraint
C=sum(y1)+sum(y2)<100
I am wondering how to integrate the ODE solving routine into the constraint expression and optimization solution line. I first thought having found indications in the chapter about passing extra parameters but finally I don't think it is so helpful in this case since my parameters a0, etc. are not supposed to change from one optimization to other (they just change within the interval L).
Thanks!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Choose a Solver 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!