Thread Subject: Multi Constraint Fitness function In GA

Subject: Multi Constraint Fitness function In GA

From: Amir Muhammadzadeh

Date: 26 Nov, 2009 12:29:05

Message: 1 of 2

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

Subject: Multi Constraint Fitness function In GA

From: Steven Lord

Date: 29 Nov, 2009 00:02:09

Message: 2 of 2


"Amir Muhammadzadeh" <amirmhzadeh@gmail.com> wrote in message
news:helsah$5ci$1@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@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com