public class CurveCompetitivenessModel extends Object implements CompetitivenessModel
CompetitivenessModel.CompetitivenessDisplay| Constructor and Description |
|---|
CurveCompetitivenessModel() |
| Modifier and Type | Method and Description |
|---|---|
double |
addUpMarginalUtilities(com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> residualDemand,
com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply) |
double |
addUpMarginalUtilities(com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> residualDemand,
com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply,
boolean showWorking)
Adds up marginal utilities (determined by competitiveness for unmet
demand) of all services.
|
double |
getCompetitiveness(DemandModel demand,
com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply) |
double |
getCompetitiveness(DemandModel demand,
com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply,
Cell cell) |
double |
getCompetitveness(DemandModel demand,
com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply,
boolean showWorking)
Calculates per-cell residuals and calls
addUpMarginalUtilities(UnmodifiableNumberMap, UnmodifiableNumberMap, boolean)
. |
Map<Service,com.moseph.modelutils.curve.Curve> |
getCurves() |
CurveCompetitivenessDisplay |
getDisplay() |
void |
initialise(ModelData data,
RunInfo info,
Region extent) |
boolean |
isRemoveCurrentLevel() |
boolean |
isRemoveNegative() |
void |
loadLinearCSV(String csvFile) |
void |
onWrite() |
void |
setCurve(Service s,
com.moseph.modelutils.curve.Curve c) |
void |
setRemoveCurrentLevel(boolean removeCurrentLevel) |
void |
setRemoveNegative(boolean removeNegative) |
public void initialise(ModelData data, RunInfo info, Region extent) throws Exception
initialise in interface Initialisabledata - model datainfo - run informationextent - region the initialisable object belongs toExceptionpublic double getCompetitiveness(DemandModel demand, com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply)
public double getCompetitveness(DemandModel demand, com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply, boolean showWorking)
addUpMarginalUtilities(UnmodifiableNumberMap, UnmodifiableNumberMap, boolean)
.demand - supply - showWorking - public double getCompetitiveness(DemandModel demand, com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply, Cell cell)
getCompetitiveness in interface CompetitivenessModelpublic double addUpMarginalUtilities(com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> residualDemand, com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply)
addUpMarginalUtilities in interface CompetitivenessModelpublic double addUpMarginalUtilities(com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> residualDemand, com.moseph.modelutils.fastdata.UnmodifiableNumberMap<Service> supply, boolean showWorking)
residualDemand - supply - showWorking - if true, log details in DEBUG modepublic boolean isRemoveCurrentLevel()
public void setRemoveCurrentLevel(boolean removeCurrentLevel)
public boolean isRemoveNegative()
public void setRemoveNegative(boolean removeNegative)
public void loadLinearCSV(String csvFile) throws IOException
IOExceptionpublic void onWrite()
public void setCurve(Service s, com.moseph.modelutils.curve.Curve c)
public CurveCompetitivenessDisplay getDisplay()
getDisplay in interface CompetitivenessModelgetDisplay in interface Displayable