From: Amir Muhammadzadeh on
well , this is my problem :
How can I deal with GA in matlab when my fitness function has 8 separate constraint ?
Does Matlab just accept 2 constarint function or what ?


Thank you in advance :D
From: Steven Lord on

"Amir Muhammadzadeh" <amirmhzadeh(a)gmail.com> wrote in message
news:helsah$5ci$1(a)fred.mathworks.com...
> well , this is my problem :
> How can I deal with GA in matlab when my fitness function has 8 separate
> constraint ?

Just change the A, b, Aeq, beq, and/or nonlcon inputs to GA to reflect the
appropriate number of constraints.

http://www.mathworks.com/access/helpdesk/help/toolbox/gads/ga.html

> Does Matlab just accept 2 constarint function or what ?

I'm not sure what you mean. The number of linear inequality constraints is
equal to the number of rows in the A (and b) inputs to GA. Similarly, the
number of linear equality constraints is the number of rows in your Aeq and
beq inputs, and the number of nonlinear constraints are reflected in the
number of rows in the ouputs of your nonlcon function. For example, the
example in the page I linked above has 3 linear inequality constraints, as
the A input has 3 rows.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ