Форум

Hi, We have an agent-based model with a statechart consisting of 6 states (states A to F). During model execution, new agents are created and they enter their first state, say A, via the normal statechart entry point (thus each one has the same first state A); however, we would like to assign the initial agents to initial states (A-F, depending on agent parameters). Is it possible to do so? Thanks, Ricus
My first reaction is that I'd use a Statechart branch element. See my example.zip file here: http://drop.io/efg2vkd the agent enters the statechart, hits a branch, exits the branch based on the results of the getInitialState function. This returns a random integer, 1-6. You might have the startup code for the agent itself make a decision about initial state, though, and just have the getInitialState function return the information. Let me know if you have any questions about my example. /willy

Ваше сообщение