public class Region extends Object implements Regions, PreTickAction
| Constructor and Description |
|---|
Region() |
Region(AllocationModel allocation,
CompetitivenessModel competition,
DemandModel demand,
Set<PotentialAgent> potential,
Cell... initialCells) |
Region(Cell... initialCells) |
Region(Collection<Cell> initialCells) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCell(Cell c) |
void |
addPotentialAgents(Collection<PotentialAgent> agents) |
void |
cellsCreated()
Called after all cells in the region have been created, to allow building a table of them
|
void |
cleanupAgents() |
boolean |
doesRequireEffectiveCapitalData() |
Collection<Agent> |
getAgents() |
Iterable<Agent> |
getAllAgents() |
Iterable<Cell> |
getAllCells() |
AllocationModel |
getAllocationModel() |
Iterable<PotentialAgent> |
getAllPotentialAgents() |
Iterable<Region> |
getAllRegions() |
Collection<Cell> |
getAvailable() |
Cell |
getCell(int x,
int y)
Returns the cell with the given x and y coordinates.
|
Collection<Cell> |
getCells() |
CompetitivenessModel |
getCompetitionModel()
Deprecated.
|
double |
getCompetitiveness(Cell c)
Gets the competitiveness of the cell's current production for the current
demand model and levels of demand
|
double |
getCompetitiveness(PotentialAgent agent,
Cell c)
Gets the competitiveness of the given services on the given cell for the
current demand model and level of demand
|
DemandModel |
getDemandModel() |
Extent |
getExtent() |
com.vividsolutions.jts.geom.GeometryFactory |
getGeoFactory() |
repast.simphony.space.gis.Geography<Object> |
getGeography() |
RegionHelper |
getHelper(Object id) |
String |
getID() |
InnovationRegistry |
getInnovationRegistry() |
Institutions |
getInstitutions() |
ModelData |
getModelData() |
de.cesr.more.basic.network.MoreNetwork<SocialAgent,de.cesr.more.basic.edge.MoreEdge<SocialAgent>> |
getNetwork() |
de.cesr.more.building.network.MoreNetworkService<SocialAgent,? extends de.cesr.more.basic.edge.MoreEdge<SocialAgent>> |
getNetworkService() |
int |
getNumCells() |
Map<String,String> |
getPeristerContextExtra() |
Collection<PotentialAgent> |
getPotentialAgents() |
RegionalRandom |
getRandom() |
RunInfo |
getRinfo() |
double |
getUnadjustedCompetitiveness(Cell c)
Just used for displays and checking, so see the effect without
institutions
|
double |
getUnadjustedCompetitiveness(PotentialAgent agent,
Cell c)
Just used for displays and checking to see the effect without
institutions
|
double |
getUnadjustedCompetitiveness(com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply) |
boolean |
hasCompetitivenessAdjustingInstitution() |
boolean |
hasInstitutions() |
void |
initialise(ModelData data,
RunInfo info,
Region r)
Sets of the Region from a ModelData.
|
boolean |
isSkipInitialAllocation() |
void |
makeUnmanagedCellsAvailable()
Sets all of the unmanaged cells to be available.
|
void |
perceiveSocialNetwork() |
void |
preTick() |
RegionHelper |
registerHelper(Object id,
RegionHelper rHelper) |
void |
removeAgent(Agent a) |
void |
setAllocationModel(AllocationModel d) |
void |
setAvailable(Cell c)
Deprecated.
|
void |
setCompetitivenessModel(CompetitivenessModel d) |
void |
setDemandModel(DemandModel d) |
void |
setHasCompetitivenessAdjustingInstitution() |
void |
setID(String id) |
void |
setInitialOwnership(Agent a,
Cell... cells)
Similar to setOwnership, but doesn't assume that anything is working yet.
|
void |
setInstitutions(Institutions inst) |
void |
setNetwork(de.cesr.more.basic.network.MoreNetwork<SocialAgent,de.cesr.more.basic.edge.MoreEdge<SocialAgent>> network) |
void |
setNetworkService(de.cesr.more.building.network.MoreNetworkService<SocialAgent,? extends de.cesr.more.basic.edge.MoreEdge<SocialAgent>> networkService)
Sets the network service.
|
void |
setOwnership(Agent a,
Cell... cells)
Sets the ownership of all the cells to the given agent Adds the agent to the region, removes
any agents with no cells left
|
void |
setRequiresEffectiveCapitalData() |
void |
setSkipInitialAllocation(boolean skipInitialAllocation) |
String |
toString() |
public Region()
public Region(AllocationModel allocation, CompetitivenessModel competition, DemandModel demand, Set<PotentialAgent> potential, Cell... initialCells)
public Region(Cell... initialCells)
public Region(Collection<Cell> initialCells)
public InnovationRegistry getInnovationRegistry()
public RegionalRandom getRandom()
public com.vividsolutions.jts.geom.GeometryFactory getGeoFactory()
public repast.simphony.space.gis.Geography<Object> getGeography()
public RunInfo getRinfo()
public de.cesr.more.building.network.MoreNetworkService<SocialAgent,? extends de.cesr.more.basic.edge.MoreEdge<SocialAgent>> getNetworkService()
public void setNetworkService(de.cesr.more.building.network.MoreNetworkService<SocialAgent,? extends de.cesr.more.basic.edge.MoreEdge<SocialAgent>> networkService)
networkService - the networkService to setpublic de.cesr.more.basic.network.MoreNetwork<SocialAgent,de.cesr.more.basic.edge.MoreEdge<SocialAgent>> getNetwork()
public void setNetwork(de.cesr.more.basic.network.MoreNetwork<SocialAgent,de.cesr.more.basic.edge.MoreEdge<SocialAgent>> network)
network - the network to setpublic void perceiveSocialNetwork()
public void initialise(ModelData data, RunInfo info, Region r) throws Exception
initialise in interface Initialisabledata - info - run informationr - region the initialisable object belongs toExceptionpublic AllocationModel getAllocationModel()
@Deprecated public CompetitivenessModel getCompetitionModel()
public DemandModel getDemandModel()
public void setDemandModel(DemandModel d)
public void setAllocationModel(AllocationModel d)
public void setCompetitivenessModel(CompetitivenessModel d)
public void addPotentialAgents(Collection<PotentialAgent> agents)
public void addCell(Cell c)
public Collection<Cell> getCells()
public Collection<Cell> getAvailable()
@Deprecated public void setAvailable(Cell c)
public Collection<Agent> getAgents()
public Collection<PotentialAgent> getPotentialAgents()
public void removeAgent(Agent a)
public void cleanupAgents()
public Iterable<Region> getAllRegions()
getAllRegions in interface Regionspublic Iterable<Agent> getAllAgents()
getAllAgents in interface Regionspublic Iterable<Cell> getAllCells()
getAllCells in interface Regionspublic Iterable<PotentialAgent> getAllPotentialAgents()
getAllPotentialAgents in interface Regionspublic double getCompetitiveness(PotentialAgent agent, Cell c)
agent - c - public double getUnadjustedCompetitiveness(PotentialAgent agent, Cell c)
agent - c - public double getCompetitiveness(Cell c)
c - public double getUnadjustedCompetitiveness(Cell c)
c - public double getUnadjustedCompetitiveness(com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply)
public void setOwnership(Agent a, Cell... cells)
a - cells - public void setInitialOwnership(Agent a, Cell... cells)
a - cells - public void makeUnmanagedCellsAvailable()
public void setID(String id)
public void cellsCreated()
public Cell getCell(int x, int y)
x - y - public int getNumCells()
getNumCells in interface Regionspublic boolean hasInstitutions()
public boolean doesRequireEffectiveCapitalData()
public boolean hasCompetitivenessAdjustingInstitution()
public void setRequiresEffectiveCapitalData()
public void setHasCompetitivenessAdjustingInstitution()
public Institutions getInstitutions()
public void setInstitutions(Institutions inst)
public ModelData getModelData()
public String toString()
toString in class ObjectObject.toString()public void preTick()
preTick in interface PreTickActionPreTickAction.preTick()public RegionHelper registerHelper(Object id, RegionHelper rHelper)
id - rHelper - HashMap.put(Object, Object)public RegionHelper getHelper(Object id)
id - public boolean isSkipInitialAllocation()
public void setSkipInitialAllocation(boolean skipInitialAllocation)