how can I write GA code to simulate the simulation model?

Hi,
I am using GA as an optimization process to estimate 3 parameters in my model by comparing this with the desired model. This is working properly when I use mathematical equations of the models in objective function to get results and the Best Function graph looks acceptable. However, when I use my model as a simulation program (blocks) and import the result into GA code by sim(''), the Best Function graphs keep in constant value. My issue is that how can I write GA code to simulate the simulation model (import & export data while the GA program run). Is there anyone who has been working with GA and simulation?
Thanks

답변 (1개)

Ab
Ab 2014년 12월 17일

0 개 추천

The fitness function is: sum(y1-y2)^2, this is to keep the error small.
In every single generation will take the data from y1 and y1 mathematically from m-file, This has been done.
However, I need GA taking the data from simulation (blocks).
Can the ga code import y1 and y2 data from the simulation?
Thanks

카테고리

도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기

질문:

Ab
2014년 12월 15일

답변:

Ab
2014년 12월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by