I need help to modify my optimization code
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
S AsZ
el 10 de Oct. de 2019
Comentada: Star Strider
el 11 de Oct. de 2019
Hi
I have an optimization model but I think this code is incorrect because the results show that objective function remains constant during running model and I have no improvement in objective function value.
I don't sure that my code be correct.
Can anyone help me to correct the mistakes in this code?
My model and its code are as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242054/1.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242055/2.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242056/3.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242057/4.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242058/5.png)
0 comentarios
Respuesta aceptada
Star Strider
el 10 de Oct. de 2019
Note that in the ‘% Parameters’ section, you are creating new random numbers in every call to ‘objective_function’.
The optimisation routine you are using (that if I remember correctly is the ga function) is chasing a moving target! It is not possible to optimise a function that is constantly changing.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Problem-Based Optimization Setup 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!