Borrar filtros
Borrar filtros

Dsat type error in GA optimization

2 visualizaciones (últimos 30 días)
Mayank
Mayank el 7 de Mayo de 2013
Comentada: Sanaz el 7 de Jun. de 2015
I'm using ga at command line to perform optimization. The syntax is as follows: [Go,fval,exitflag,output] = ga(@fuel_eco,nvars,A,b,LB,UB,option) "fuel_eco" is a function which most certainly returns a double value. Yet when I run the code, an error pops up saying: GA only accepts inputs of data type double
Where might the problem lie? Kindly help, I'm grappling with this problem for a long time now.

Respuesta aceptada

Alan Weiss
Alan Weiss el 7 de Mayo de 2013
Your problem has a very simple solution. As detailed in the function reference page, the proper syntax for GA is
ga(fitnessfcn,nvars,A,b,Aeq,beq,LB,UB,nonlcon,options)
You are missing the Aeq, beq entries. As explained in the function reference page, if they don't exist for your problem, replace them with [].
Alan Weiss
MATLAB mathematical toolbox documentation

Más respuestas (0)

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by