gamultiobj for optimization of two objectives in Simulink
1 view (last 30 days)
Show older comments
Hello;
I need to use gamultiobj to optimize two objective functions in Simulink. I am using this code for Fitness function:
----------------------------------------------------------
function F = Fitness(P)
FlowRate=P; set_param('SolarTroughSystem_Storage_Heating_PV_Opt/constant','Value',num2str(FlowRate)) % Set sim options and compute function value
myobj = sim('SolarTroughSystem_Storage_Heating_PV_Opt','SrcWorkspace','base','StopTime','2289800');
F = (-1) * myobj.get('yout'); end
----------------------------------------------------------
The P is the only decision variable that I have. I want to maximize both my objective functions and find a pareto front. If I run this for 200 seconds F comes out as a (201 by 2) matrix. I get the following error:
Error running optimization. Subscripted assignment dimension mismatch.
Could you please help me by this problem?
Thank you so much;
Faezeh
0 Comments
Answers (0)
See Also
Categories
Find more on Multiobjective Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!