public class RegionalDemandModel extends Object implements DemandModel, PreTickAction, PostTickAction
DemandModel.DemandDisplay| Constructor and Description |
|---|
RegionalDemandModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
agentChange(Cell c)
Called when an agent changes on a cell, to allow updating on agent changes i.e.
|
com.moseph.modelutils.fastdata.DoubleMap<Service> |
getDemand()
Returns the level of demand for the Region
|
com.moseph.modelutils.fastdata.DoubleMap<Service> |
getDemand(Cell c)
Should be called to get the level of demand in a particular cell This can
include any regional demand
|
RegionalDemandDisplay |
getDisplay() |
com.moseph.modelutils.fastdata.DoubleMap<Service> |
getMarginalUtilities()
Gets the marginal utility of producing a unit of each service at the
current supply levels Uses the competitiveness model, but ignores
cell/agent adjustments
|
com.moseph.modelutils.fastdata.DoubleMap<Service> |
getResidualDemand()
Returns the level of residual demand for the region
|
com.moseph.modelutils.fastdata.DoubleMap<Service> |
getResidualDemand(Cell c)
The spatialised demand for a single cell
|
com.moseph.modelutils.fastdata.DoubleMap<Service> |
getSupply() |
void |
initialise(ModelData data,
RunInfo info,
Region r) |
void |
postTick() |
void |
preTick() |
void |
recalculateResidual()
Assigns each cell an equal share of total demand.
|
void |
setDemand(com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> dem) |
void |
updateSupply()
Called after all agent changes have been done, and production has been updated.
|
public void initialise(ModelData data, RunInfo info, Region r) throws Exception
initialise in interface Initialisabledata - model datainfo - run informationr - region the initialisable object belongs toExceptionpublic com.moseph.modelutils.fastdata.DoubleMap<Service> getResidualDemand()
DemandModelgetResidualDemand in interface DemandModelpublic com.moseph.modelutils.fastdata.DoubleMap<Service> getDemand()
DemandModelgetDemand in interface DemandModelpublic com.moseph.modelutils.fastdata.DoubleMap<Service> getDemand(Cell c)
DemandModelgetDemand in interface DemandModelpublic com.moseph.modelutils.fastdata.DoubleMap<Service> getResidualDemand(Cell c)
DemandModelgetResidualDemand in interface DemandModelpublic com.moseph.modelutils.fastdata.DoubleMap<Service> getSupply()
getSupply in interface DemandModelpublic void agentChange(Cell c)
DemandModelagentChange in interface DemandModelpublic void setDemand(com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> dem)
public void updateSupply()
DemandModelupdateSupply in interface DemandModelpublic void recalculateResidual()
public void preTick()
preTick in interface PreTickActionpublic void postTick()
postTick in interface PostTickActionpublic com.moseph.modelutils.fastdata.DoubleMap<Service> getMarginalUtilities()
DemandModelgetMarginalUtilities in interface DemandModelpublic RegionalDemandDisplay getDisplay()
getDisplay in interface DemandModelgetDisplay in interface Displayable