A statechart is a hierarchical state machine, introduced by Harel. Since it is hierarchical, its capability to reduce complexity and state proliferation allows to be used also for real-world problems and not only for toy or theoretical examples. The UML state diagram is an OO adaptation of the Harel statechart.
Questions tagged [statechart]
133 questions
1
vote
2 answers
Hierarchical State Machine with Graphviz
I'm trying to make a State diagram of the Vendor Machine with the help of Graphviz.
I want a outcome close to this one.
It consists of nested State Machines as well. Here is what I have done so far in Graphviz. Please find the online demo…

Gaurav Saxena
- 45
- 7
1
vote
1 answer
Specifying agent properties when using .inject()
For logic testing purposes, I am using a clickable button triggering "source.inject()." The preceding logic for the agents is dependent on agent characteristics. Thus, it is preferable to have control over which characteristics they get during…

Gaute
- 49
- 7
1
vote
1 answer
Accessing specific Agent during Runtime by clicking on it in 2D-view, debugging
I am debugging my simulation. There is a patient (agent) that is stuck where it should not be. I want to see where in the statechart the patient is stuck but I find it tedious to punch through the list of agents in Developer panel every time and…

Gaute
- 49
- 7
1
vote
1 answer
Checking agents in a Seize Block
I wonder how I can trigger a conditional state chart transition (located in an agent, Patient) by checking if a queue (located in Main in a Seize Block) contains patients with a certain characteristic (p_contaminated, boolean parameter here should…

Gaute
- 49
- 7
1
vote
1 answer
Statechart diagram - What's the difference between entry and do?
I know that action starts to execute upon the entry, and the actions executes for do as long it's in the state.
but I think there's a lack of definition for entry, is it similar to do or the action executes upon entry to the state and it keeps…

Mostfa shma
- 193
- 1
- 6
1
vote
2 answers
IAR VisualState Requiring Trigger For Every Expression inside a State
I have been using State machine based design tools for some time, and have seen UML modeling tools that allow you to execute your logic (call functions, do other stuff) inside a state. However, after spending a couple days with IAR VisualState, it…

Rob
- 147
- 1
- 1
- 7
1
vote
2 answers
Recording state changes in boost::statechart
For Unit Testing, I'm trying to record all the state transactions after I kick off a state machine event.
E.g., if I post_event A to the fifo_scheduler of an async_state_machine, the state machine will go through states B, C, then back to D.
Without…

kenyee
- 2,309
- 1
- 24
- 32
1
vote
2 answers
State machine/ State chart in-cycle transition
If a state machine is called periodically (in MatLAB Simulink or PLC program), is it possible to transition between states during the same plc cycle/simulink step?.
In Twincat 3 (PLC) there is such an option "Cycle-internal" as in link below:…

Sherif Ibrahim
- 13
- 4
1
vote
1 answer
Anylogic Statechart timer?
I want to know if it's possible to time how long the system has been in a specific state? And when it leaves the state, the "stopwatch" stops and then carries on when the state is once again entered?
If so, how?

Andrea Kuther
- 11
- 1
1
vote
1 answer
Anylogic statechart with loops to set 3 suites as idle or scheduled
(Main.java:935)__(NPE Error Image) I have 3 identical suites represented as an agent type ProductionOrder. A button on main sends a call to inject to the source on main. The source creates a ProductionOrder agent and has the following code in its…

Harrison Pressman
- 15
- 3
1
vote
1 answer
How do I depict a return statement in an UML state machine?
Is it possible to display a return statement as the description of a transition in an UML statechart?
Is there any defined syntax or convention?
Example:
int doSomething()
state 1 --- return doSomething() ---> state 2
I didn't find anything fitting…

Yeliz
- 25
- 8
1
vote
2 answers
UML Statechart Diagrams + Navigation Bar + Multiple exit actions
Hope all is well! I am making a UML statechart diagram for a website. If you have a navigation bar, would/can you have multiple exit actions representing each link?

galal27
- 51
- 1
- 8
1
vote
1 answer
How to create dependencies in statechart?
Example StateChart
I've got a system, that is depending on another system.
I want to display this in a statechart.
System 1: microwave_state with two states: On and Off
When microwave_button is pressed AND system 2 current state is true, then…

aydogdu
- 115
- 1
- 1
- 8
1
vote
1 answer
Use-case, class and statechart diagram examples
I wish to learn about the diagrams mentioned in the title but on the internet one can find a lot of trash, I have seen some that contradict each other.
Hence I wish someone experienced if they could spare a minute to direct me to reliable sources…

agiro
- 2,018
- 2
- 30
- 62
1
vote
1 answer
Anylogic - Understanding communication between agents
Consider two agents, with statecharts. Now I have read that the two are able to communicate or make use of each others statecharts, via messages.
Now, the question is, how does this method of communication work ? As in does a message initiate the…

mahesh Rao
- 375
- 1
- 4
- 16