Why do I receive the warning unconditional transition shadows other transitions?
18 views (last 30 days)
Show older comments
MathWorks Support Team
on 31 Oct 2018
Answered: MathWorks Support Team
on 25 Apr 2019
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.
Accepted Answer
MathWorks Support Team
on 26 Apr 2019
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 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!