Parallel computing (parsim) run out of memory during Simulink simulation
3 次查看(过去 30 天)
显示 更早的评论
When I simulate my Simulink model memory (RAM) fully occupied by Parallel Toolbox. I tryed delete Cluste, but it didn't help. First simulation work good, but next simulation take all free memory.
What I should do for solving this?
% 3) Create an array of SimulationInput objects and specify
% the values for each simulation
simIn(1:numSims) = Simulink.SimulationInput(model);
for idx = 1:numSims
simIn(idx) = simIn(idx).setBlockParameter(...
[model '/Motor hip aa fr/Control/Position controller'],'P',num2str(Kpp_table(idx)), ...
[model '/Motor hip aa fr/Control/Position controller'],'D',num2str(Kdp_table(idx)), ...
[model '/Motor hip aa fr/Control/Position controller'],'I',num2str(Kip_table(idx)),...
[model '/Motor hip aa fr/Control/Speed controller'],'P',num2str(Kpw_table(idx)), ...
[model '/Motor hip aa fr/Control/Speed controller'],'D',num2str(Kdw_table(idx)), ...
[model '/Motor hip aa fr/Control/Speed controller'],'I',num2str(Kiw_table(idx)),...
[model '/Motor hip aa fr/Control/BLDC Current Controller'],'Kp',num2str(Kpi_table(idx)), ...
[model '/Motor hip aa fr/Control/BLDC Current Controller'],'Kaw',num2str(Kdi_table(idx)), ...
[model '/Motor hip aa fr/Control/BLDC Current Controller'],'Ki',num2str(Kii_table(idx)) );
end
simOut = parsim(simIn,'TransferBaseWorkspaceVariables','on');
myCluster = parcluster('local');
delete(myCluster.Jobs)
f1=[];
for idx = 1:numSims
y = simOut(1, idx).simout.y;
f_compute_9opt_parallel
f1(idx)=f;
end
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Motor Drives 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!