Questions tagged [statechart]

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Anylogic do not give the value of a variable

I am a beginner and I am simulating a single model. However, the functions I defined are not working. enter image description here TimeTask is a function of CurrentTask and the LearningTime is a ...
ghazal shahabadi's user avatar
0 votes
1 answer
69 views

How can I make the interaction of the a statechart and a flowchart in anylogic?

I have 5 restaurants in my model and I want to simulate the impatience of clients in a specific queue,in order to lead the agent to another queue if the ServiceTimeRestaurant1 > MaxWaitingTime (...
Pedro Sousa's user avatar
0 votes
1 answer
823 views

Resolving Multiple Promises with Parallel state (XState)

I have an xstate state machine that has 3 states, idle, waitingForA and waitingForB. waitingForB, in turn is a type of parallel state. I would like to return to initial state of 'idle' on waitingForB ...
SoftwareDveloper's user avatar
0 votes
1 answer
40 views

In State Duration

How can I estimate the duration an agent stays in a specific state in a state chart? I want to count the number of times an agent enters a state and the duration before the transition us triggered to ...
Aseel Alkhreasha's user avatar
-1 votes
1 answer
204 views

How do I count the number of agents that passed through a state from the statechart in Anylogic?

I wanna count the number of agents that passed through a state in a day from the statechart. and then I show them by a plot chart or time stack chart. I define some code in the state. Do they can ...
Masoud Zamanipoor's user avatar
0 votes
1 answer
139 views

check state of another statechart agent type Anylogic

I am in the statechart of the one agent type (Person) and I want to send a message to another agent type (Person2) in a certain state (atHome), but when I use code below the program throws me an error ...
Sebastian Vásquez's user avatar
1 vote
1 answer
82 views

Confused about title of a state and concurrency representation in state machine diagram

My object can be at different states at time according to its variables. So, I decided to put these possible states into a global composite state with concurrency notation. The object can only be at ...
Galaluddin Owais Galal's user avatar
1 vote
1 answer
564 views

How to diagram state machine that changes next state based on previously received events

I do not know if there is a good way to represent this in a UML2 statechart diagram. Given a set of states, State 1, State 2, State 3, and State 4. Given a set of events, Event 2, Event 3, and Event ...
Graznarak's user avatar
  • 3,640
0 votes
1 answer
213 views

In Anylogic, how to randomly select agents from a collection of collections

I am new to anylogic and am trying to build an agent-based model which randomly directs agents (vehicles) from a starting point (a Home location point on GIS map) to a selection of locations. I have 6 ...
Abdullah's user avatar
0 votes
1 answer
278 views

Statecharts for Redux

Current State Management Stack: React, RTK/Redux, and Redux-Saga Here's the high level issue. We have a complex flow and we don't have QA Engineering resources to be able to write the integration ...
Bobby Gagnon's user avatar
1 vote
1 answer
198 views

Anylogic: how to compare parameter and variable value within statechart?

In my Anylogic model I have a hub which can store 5 containers. So it has a capacity parameter with value 5. I also have given it a variable with the numberOfContainers stored at the hub at that ...
Ella's user avatar
  • 125
-1 votes
1 answer
99 views

Anylogic: avoid unwanted execution of process in seize block

I am trying to simulate manufacturing process by using statechart. And i have created agents for particular machines by statecharts and connecting those agents according to manufacturing process with ...
Mayank's user avatar
  • 1
2 votes
1 answer
146 views

How to handle stream of inputs and generate output based on input combination in UML State machine diagram

Following is a safety controller with input and output Condition given below for designing a state machine: Here SignalOk, SignalWeak and SignalLost are measurements signal quality of steering angle. ...
Priom Biswas's user avatar
0 votes
1 answer
626 views

Graphviz - Connect cluster (subgraph) directly to a node

I want to connect a cluster edge to a node. Please find a simple Graphviz code below. Here is the online demo. digraph G { compound=true; node1 subgraph cluster0 { label="...
Gaurav Saxena's user avatar
0 votes
1 answer
317 views

How can I add doActivity behavior to a state machine's state in IBM Rhapsody?

I'm new in IBM Rational Rhapsody. I'm drawing a state diagram using IBM Rational Rhapsody (ver. 8.4.1) for a class that it contains several states. I can add entry/exit actions to each state easily ...
Anmk's user avatar
  • 313
1 vote
1 answer
52 views

How can I react to events from a master statechart in Yakindu?

I have a statechart that does stuff depending on another statechart. Let's call them Master and Slave. In the Slave statechart I import the Master and assign it to a variable. import: "Master.ysc&...
ketla's user avatar
  • 31
1 vote
2 answers
336 views

How to determine the state in state diagram?

My system has more functions than it is shown inside the diagram but I am trying to do it based on the scenario. My current scenario is that the librarian/admin is trying to delete a book record from ...
Chin's user avatar
  • 105
1 vote
2 answers
805 views

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 ...
Gaurav Saxena's user avatar
0 votes
1 answer
498 views

How to change font size of a single record item in Graphviz

I'm trying to create a state chart from Graphviz of type record. Please check the reference here. So here is the basic code: digraph lamp { node [shape=point,label=""]ENTRY node [style=...
Gaurav Saxena's user avatar
0 votes
1 answer
73 views

how to render a better startchart graph on umple?

The umple is a very good to design UML statecharts, with rich set of semantic attributes in text mode. However, the embedded mechanism to draw correspondent statechart has scarce resources to show ...
Carlos Camargo's user avatar
0 votes
1 answer
124 views

How to trigger a condition transition using a cyclic event in AnyLogic?

I wanted to change the state of the agent(s) by a cyclic event(reset) as shown. What command should I used to trigger the transition(resetHome) every 24hrs after the first initial 12 hours?
Shirshendu Piplai's user avatar
0 votes
1 answer
64 views

Setting up an AnyLogic state chart to add 1 at a given rate

I have a system dynamics calculation which is currently working extremely well using a single parameter value however I would like it to source from a database. Using this AnyLogic help I have set up ...
Natasha Jones's user avatar
5 votes
1 answer
310 views

How can I Implement Statecharts in Haskell? [closed]

After having read the excellent book "Practical UML Statecharts in C/C++" by Miro Samek, I am eager to try them out sometime. More recently, I have started to teach myself Haskell and ...
user4311624's user avatar
0 votes
1 answer
203 views

Boost statechart : trying to implement the inner initial substate of an orthogonal state but compilation fails

seems I cannot implement a substate of an orthogonal state. When I declare SlewingStartST as the initial inner state of SlewingST, compilation fails : template < Tel aTel > class SlewingST : ...
sylwa06's user avatar
  • 77
0 votes
0 answers
17 views

Boost statechart fails to compile when using template state [duplicate]

compilation fails when I try to use my own template state complaining : src/fsm2.cpp: In member function ‘boost::statechart::result SlewingST::react(EvTelLost)’: src/fsm2.cpp:159:13: error: there are ...
sylwa06's user avatar
  • 77
0 votes
1 answer
157 views

Send events to parent statechart in multi state machine modeling in Yakindu

I have 2 statecharts, one being the parent and the other being the child. When the parent statechart is created, it also creates a child statechart using import: "Child.ysc" var child: Child ...
Sylvain Elias's user avatar
2 votes
1 answer
133 views

Hierarchical State Machine (HSM) Current State

I am researching HSM and I have a question about. In HSM (for all system), is there only one current state? For example; In my project, there is two user type : normal user and technician user. There ...
kaernk's user avatar
  • 63
0 votes
1 answer
47 views

How to compare conditions of an agent with all connected agents in statechart

I am working on my thesis associated with modeling farmers' behaviors in a river basin. I am having 6 agents that contain different populations of farmers. These farmers have been located on the GIS ...
Fariba's user avatar
  • 11
0 votes
1 answer
178 views

Problem: rack is occupied. Is it possible to remove agents from a racksystem without using them in a flowchart?

I am modeling order picking in anylogic: At the moment I create a population of agents and give them to the enter-block via an event. This block is connected with a rackstore block and puts the agents ...
Catwoman's user avatar
2 votes
1 answer
142 views

UML Statechart Delving Into vs Internal Transition

I have a question about statechart diagrams below; I suppose that, in UML, it is possible. In this case, execution order is S1 enter, S3 enter. Am I right? And In the next diagram, what is execution ...
kaernk's user avatar
  • 63
1 vote
1 answer
563 views

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 ...
Gaute's user avatar
  • 49
0 votes
1 answer
64 views

Simulating limited resources with Agent-Based Modeling

I am making an Agent-Based Model in AnyLogic where agent behavior is described in Statechart. I want to allocate certain resources to those agents (primarily rooms, in form of nodes), which is ...
Gaute's user avatar
  • 49
1 vote
1 answer
236 views

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 ...
Gaute's user avatar
  • 49
1 vote
1 answer
161 views

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 ...
Gaute's user avatar
  • 49
1 vote
1 answer
228 views

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 ...
Mostfa shma's user avatar
0 votes
0 answers
102 views

How can I send/copy selected parameters of an agent to other agents before its deletion?

I have an agent A. The agent has some parameters. The agent is performing a task. When he completes it, the agent is deleted. In the meantime, further processes take place in other agents (B-D). In ...
Sihem's user avatar
  • 1
0 votes
1 answer
1k views

How can we change 3D animation object (agents representation) color based on statechart?

I have a person agent who has a 3D representation of a man (default 3D pic of a human from anylogic). Can we change color of that 3D person agent's representation based on states? For example, when a ...
Tariq's user avatar
  • 57
0 votes
1 answer
121 views

Is it possible to run through several states in one statechart at the same time?

Is it possible to run through several states in one statechart at the same time? My simulation model is agent-based. A) At the moment I consider my process as a continuous chain for simplicity. This ...
Sihem's user avatar
  • 1
3 votes
1 answer
2k views

Using xstate, is it possible to configure an event that is applicable under all states and is handled in the same way across all states and substates?

I am new to xstate, and I'm trying to use it in an application where a user can request different things in an application, based on parent state and/or sub-state. However, there are some requests ...
curiousWebDev's user avatar
0 votes
0 answers
489 views

Nested State-Machine C++

first time in Stackoverflow! I am quite new in C++ and OOP and I am currently struggling with a problem when trying to design a StateChart in C++. I have found some documentation explaining how to ...
WTI_Carmelo's user avatar
0 votes
1 answer
146 views

Is it possible to show all statecharts from different agent at the same time during execution?

I have several agents.In each agent, I've made a state chart. Some states overlap with other states from other agents. With my simulation I want to show in which state an agent is currently in. Is it ...
Sihem's user avatar
  • 1
0 votes
1 answer
130 views

How I can send command to the person agents living in one specific GIS region? Consider there are several GIS regions

Suppose there are 1000 Person agent on 4 (a,b, c,d) GIS region area. On a certain event, I want to communicate with all the agents living inside GIS region "a" . In "a" region we have 200 person ...
Tariq's user avatar
  • 57
1 vote
2 answers
552 views

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 ...
Sherif Ibrahim's user avatar
0 votes
1 answer
74 views

Trigger new state with more than one message?

I'm trying to trigger a new state in a statechart with one message or another. Think about "waking up" a sleeping laptop with a message like "mouse click" or "keyboard stroke". Either action would ...
Brian Babo's user avatar
0 votes
1 answer
536 views

Boost MSM: using state machine itself as implicit top level state

I have a state machine with states A, B and C. C handles event e directly, while A and B do not, but I want to fallback to a default handler (what Samek calls the "ultimate hook" pattern) for event e (...
pmf's user avatar
  • 7,679
1 vote
1 answer
589 views

Anylogic Statechart timer? [closed]

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? ...
Andrea Kuther's user avatar
2 votes
1 answer
264 views

Boost statechart `state context` is null

I have a small sm with just one state for now. I want from within the state, to access some data that is received and stored by the sm on construction: struct data { std::string m_ip; data(...
codentary's user avatar
  • 1,043
1 vote
1 answer
165 views

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 ...
Harrison Pressman's user avatar
0 votes
1 answer
56 views

Using loops to set an agent type as idle that will accept an agent when in that state and reject if busy

I have 3 identical suites represented by one agent type for productionSuite and I want to use loops to set the suites as idle and busy. The agent of productionOrder needs to be sent to only the idle ...
Harrison Pressman's user avatar
0 votes
1 answer
588 views

How to use a state chart as the flow chart for an agent

I have two processes I want to juxtapose. The first is a Manual workflow that is well represented by the Process library. The second is a software System that performs the same work, but is better ...
brett's user avatar
  • 33