How to activate Stateflow substate without flow graph

1 Ansicht (letzte 30 Tage)
olivier
olivier am 21 Jun. 2012
Hello,
I have 2 charts composed of several substates and when (for instance) going from chart1 to chart2, the active substate in chart2 should depend on the on conditions elaborated in the substates of chart1 . Drawing all the possible connections (with flow graph), would result in a "spaghetti" chart, so I was wondering if there is an other way to activate a substate.
Thank you

Antworten (1)

Siddharth Shankar
Siddharth Shankar am 6 Jul. 2012
Can you please expand on the question a bit? It would help if you could sketch out a very simple example example with maybe just 2-3 states in chart1 and the corresponding transitions required in chart2.
Something which might work (without knowing exactly what the problem is) is "Inner transitions". One place where you do get a lot of transitions is a situation where whenever some condition is true, you want to transition to a given state irrespective of where you are. In this case, suppose you have N states each with a condition [ci] for transitioning to it, you will need N^2 transitions to spell out the behavior correctly.
To avoid this, you can use inner transitions. This reduces you to only need N inner transitions rather than N^2 outer transitions.
This is probably best explained using a sketch but unfortunately I do not know of a way to attach an image.
  1 Kommentar
K E
K E am 12 Jul. 2012
Bearbeitet: K E am 12 Jul. 2012
Here is some information on inserting an image in a reply, and you can use the new image button on answer and comment blanks to insert it.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Syntax for States and Transitions finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by