Reputation: 312
I am working on an agent based simulation for an auction strategy simulation. Here are the details,
I have a population (100) of agents with a parameter budget with a value uniform(70,100) billion Euro.
You can see the statechart flow in the above image. In the statechart combineBids, I want to rank the first three agents with the lowest budget, and the other agents should exit to the notEligible state.
Upvotes: 0
Views: 57
Reputation: 9421
make a variable called doSomething instead of your agent type and make it type boolean
List <MyAgent> ags=sortAscending(myAgents,m->m.parameter).subList(0, 2);
for(MyAgent a : ags){
a.willDoSomething=true;
}
that code can go on the startup agent where the agents live (probably main)
then you need to add a branch after the combine bids and use the willDoSomething value to take them further down the statecharts or to not eligible state
Upvotes: 1