|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<T>
repast.simphony.context.AbstractContext<T>
repast.simphony.context.SmallDefaultContext<T>
repast.simphony.context.DefaultContext<AgentType>
de.cesr.sesamgim.context.GMarketCellContext<AgentType>
public class GMarketCellContext<AgentType extends GimMilieuAgent<AgentType>>
| Field Summary | |
|---|---|
protected GimAreaContext<? super AgentType> |
area
|
protected boolean |
inInhabitedArea
|
protected com.vividsolutions.jts.geom.Point |
loc
|
protected Map<Integer,GimMilieuContext<AgentType>> |
milieuContextMap
|
protected String |
mz_id
|
protected repast.simphony.engine.schedule.ISchedule |
schedule
|
protected GUpdatableContextStructure |
structure
|
| Fields inherited from class repast.simphony.context.SmallDefaultContext |
|---|
allObjs, objectMap |
| Fields inherited from class repast.simphony.context.AbstractContext |
|---|
subContexts |
| Fields inherited from interface repast.simphony.context.Context |
|---|
SYN_CONTEXT_PREFIX |
| Constructor Summary | |
|---|---|
GMarketCellContext(GimAreaContext<? super AgentType> area,
String identifier)
Adds the new market cell to the given GAreaContext. |
|
GMarketCellContext(GimAreaContext<? super AgentType> area,
String identifier,
com.vividsolutions.jts.geom.Point loc,
GUpdatableContextStructure structure)
|
|
| Method Summary | |
|---|---|
boolean |
addAgent(AgentType agent)
Substitutes Collection.add(Object) in order to add
agents to GimMilieuContexts. |
void |
assignSuperContext(repast.simphony.context.Context<? super AgentType> superContext)
If GBasicPa.ADD_MC_TO_AREA is TRUE, this MC context _was_ added
to the GimAreaContext is is contained in during construction
(backward compatibility). |
int |
getAreaIdentifier()
Returns the area identifier |
String |
getID()
Return the context's id. |
GimMilieuContext<AgentType> |
getMilieu(int milieuId)
Returns the milieu context of this market cell with the given ID |
protected Map<Integer,GimMilieuContext<AgentType>> |
getMilieuContextMap()
|
int |
getNumHouseholds(Calendar cal,
int milieuGroup,
int hhSize)
Returns the number of households within this market cell (usually as defined in Microm (R) data). |
boolean |
isInInhabitedArea()
NOTE: The check whether this MC is located in an inhabited area is performed during initialisation of the MC! |
boolean |
isMcStructureSet()
|
void |
setLocation(com.vividsolutions.jts.geom.Point loc)
|
void |
setUpdatableContextStructure(GUpdatableContextStructure structure)
|
int |
size()
|
void |
step()
The method is used to adapt the data to time developments. |
String |
toString()
|
| Methods inherited from class repast.simphony.context.DefaultContext |
|---|
addInternal, containsInternal, iteratorInternal, removeInternal, sizeInternal |
| Methods inherited from class repast.simphony.context.SmallDefaultContext |
|---|
getObjects, getRandomObject, getRandomObjects |
| Methods inherited from class repast.simphony.context.AbstractContext |
|---|
add, addContextListener, addProjection, addSubContext, addValueLayer, clear, contains, eventOccured, findContext, findParent, fireAddContextEvent, fireRemoveEvent, fireSubContextAdded, fireSubContextRemoved, getAgentLayer, getAgentTypes, getContextListeners, getId, getProjection, getProjection, getProjections, getProjections, getSubContext, getSubContexts, getTypeID, getValueLayer, getValueLayers, handleRemove, hasSubContext, iterator, query, remove, removeContextListener, removeProjection, removeSubContext, removeValueLayer, setId, setTypeID |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface repast.simphony.context.Context |
|---|
addContextListener, addProjection, addSubContext, addValueLayer, findContext, findParent, getAgentLayer, getAgentTypes, getContextListeners, getObjects, getProjection, getProjection, getProjections, getProjections, getRandomObject, getRandomObjects, getSubContext, getSubContexts, getTypeID, getValueLayer, getValueLayers, hasSubContext, query, removeContextListener, removeProjection, removeSubContext, removeValueLayer, setTypeID |
| Methods inherited from interface java.util.Collection |
|---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from interface repast.simphony.context.RepastElement |
|---|
getId, setId |
| Field Detail |
|---|
protected String mz_id
protected com.vividsolutions.jts.geom.Point loc
protected GimAreaContext<? super AgentType extends GimMilieuAgent<AgentType>> area
protected GUpdatableContextStructure structure
protected repast.simphony.engine.schedule.ISchedule schedule
protected boolean inInhabitedArea
protected Map<Integer,GimMilieuContext<AgentType extends GimMilieuAgent<AgentType>>> milieuContextMap
| Constructor Detail |
|---|
public GMarketCellContext(GimAreaContext<? super AgentType> area,
String identifier,
com.vividsolutions.jts.geom.Point loc,
GUpdatableContextStructure structure)
public GMarketCellContext(GimAreaContext<? super AgentType> area,
String identifier)
GAreaContext. Schedules
this#step() to update population. Adds this MC to the geography.
area - identifier - loc - structure - | Method Detail |
|---|
public boolean addAgent(AgentType agent)
GimMilieuContextAwareContextCollection.add(Object) in order to add
agents to GimMilieuContexts.
addAgent in interface GimMilieuContextAwareContext<AgentType extends GimMilieuAgent<AgentType>>AbstractContext.add(java.lang.Object)protected Map<Integer,GimMilieuContext<AgentType>> getMilieuContextMap()
public void step()
GimMarketCellContext
step in interface GimMarketCellContext<AgentType extends GimMilieuAgent<AgentType>>GimMarketCellContext.step()
public int getNumHouseholds(Calendar cal,
int milieuGroup,
int hhSize)
GimAgentNumberProvidingContext
getNumHouseholds in interface GimAgentNumberProvidingContext<AgentType extends GimMilieuAgent<AgentType>>de.cesr.sesamgim.context.GimMarketCellContext#getNumHouseholds(int, int, int)public int size()
size in interface Collection<AgentType extends GimMilieuAgent<AgentType>>size in class repast.simphony.context.AbstractContext<AgentType extends GimMilieuAgent<AgentType>>public GimMilieuContext<AgentType> getMilieu(int milieuId)
GimMilieuContextAwareContext
getMilieu in interface GimMilieuContextAwareContext<AgentType extends GimMilieuAgent<AgentType>>milieuId - milieu ID of the Milieu
GimMilieuContextAwareContext.getMilieu(int)public String getID()
GimMilieuContextAwareContextGimMarketCellContexts or the PLZ for GimPlzContexts.
getID in interface GimMilieuContextAwareContext<AgentType extends GimMilieuAgent<AgentType>>de.cesr.sesamgim.context.GimMarketCellContext#getMZ_ID()public int getAreaIdentifier()
GimMarketCellContext
getAreaIdentifier in interface GimMarketCellContext<AgentType extends GimMilieuAgent<AgentType>>GimMarketCellContext.getAreaIdentifier()public boolean isInInhabitedArea()
GimMarketCellContext
isInInhabitedArea in interface GimMarketCellContext<AgentType extends GimMilieuAgent<AgentType>>GimMarketCellContext.isInInhabitedArea()public String toString()
toString in class AbstractCollection<AgentType extends GimMilieuAgent<AgentType>>AbstractCollection.toString()public void setUpdatableContextStructure(GUpdatableContextStructure structure)
setUpdatableContextStructure in interface GimAgentNumberProvidingContext<AgentType extends GimMilieuAgent<AgentType>>GimAgentNumberProvidingContext.setUpdatableContextStructure(de.cesr.sesamgim.util.GUpdatableContextStructure)public void assignSuperContext(repast.simphony.context.Context<? super AgentType> superContext)
GBasicPa.ADD_MC_TO_AREA is TRUE, this MC context _was_ added
to the GimAreaContext is is contained in during construction
(backward compatibility). Otherwise, the MC context is assigned to all
GimPlzContexts it intersects with. The given super context is
ignored.
This method is usually called from GShapefileLoader.
assignSuperContext in interface GimSuperContextAssignable<AgentType extends GimMilieuAgent<AgentType>>GimSuperContextAssignable.assignSuperContext(repast.simphony.context.Context)public void setLocation(com.vividsolutions.jts.geom.Point loc)
setLocation in interface GimMarketCellContext<AgentType extends GimMilieuAgent<AgentType>>GimMarketCellContext.setLocation(com.vividsolutions.jts.geom.Point)public boolean isMcStructureSet()
isMcStructureSet in interface GimMarketCellContext<AgentType extends GimMilieuAgent<AgentType>>GimMarketCellContext.isMcStructureSet()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||