Parallel Simulation
显示 更早的评论
Dear All,
I have a simevents model that can only be run in normal mode. I need to run 100 simulations using different initial seeds. To speed up the process, I would like to run it in parallel on my multi-core computer and store the output of those 100 simulations. The initial seed is denoted N and it takes the value from workspace. I used the following code:
matlabpool open
mdl = 'simModel';
output1 = zeros(1,100); % preallocate memory
parfor ii=1:100
n = round(normrnd(1000,100)); % generate the initial seed
sim(mdl); % simulate the model reading the initial seed n from
% the workspace
output1(1,i) = max(broj); % save the output called "max(broj)"
end
??? Error using ==> parallel_function at 598 Error in ==> parallel_function>make_general_channel/channel_general at 894 Error occurred in 'simModel/Time-Based Entity Generator'. Error in 'simModel/Time-Based Entity Generator': Initialization commands cannot be evaluated.
Error in ==> uspelo2 at 7 parfor ii=1:100
I would greatly appreciate your help on this.
Sincerely, Nikola
采纳的回答
更多回答(1 个)
Kaustubha Govind
2011-2-9
0 个投票
It looks like some SimEvents functions needed for block initialization are not sent to the worker. You could try following the procedure in Technical Solution# 1-AL5N3X to add $matlabroot/toolbox/des/ to the path on all workers.
2 个评论
Edric Ellis
2011-2-10
If Nikola is using the local scheduler, then this should not be a problem as the MATLAB paths on the workers will be synchronized with the client.
Nebitno
2011-2-10
类别
在 帮助中心 和 File Exchange 中查找有关 Discrete-Event Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!