Reputation: 2213
Suppose you have two agent types:
Suppose Type 2 has a statechart with two states as follows: Agent Type 2 statechart
If all 10 agents of Type 1 send the same message simultaneously or at least with intervals smaller than the timeout transition shown in the image, what happens to the messages received while the the agent of Type 2 is in the state "evaluateLenderDecision"? Are the messages discarded or queued until the state "waitingForLender" is reached again?
Upvotes: 0
Views: 282
Reputation: 9421
First I suggest you watch this youtube video I made that explains how messages are sent. https://www.youtube.com/watch?v=Fe2U8IAhlHM
The messages using send or deliver are received in the connections object where the message is redirected to the different state charts that you define there.
In your case, you should maybe generate a queue yourself with all the messages that have been received (using a collection maybe)
If your messages are sent at the same time, 9 of your 10 agents will have their message discarded from your statechart point of view since there will be no statechart waiting for a message after the first one is received, but not from your connections point of view... All messages are received effectively.
Upvotes: 0