|
Hi, I have a genetic algorithm optimization function which
I am trying to run using the parallel computing toolbox as
explained here:
http://www.mathworks.com/access/helpdesk/help/toolbox/gads/i
ndex.html?/access/helpdesk/help/toolbox/gads/f7928.html&http
://www.google.co.uk/search?
hl=en&q=matlab+custom+plot+function&meta=
The GA works fine without running it in parallel, but when
I open the matlabpool, the GA then returns the following
error: ??? Error using ==> makeState at 50
GA cannot continue because user supplied fitness function
failed with the following error:
Error using ==> reshape
To RESHAPE the number of elements must not change.
From the debugger, this appears to be happening when it is
trying to score each member of the population:
% Score each member of the population
if strcmpi(options.Vectorized, 'off')
try
Score = fcnvectorizer(state.Population
(initScoreProvided+1:end,:),FitnessFcn,1,options.SerialUserF
cn);
catch
error('gads:makestate:fitnessCheck', ...
'GA cannot continue because user supplied
fitness function failed with the following error:\n%s',
lasterr)
end
Anyone any ideas why this would be happening? I'm not sure
what details of my code are needed so feel free to ask for
additional information. My version is 2008a (7.6.0.324).
Thanks.
|