Constraints on dependent variable Matlab

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 个评论

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.

请先登录,再进行评论。

回答(1 个)

Alan Weiss
Alan Weiss 2015-7-30
编辑:Alan Weiss 2018-7-24
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 个评论

Unfortunately, those links are broken.
Sorry about that, I just corrected them.
Alan Weiss
MATLAB mathematical toolbox documentation

请先登录,再进行评论。

提问:

2015-7-29

评论:

2018-7-24

Community Treasure Hunt

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

Start Hunting!

Translated by