Why do I receive the warning unconditional transition shadows other transitions?

조회 수: 21 (최근 30일)
Why do I receive the warning "unconditional transition shadows other transitions"?
I have multiple sub-charts within my Stateflow chart. I want them to execute concurrently. Therefore I have a default transition leading to each sub-chart.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2019년 4월 26일
This warning occurs when there are multiple unconditional transitions from the same group of outgoing transitions from a particular state or junction. This is a problem because one unconditional transition will have a higher order than the other thus preventing the latter unconditional transition from ever executing.
In the model all default transitions are technically unconditional transitions. They are also all outgoing transitions of the entire Stateflow Chart itself. The Stateflow Chart can be thought of as the highest level state. More information on transition shadowing can be found in the link below:
Therefore, in the model only one sub-chart executes while the others do not.
If you want each sub-chart to execute concurrently, parallel states should be used.
1) You should create a state for each of your sub-charts.
2) Move each sub-chart onto its respective state
3) Then change the state type to Parallel by right-clicking outside of the states and selecting:
Decomposition > Parallel (AND)
Each parallel state is allowed to have its own default transition. More information on Parallel States can be found in the link below:
Now all the sub-charts should execute during simulation. You can observe this by selecting:
Simulation > Stateflow Animation > Slow
and then run the simulation.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by