From: Bing Dong on
Hi All,

I am using GA toolbox from MATLAB 2009b.

One of my constrained variable P (not X: control variable) is from the output of a SimuLink model. Ideally, GA will find my X (control variable) with minimizing my objective function while maintaining my P in certain range.

How can I set that into GA function?

Thanks,

Allen.
From: Alan Weiss on
Bing Dong wrote:
> Hi All,
>
> I am using GA toolbox from MATLAB 2009b.
> One of my constrained variable P (not X: control variable) is from the
> output of a SimuLink model. Ideally, GA will find my X (control
> variable) with minimizing my objective function while maintaining my P
> in certain range.
> How can I set that into GA function?
>
> Thanks,
>
> Allen.

I am not very familiar with Simulink, but you can use any sort of
function as a nonlinear constraint with ga. See
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-11.html#brhkghv-16
for the syntax of writing nonlinear constraints. See
http://www.mathworks.com/access/helpdesk/help/toolbox/gads/ga.html
for the syntax of including nonlinear constraints in ga. See
http://www.mathworks.com/access/helpdesk/help/toolbox/gads/f6691.html#bqfzkqu
for an example using ga with nonlinear constraints.

Alan Weiss
MATLAB mathematical toolbox documentation