This enhancement has been incorporated in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
The ability to specify linear constraints to the GA function is not available within the the Genetic Algorithm and Direct Search Toolbox.
To solve optimization problems that involve linear constraints and bounds, use the PATTERNSEARCH function, that has the functionality for specifying linear constraints and bounds. For information on this, see the following URL:
If you would like to be able to use constraints within the GA function, you will need to program this functionality within your objective functions. For an example of how to do this, download the gaBound.m file:
Best Answer