0
votes

I am preparing to my exam on system modelling and found a wierd task among the ones which teacher gave us. It should be done in Anylogic 5..

"Add 2 statecharts to model. Send signal from one to another"

How can i do it? We neved did something like this on our practical lessons and i found nothing about connecting and sending something between STATECHARTS, only between states inside statecharts itself.

Appreciate any help with this.

1

1 Answers

0
votes

Your problem statement is a bit unclear, but I suspect the intention is that you use messages to 'send signals between statecharts'. See the help Agent Based Modeling --> Communication between Agents.

For example, you could have one statechart with transitions responding to messages "Hello" and "Goodbye", with another responding to messages "Sausage" and "Eggs". And then, say, the entry action of some state in your first statechart would send a message "Sausage" to the other, thus signalling it to change state.

(If they're both in the same Active Object / Agent you can just use send("Sausage", this) to send the message to 'yourself'.)

It should be done in Anylogic 5.

BTW, did you really mean this? AnyLogic 5 is absolutely ancient and I'm not even 100% sure the message passing exists as I define here in that version. (It might....)