Genetic algorithm constraints/optimization toolbox
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm having a problem with my optimization model on matlab , the truth is my model is pretty complicated with 2 types of variables (x,y) and with 6 variables each (x1,x2,x3,x4,x5,x6) (y1,y2,y3,y4,y5,y6) am trying to solve it through the optimization toolbox in the app section with the use of genetic algorithm but I'm going through some issues
first issue was that I don't know the number of variables to put in the number of variables (I originally put 12 since I have 12 variables 6 for x and 6 for y)
the second issue was how to define both x and y constraints in the linear inequality boxes since I have constraints for both x and y
0 comentarios
Respuestas (1)
Matt J
el 11 de Mzo. de 2020
Editada: Matt J
el 11 de Mzo. de 2020
You need to write your fitness function and all of your constraints in terms of 12 unknowns. The constraint matrices must be written to multiply with a 12-vector [x(:) ; y(:)] containing both your x and y variables.
However, you may find it easier to write your linear constraints and bounds using the Problem-Based framework, which lets you compose constraints in terms of intuitive symbolic expressions in x and y. You can then convert the symbolic constraints to solver-based matrix form using my recent sbmatrices submission to the File Exchange.
0 comentarios
Ver también
Categorías
Más información sobre Genetic Algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!