Mixed Integer optimization using GA - feasible initial population ignored?

1 view (last 30 days)
I'm attempting to solve a problem by GA where all decision variables are integers and there are inequality constraints. I know of one feasible solution to start with that I provide as 'InitialPopulation' in the optimization options. I assumed that if the algorithm was unable to find a better feasible solution as it progressed, it would eventually just return the initial feasible point I provided it (keep it in each generation as the elite solution). However, I'm finding that it returns an infeasible point with the message:
Optimization terminated: average change in the penalty fitness value less than options.TolFun
but constraints are not satisfied.
Is it ignoring the feasible initial point to begin with, or dropping it at some point? I'm having trouble finding documentation on the functions Matlab uses for mixed integer GA. My code roughly looks like this:
FitnessFunction = @(x) -obj_fcn_20141202(x,t,cost_curve_MW,MW_rating);
mycon= @(x) penalty_fcn_20141202(x,t,frequency,Q,elevations, ...
turbine_discharge,ELWS_upper,ELWS_lower,max_hrly_unit_change);
options = gaoptimset('PlotFcns',{@gaplotbestf,@gaplotscores,@gaplotstopping}, ...
'Display','iter','UseParallel','always','Vectorized','on', ...
'PopulationSize',240,'InitialPopulation',x0, ...
'StallGenLimit',50,'TolFun',1e-10);
nVar = 240;
lb = 0*ones(1,240);
ub = no_of_units*ones(1,240);
IntCon = [1:240];
[x,fval] = ga(FitnessFunction,nVar,[],[],[],[],lb,ub,mycon,IntCon,options)
One more point to make is that the infeasible solution it reports has a much better fval than the feasible solution I seed the initial population with. This makes me think it may not be giving enough weight to constraint penalties, leading the algorithm to prefer an infeasible solution with a much better fval than a feasible solution with a poor fval. Is there a way to check this, and/or fix it?

Answers (1)

Alan Weiss
Alan Weiss on 4 Dec 2014
I wonder if you would get better results if you set mycon = 1000*mycon or some such thing. I suspect that your problem takes a slightly infeasible point that it deems feasible, gets confused, and goes off the rails thereafter. You could also take TolCon to be small, say 1e-10 or so.
Also, your options for UseParallel and Vectorized conflict. See Vectorize and Parallel Options.
I think your population size is not nearly enough for the number of dimensions you have. I would take a population of at least 2e3.
You should probably also set the EliteCount option to something larger than default, maybe 20 to 50.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Community Treasure Hunt

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

Start Hunting!