de.cesr.sesamgim.core
Class GManager

java.lang.Object
  extended by de.cesr.sesamgim.core.GManager

public class GManager
extends Object


Field Summary
protected  com.vividsolutions.jts.geom.GeometryFactory geoFactory
           
protected  repast.simphony.space.gis.Geography<Object> inhabitedAreaGeography
           
protected static GManager manager
           
protected  Set<GimParameterConsistencyChecker> paramConsistencyCheckers
           
protected static de.cesr.uranus.core.UranusRandomService randomService
           
protected  repast.simphony.context.Context<Object> rootContext
           
protected  repast.simphony.space.gis.Geography<Object> rootGeography
           
protected  Collection<GimUpdatableContext<?>> ucContexts
           
protected  repast.simphony.space.gis.Geography<Object> utmGeography
           
 
Constructor Summary
protected GManager()
           
 
Method Summary
 void afterInit()
          Should be called from the user model after any geo-initialisation.
 void checkParameterSettingConsistency()
           
 com.vividsolutions.jts.geom.GeometryFactory getGeomFactory()
           
 repast.simphony.space.gis.Geography<Object> getInhabitedArea()
          Get the geography that designates living areas.
static GManager getMan()
          Provides an instance of this GManager.
 Collection<GimMarketCellContext<?>> getMarketCellContexts()
          Gives all MarketCellContexts
 repast.simphony.context.Context<Object> getRootContext()
           
 repast.simphony.space.gis.Geography<Object> getRootGeography()
           
 Collection<GimUpdatableContext<?>> getUpdatableContexts()
          Gives all MarketCellContexts
static de.cesr.uranus.core.UranusRandomService getURandomService()
          Return the random manager that is used for random processes.
 repast.simphony.space.gis.Geography<Object> getUtmRootGeography()
          TODO keep up to date
protected  void init()
          TODO incorporate PARMA listener mechanism Inits random stream(s)
 void removeParameterConsistencyChecker(GimParameterConsistencyChecker checker)
           
static void reset()
          Resets the current instance of GManager.
 void setRootContext(repast.simphony.context.Context<Object> rootContext)
           
 void subscribeParameterConsistencyChecker(GimParameterConsistencyChecker checker)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected static GManager manager

rootContext

protected repast.simphony.context.Context<Object> rootContext

geoFactory

protected com.vividsolutions.jts.geom.GeometryFactory geoFactory

rootGeography

protected repast.simphony.space.gis.Geography<Object> rootGeography

utmGeography

protected repast.simphony.space.gis.Geography<Object> utmGeography

inhabitedAreaGeography

protected repast.simphony.space.gis.Geography<Object> inhabitedAreaGeography

ucContexts

protected Collection<GimUpdatableContext<?>> ucContexts

paramConsistencyCheckers

protected Set<GimParameterConsistencyChecker> paramConsistencyCheckers

randomService

protected static de.cesr.uranus.core.UranusRandomService randomService
Constructor Detail

GManager

protected GManager()
Method Detail

getMan

public static GManager getMan()
Provides an instance of this GManager. NOTE: This method may not be called before parameters are set up because it calls init() which initialises random number generators and uses random seed parameters!

Returns:
GManager instance

init

protected void init()
TODO incorporate PARMA listener mechanism Inits random stream(s)


checkParameterSettingConsistency

public void checkParameterSettingConsistency()

subscribeParameterConsistencyChecker

public void subscribeParameterConsistencyChecker(GimParameterConsistencyChecker checker)
Parameters:
checker - to add

removeParameterConsistencyChecker

public void removeParameterConsistencyChecker(GimParameterConsistencyChecker checker)
Parameters:
checker - to remove

getGeomFactory

public com.vividsolutions.jts.geom.GeometryFactory getGeomFactory()

getInhabitedArea

public repast.simphony.space.gis.Geography<Object> getInhabitedArea()
Get the geography that designates living areas. Note: Root context type is object since it needs to contain agent types and area types that have no appropriate common super type.

Returns:

getUtmRootGeography

public repast.simphony.space.gis.Geography<Object> getUtmRootGeography()
TODO keep up to date

Returns:

getURandomService

public static de.cesr.uranus.core.UranusRandomService getURandomService()
Return the random manager that is used for random processes.

Returns:
the random manager

afterInit

public void afterInit()
Should be called from the user model after any geo-initialisation. Outputs shape files if defined.


reset

public static void reset()
Resets the current instance of GManager.


getRootContext

public repast.simphony.context.Context<Object> getRootContext()
Returns:
the rootContext

setRootContext

public void setRootContext(repast.simphony.context.Context<Object> rootContext)
Parameters:
rootContext - the rootContext to set

getMarketCellContexts

public Collection<GimMarketCellContext<?>> getMarketCellContexts()
Gives all MarketCellContexts

Returns:
collection with all MarketCellContexs

getUpdatableContexts

public Collection<GimUpdatableContext<?>> getUpdatableContexts()
Gives all MarketCellContexts

Returns:
collection with all MarketCellContexs

getRootGeography

public repast.simphony.space.gis.Geography<Object> getRootGeography()
Returns:
the rootGeography