Raise event after n seconds?

144 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Brian Beckman

ungelesen,
09.03.2016, 12:36:2609.03.16
an YAKINDU User
Hello -- I am trying to model a system with two concurrent regions. In one region, a timer counts down. When the timer expires, I intend for it to raise an event that causes the other region to transition. The following statechart illustrates my intent.  As you can see, the ok_to_go event for some reason does not make it over into the main region, or the event doesn't trigger the transition for some reason, I don't know.  My questions are the following:

1. Did I model my intent correctly and effectively (in good style)?
2. If the answer to question 1 is yes, do I have some syntactical or other error in my chart?
3. If the answer to question 2 is yes, how do I fix it?
4. If the answer to question 1 is no, what's a better model for my intent?
5. Finally, I'd be grateful for advice on how to debug models like this: I stared at it for a long time and I don't see my mistakes.

Brian Beckman

ungelesen,
09.03.2016, 12:41:4709.03.16
an YAKINDU User
I managed to solve my problem by changing from raising an event to toggling a variable

Auto Generated Inline Image 1

Thomas Kutz

ungelesen,
10.03.2016, 05:17:5610.03.16
an YAKINDU User
Hello,

the problematic aspect is not the time trigger but the communication between two different regions.

Basically, regions are executed in a deterministic order. So probably your main region is processed before the event is raised and removed from the event queue again. 

Die Nachricht wurde gelöscht
Die Nachricht wurde gelöscht

Johannes Dicks

ungelesen,
16.03.2016, 08:44:2116.03.16
an YAKINDU User
Hi Brian,
you might be interested in voting for https://github.com/Yakindu/statecharts/issues/475 which deals with the same aspect.

Regards,
Johannes
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten