In genetic algorithm problem in objective function i have 1 variable but in constraints I have 8 variables so how many number of variables should I give?

In genetic algorithm problem in objective function i have 1 variable but in constraints I have 8 variables so how many number of variables should I give?

Answers (1)

The number of variables is the number of things that ga changes in its search. If you have 8 variables to set, then N = 8. If your problem just has one scalar variable x, but 8 constraints, then N = 1.
Take a look at the documentation for more help.
Alan Weiss
MATLAB mathematical toolbox documentation

This question is closed.

Asked:

on 26 Oct 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!