MATLAB: Do I receive the warning unconditional transition shadows other transitions

andchart;parallelshadowingstateflowsub-charttransitionunconditional

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.

Best Answer

  • 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.