Subsystem using SimScape components

조회 수: 3 (최근 30일)
Stephen
Stephen 2011년 8월 10일
I am running a For Each Subsystem It uses Simscape components.
I get the error msg saying the EXEC_BBLOCK has a discrete sample time. Only constant (inf) or inherited (-1) sample times are allowed in iterator subsystem. The solver automatically changes to VariableStepDiscrete because SimScape models are used.
Does this mean that Simscape components cannot be used in subsystems?

답변 (2개)

Arnaud Miege
Arnaud Miege 2011년 8월 10일
If you look at the documentation for the For Each Subsystem, it says that "The For Each Subsystem block does not support [...] Blocks with continuous sample times or with explicit discrete sample times inside the subsystem". This means that you can't use Simscape blocks within a For Each subsystem since Simscape blocks have either a continuous sample time or a discrete sample time, if the local solver is used. What is it you are trying to do?
Arnaud

Stephen
Stephen 2011년 8월 10일
Thanks, I will not use a For Each Subsystem.
I was trying to automate the running of multiple simulations as one parameter is varied.
  댓글 수: 1
Arnaud Miege
Arnaud Miege 2011년 8월 10일
My suggestion would be to have just one model and use a MATLAB script to sweep through the parameter values with a for loop. If you have a multicore machine and would like to distribute the iterations of the model across the multiple cores, you can do that by replacing the for loop with a parfor loop. This would require the Parallel Computing Toolbox.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Troubleshooting에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by