Constraints on dependent variable Matlab

9 views (last 30 days)
Daniel
Daniel on 29 Jul 2015
Commented: Alan Weiss on 24 Jul 2018
I am working on a Simulation-Optimization routine in Matlab. My program solves a set of Differential Algebraic Equations (DAEs) which depend on a set of design variables "x" and computes a cost function (objective function). The value of the objective function is passed to fmincon, which decides how to update "x", so constraints are fulfilled.
I was wondering if there is a way to recursively impose bounds not only to "x", but to internal variables. I have, for instance, a purity requirement in the process, which makes necessary to impose an inequality constraint on this variable. Purity does not belong to "x", but is a dependent variable resulting from the solution of the DAE system. I know that one can include penalty functions in the objective function to account for these constraints, but I would want to know if there is a way to make this internal variables "visible" to the optimizer, so it runs according to bounds or inequality conditions on them.
  1 Comment
Torsten
Torsten on 30 Jul 2015
The dependent variables are uniquely determined by the DAE system and the more or less free control variables. So you will have to adjust the control variables over time in such a way that e.g. the purity requirement is fulfilled. This is achieved - as you already mentioned - by including a penalty term in the objective function for possible deviances.
Best wishes
Torsten.

Sign in to comment.

Answers (1)

Alan Weiss
Alan Weiss on 30 Jul 2015
Edited: Alan Weiss on 24 Jul 2018
Yes, you can impose any constraints you like by using a nonlinear inequality constraint function. Since this function comes from the objective function calculation, you can save time by using this technique.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 Comments
Mathias Dirksmeier
Mathias Dirksmeier on 24 Jul 2018
Unfortunately, those links are broken.
Alan Weiss
Alan Weiss on 24 Jul 2018
Sorry about that, I just corrected them.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!