Hi all, i get this error at using GA optimtool " error running optimization. matrix dimensions must agree" so kindly can any one explain what is the problem.
Mostrar comentarios más antiguos
I have nonlinear constrained optimization problem (optimum selection of relay settings). when trying to solve it using genetic algorithm (using optimtool box) it generates this error "error running optimization. matrix dimensions must agree" although it is solvable using fmincon with the same objective and constraints functions.
Respuestas (1)
Alan Weiss
el 27 de Feb. de 2017
0 votos
fmincon is more forgiving about the orientation of your variables, allowing you to pass arrays of any dimension, as described here. ga requires that your control variables be row vectors. You probably assume, in your objective or constraint functions, that the variables are column vectors or some multidimensional array.
Alan Weiss
MATLAB mathematical toolbox documentation
6 comentarios
mohamed afifi
el 27 de Feb. de 2017
Alan Weiss
el 28 de Feb. de 2017
For more help, please post code; it is impossible for me to imagine what is going on without seeing where the dimension mismatch might be. You can also use the debugger to try to figure it out yourself.
Alan Weiss
MATLAB mathematical toolbox documentation
mohamed afifi
el 1 de Mzo. de 2017
mohamed afifi
el 1 de Mzo. de 2017
Alan Weiss
el 2 de Mzo. de 2017
I could not understand what your program is doing because I have no idea what SystemModel(); is.
Use the debugger with Optimization Toolbox™ the same way you would use it with plain MATLAB code. Step through things one at a time. Write an output function or use a plot function to see the values that are being passed to ga, or just put a break point in ga which is, after all, MATLAB code.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
RAJENDRA KUMAR SHARMA
el 27 de Mayo de 2020
how to make objective function of coordination relay please anybody explain urgent
Categorías
Más información sobre Choose a Solver 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!