I want to use genetic algorithm for inventory classification. Number of variables is 6. All the variables must lie between 0 and 1. If we add first 4 variables, the sum must be 1. Also 5 th variable must be greater than 6 th variable. My doubt is whether the Fitness function should return a single scalar value or the fitness function should return all the fitness values of the population. I think the GA can be solved using the toolbox of GA in MATLAB. I tried to run GA in optimtool toolbox. The population size is 50. The fitness function is InvGAClassifyFitnessFunc(Position, classGA1,ClassDM!) where Position is the chromosome with the above properties. I have written the inequalities as Aineq=[0,0,0,0,-1,1] Bineq=0;
Aeq as [1,1,1,1,0,0] and Beq as [1];
lb as [0,0,0,0,0,0] and ub as [1,1,1,1,1,1];
creation function as constraint-dependent. Population type is double.Scaling function as Rank. Selection function as 'Roulette'.Mutation function as 'Adaptive feasible'. Crossover function as 'Constraint dependent'. All other options as default.
When i ran this problem in MATLAB it is giving error " Not enough input arguments".
Please guide me.
댓글 수: 0
댓글을 달려면 로그인하십시오.