Optimization algorithm into MATLAB
显示 更早的评论
Hi, I have to couple Dymola with an optimization algorithm into Matlab.
Real Consumption data measured draw a continuous nonlinear function that it cans be loaded into Matlab. Moreover there is a parameter in Dymola between 5000 and 10000. The parameter takes a value in that range and after the simulation in Dymola the results are returned.
The objective is to find the best value in the range to fit the returned results to the real consumption data measured.
Which method is the best one? I tried it with lsqcurvefit but my objective function is a script.
Thanks in advance.
I can´t find the best solution for my problem.
回答(2 个)
Kye Taylor
2013-1-14
1 个投票
lsqcurvefit is a good candidate... whatever you choose, you'll need your objective to be written as a function
Shashank Prasanna
2013-1-14
1 个投票
It looks like you are trying to fit an ODE. I suggest going through the following article: http://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equation.html
If you objective is a script you can convert it into a function that takes in the independent vector variable x and return the function or objective values y
f_scalar = F(x_vector)
After which you can try all the solvers mentioned in the above link.
类别
在 帮助中心 和 File Exchange 中查找有关 Choose a Solver 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!