|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.cesr.sesamgim.init.group.GGroupOrganiser<AgentType>
public class GGroupOrganiser<AgentType extends GimMilieuAgent<?>>
SesamGIM - Geographical Initialisation for Milieu Agents
Field Summary | |
---|---|
protected List<GimGroupContext<AgentType>> |
groupBasket
|
protected GimGroupInitialiseService<AgentType> |
groupIS
|
protected int |
maxGroupSize
|
protected int[] |
milieuSums
|
protected cern.jet.random.Uniform |
uniformDist
|
Constructor Summary | |
---|---|
GGroupOrganiser(int[] milieuSums,
GimGroupInitialiseService<AgentType> groupIS)
Init a GroupOrganizer for a certain market cell. |
Method Summary | |
---|---|
void |
eventOccured(repast.simphony.context.ContextEvent<AgentType> ev)
Observe Group Contexts to adapt group basket when their size reaches BasicPa.NEIGHBOURHOOD_SIZE: |
List<GimGroupContext<AgentType>> |
getGroupBasket()
|
GimGroupContext<AgentType> |
getGroupContext(AgentType agent)
Get the group context the next agent should be placed within. |
Collection<GimGroupContext<AgentType>> |
getInitialisedGroupContexts()
Returns the collection of initialised group contexts. |
int |
getNumberOfInitialisedGroupContext()
Returns the number of group contexts that have been initialised at the call of GimGroupInitialiser#initGroupContexts(GimMarketCellContext) . |
int |
getNumNeighbourhoods()
|
Collection<GimGroupContext<AgentType>> |
initGroupContexts(GimUpdatableContext<AgentType> uc)
Initialises the group basket. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int maxGroupSize
protected List<GimGroupContext<AgentType extends GimMilieuAgent<?>>> groupBasket
protected GimGroupInitialiseService<AgentType extends GimMilieuAgent<?>> groupIS
protected int[] milieuSums
protected cern.jet.random.Uniform uniformDist
Constructor Detail |
---|
public GGroupOrganiser(int[] milieuSums, GimGroupInitialiseService<AgentType> groupIS)
milieuSums
- sums of agents (not represented population) per milieuarea
- Method Detail |
---|
public Collection<GimGroupContext<AgentType>> initGroupContexts(GimUpdatableContext<AgentType> uc)
initGroupContexts
in interface GimGroupInitialiser<AgentType extends GimMilieuAgent<?>>
uc
- market cell contextde.cesr.sesamgim.init.group.GimGroupInitialiser#initGroupContexts(de.cesr.sesamgim.context.GimMarketCellContext)
public GimGroupContext<AgentType> getGroupContext(AgentType agent)
GGroupContext
allows to be informed of every added agent and to remove the
according group context from the basket ensures that no context is over-filled.
getGroupContext
in interface GimGroupInitialiser<AgentType extends GimMilieuAgent<?>>
agentInitUniform
-
public void eventOccured(repast.simphony.context.ContextEvent<AgentType> ev)
eventOccured
in interface repast.simphony.context.ContextListener<AgentType extends GimMilieuAgent<?>>
ContextListener.eventOccured(repast.simphony.context.ContextEvent)
public int getNumNeighbourhoods()
public List<GimGroupContext<AgentType>> getGroupBasket()
public int getNumberOfInitialisedGroupContext()
GimGroupInitialiser
GimGroupInitialiser#initGroupContexts(GimMarketCellContext)
. Return 0 if groups contexts have not been
initialised.
getNumberOfInitialisedGroupContext
in interface GimGroupInitialiser<AgentType extends GimMilieuAgent<?>>
GimGroupInitialiser.getNumberOfInitialisedGroupContext()
public Collection<GimGroupContext<AgentType>> getInitialisedGroupContexts()
GimGroupInitialiser
getInitialisedGroupContexts
in interface GimGroupInitialiser<AgentType extends GimMilieuAgent<?>>
GimGroupInitialiser.getInitialisedGroupContexts()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |