Simulink FastRestart doesnt change output

2 ビュー (過去 30 日間)
Marcus Heßeling
Marcus Heßeling 2021 年 2 月 16 日
コメント済み: Ahmed Fahmy 2022 年 2 月 21 日
Hey Guys,
i have a simulink model in a for loop. Every Iteration i change parameters in my system. If i run the system without Fast Restart, it changes it outcome as it should. But when i activate FastRestart in my model the output is always the same.
My Code is:
for k=1:3
alpha = [50-k,100+k,125-k,85+k];
s = [3-0.01*k,4+0.01*k,4-0.01*k];
t = [3+0.01*k,4-0.01*k,4+0.01*k];
geometrics = getGeometrics(alpha,s,t); %returns a strucArray. The Geometrics are used as length and angle Parameters in the Simulation
%start simulation
simOut = sim('Model.slx','CaptureErrors','on','SrcWorkspace','current');
%Solution
pos1 = simOut.xx.data;
disp(['Position: ' num2str(pos1), 'cm')]);
end
% The Display in normal like 1cm, 2cm, 3cm and in FastRestart 1cm, 1cm, 1cm
I have no idea why my output doesnt change in FastRestart. In
it is written that all my blocks must support ModelOperatingPoint but i dont know how to check that either.
  1 件のコメント
Ahmed Fahmy
Ahmed Fahmy 2022 年 2 月 21 日
But I tried something similar to what you did with fast restart and it worked fine with me. So I am curious to know how are you passing the swept parameters to your model? are you using from_work_space block or just using them as mask parameters of some blocks?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by