From: jia on
Hello all:

I know how to make GA (genetic algorithm) code for unconstrained problems. But I have a problem with equation and inequation constraints. e.g.,

X1+X2+X3=B
Xi>0; i=1, 2, 3

Thank you,
JH
From: Alan Weiss on
On 8/6/2010 9:07 PM, jia wrote:
> Hello all:
>
> I know how to make GA (genetic algorithm) code for unconstrained
> problems. But I have a problem with equation and inequation constraints.
> e.g.,
>
> X1+X2+X3=B
> Xi>0; i=1, 2, 3
>
> Thank you,
> JH

Depending on your version of MATLAB, you can use both linear and
nonlinear constraints. See
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-11.html
for the syntax of constraints, and see
http://www.mathworks.com/access/helpdesk/help/toolbox/gads/ga.html
for the syntax of ga.

Alan Weiss
MATLAB mathematical toolbox documentation