Thanks a lot for the very interesting material! As proposed by the challenge of Lesson 19 I am trying to run the state machine simulation for other state machines. First I have tried the one shown for Lesson 19 and everything works fine in both interactive and scenario modes. However, when I try to run the simulation script on my own state machines I get the following error: “AttributeError: ‘OrthogonalState’ object has no attribute ‘initial’ “. Initially I thought it was an issue with my state machines, but then I tried the solution for Lesson 18 and the problem persists. Is this problem appearing only for my side?
Hi Antonio! Welcome to the community!
Can you paste your model here so I can try to replicate your issue? Also, are you on Windows, Mac, or Linux?
Adam Layne, PhD
Dear Adam,
I am working on Mac with the local VS Code installation of Syside Modeller and Automator. I am importing the models and scripts from the various episodes in my installation. Please note that also the solution for the challenge available in the Advent repository is creating the same error. Anyway, I am attaching the model.
Antonio
Antonio,
Your example did not produce the error for me. @Vytautas may have better advice, but if you are able to uninstall and then reinstall Syside Modeler and Automator, that may fix it. Your license key should work just fine to activate again.
Adam Layne, PhD
Thanks Adam, I just tried to uninstall and reinstall Modeler and Automator but I get the same problem.
I will give it some other tries when I have more time.
Antonio
Hi Antonio,
Thanks for reporting this!
The Lesson 19 simulation script was built around the SleighFlightMonitor model, which only uses simple and compound states. The L18 model uses a parallel state (cruising), which sismic represents as an OrthogonalState that was not accounted for.
Specifically, the visualization code assumed that all composite states have a single initial substate, but parallel states have multiple regions, each with its own entry point.
I’ve updated the script in the Advent of SysML repo - you can see the changes here: fix: handle orthogonal states in L19 state simulation visualization · sensmetry/advent-of-sysml-v2@4f17a9c · GitHub
Dear Simas,
thanks a lot, indeed this fixes the problem. I guessed it was something related to parallel states because of the OrthogonalState error and because it worked well with other state machines. As written I would have gone through the code to check when this issue with initial state(s) was emerging, but of course you were much faster than me ![]()
Thanks again and kind regards,
Antonio
Glad to hear it fixes the issue. Let us know if you hit any more roadblocks ![]()
Happy modeling!
Simas
