gamultiobj n by m fitness function evaluation
Mostrar comentarios más antiguos
Hello
I am trying to optimise 120 parameters using gamultiobj function.
My fitness function output is a matrix with 300 by 88 points, but it seems that the gamultiobj function accepts a single vector as the output of the fitness function since, when I track the error, it tries to assign a matrix of 1 by 26400 to 300 by 88 which through error. 1 by 26400 is calculated inside the gamultiobj function using numel(scorese), which is 300x88=26400.
To clarify: I face the error saying that it is impossible to assign 300 by 88 to 1-26400.
Can anyone help me with how to resolve this?
Thank you in advance
Here is the error:
Unable to perform assignment because the size of the left side is 1-by-26400 and the size of
the right side is 300-by-88.
Error in objAndConVectorizer (line 33)
Fvals(i,:) = feval(objFcn,(pop(i,:)));
Error in gamultiobjMakeState (line 85)
[Score,C,Ceq,isFeas] =
objAndConVectorizer(state.Population(initScoreProvided+1:end,:), ...
Error in gamultiobjsolve (line 20)
state = gamultiobjMakeState(GenomeLength,FitnessFcn,ConstrFcn,output.problemtype,options);
Error in gamultiobj (line 304)
[x,fval,exitFlag,output,population,scores] = gamultiobjsolve(FitnessFcn,nvars, ...
Error in OptimiseParameters_GenAL (line 186)
gamultiobj(f,...
Error in CameraCalibration (line 100)
OptimiseParameters_GenAL(imagePath, nImages, nCameras, boardWidth, boardHeight,
squareSize, calibrationID, thresh, maxIter)
Caused by:
Failure in user-supplied fitness function evaluation. Cannot continue.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Solver Outputs and Iterative Display en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!