Author Topic: State Machine Simulation Problems (entry/exit, history, nested)  (Read 7011 times)

Inuit

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
State Machine Simulation Problems (entry/exit, history, nested)
« on: January 24, 2018, 12:37:10 am »
Hi all,

I'm running into a few Problems when trying to simulate state machines. To experiment with EA's capabilities I tried to reproduce the STM on page 35 of the Simulation User Guide here: http://sparxsystems.com/resources/user-guides/simulation/executable-state-machines.pdf.

The problems are:
1. Shallow History is not functioning as intended (it is acting as a normal initial). Region B and E are also not activated.
2. Entry point is not available. Although modeled according to the guide, EA does not provide me with the waiting trigger "ENTRYPOINT". Manually activating the trigger does nothing.
3. Deep history is not available. Same as above.
4. Rogue state activation of D2 and consequently D3. When the "DEFAULT" trigger is fired, the state D2 gets activated as well for some reason.

I'm using EA 13 and SysML 1.4 (also tried with UML). If you have any advice or need some more information let me know!

Cheers,
Inuit

Inuit

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: State Machine Simulation Problems (entry/exit, history, nested)
« Reply #1 on: January 29, 2018, 11:40:47 pm »
Or perhaps an easier question: How do I simulate an entry point?

I have tried connection point references (see http://sparxsystems.com/enterprise_architect_user_guide/13.0/model_domains/create_a_connection_point_refe.html) and to do something with composite states, but the simulation stops right before the entry point!

EricBurgers1963

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: State Machine Simulation Problems (entry/exit, history, nested)
« Reply #2 on: July 05, 2019, 02:06:38 am »
I'm running into the same problem. History state is not working as expected / doesn't do anything. I tried both the SysML and UML statemachines. Either I'm doing something fundamentally wrong or Sparx has broken their dynamic simulation engine. I hope they are monitoring these posts as I will visit the Sparx booth on the INCOSE International Symposium 2019 in Orlando and show them this issue.....

bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
Re: State Machine Simulation Problems (entry/exit, history, nested)
« Reply #3 on: July 05, 2019, 07:47:18 am »
We spent a lot of time getting the C++ generated code to work with the state machines. We had to modify the templates to do so. Some of our trouble may have been because we didn't understand how it was supposed to work, but I'm pretty convinced the templates don't work as delivered (I don't think state machines can run in parallel, for example, the way the templates are defined).

I'm guessing they don't get a lot of use, based on searching through the forum. 

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: State Machine Simulation Problems (entry/exit, history, nested)
« Reply #4 on: July 05, 2019, 10:02:58 am »
>> ... as I will visit the Sparx booth on the INCOSE International Symposium 2019 in Orlando and show them this issue.....

Or you could contact Sparx Support directly right now, either submitting a bug report or a simple email, and perhaps have a conversation about the problem? The bug report link is at the bottom of the page, in the Support column, and the email address is [email protected].
« Last Edit: July 05, 2019, 10:04:41 am by RoyC »
Best Regards, Roy

EricBurgers1963

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: State Machine Simulation Problems (entry/exit, history, nested)
« Reply #5 on: August 23, 2019, 12:16:58 am »
I submitted a bug report - the response I got was that my particular problem is a feature request. I felt a bit disappointed about that. The reason is that I would like to take systems engineering to the next level by simulating my models, and even connect my model to another (virtual) environment to verify/test my models. Now that SysML acceptance in my industry is increasing, I really would like to start simulating so customers can see what Model Based Systems Engineering is all about. Having only a subset of SysML available for simulation severely impacts my possibilities with EA alone. I'm already considering using Modellica to model behaviour (state machines, activities). (I know that for parametrics this is  already possible with EA). I hope dynamic simulation (complete support) will receive priority by Sparx...

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: State Machine Simulation Problems (entry/exit, history, nested)
« Reply #6 on: August 23, 2019, 10:13:56 am »
EA supports two options for State Machine simulation:
1) Executable State Machine and 2) Behavioral model Simulation of State Machines.
The Executable State Machine simulation covers all aspects of State Machine modeling. This is the recommended one to use if you are wanting full History, Shallow & Deep entry points.  The standard simulation - part of the UML Behavioral modeling simulation -  covers the more popular aspects of state machines, but not the more esoteric points.
For some examples see the EAExample.eap model:
 - Example Model.Model Simulation.Executable State Machine
See the Help topics:
https://sparxsystems.com/enterprise_architect_user_guide/15.0/model_simulation/executable_statemachines_main.html
In terms of the code base, for straight simulation rather than for reuse externally, it is simplest to generate and run these in javascript.