DemandModel¶
-
public class
DemandModel
¶ Main demand prediction model (elasticity-based).
Author: Milan Lovric
Fields¶
Constructors¶
DemandModel¶
-
public
DemandModel
(RoadNetwork roadNetwork, String baseYearODMatrixFile, String baseYearFreightMatrixFile, String populationFile, String GVAFile, String elasticitiesFile, String elasticitiesFreightFile, String energyUnitCostsFile, String unitCO2EmissionsFile, String engineTypeFractionsFile, String autonomousVehiclesFractionsFile, List<Intervention> interventions, RouteSetGenerator rsg, Zoning zoning, Properties props)¶ The constructor for the demand prediction model.
Parameters: - roadNetwork – Road network for assignment.
- baseYearODMatrixFile – Base-year origin-destination matrix file name.
- baseYearFreightMatrixFile – Base-year freight matrix file name.
- populationFile – Population file name.
- GVAFile – GVA file name.
- elasticitiesFile – Elasticities file name.
- elasticitiesFreightFile – Elasticities freight file name.
- energyUnitCostsFile – Energy unit costs file name.
- unitCO2EmissionsFile – Unit CO2 emissions file name.
- engineTypeFractionsFile – Engine type fractions file.
- autonomousVehiclesFractionsFile – Autonomous vehicles fractions file.
- interventions – List of interventions.
- rsg – Route Set Generator with routes for both cars and freight.
- zoning – Zoning system (used for ‘tempro’ and ‘combined’ assignment type).
- props – Properties file.
Throws: - IOException – if any.
- FileNotFoundException – if any.
Methods¶
addCongestionCharges¶
-
public void
addCongestionCharges
(int year, PricingPolicy congestionCharges)¶ Adds congestion charges to the list of the existing ones.
Parameters: - year – Year of the policy.
- congestionCharges – Congestion charges.
getCongestionCharges¶
-
public List<PricingPolicy>
getCongestionCharges
(int year)¶ Getter method for congestion charges.
Parameters: - year – Year of the congestion charges.
Returns: Congestion charges.
getCostSkimMatrix¶
-
public SkimMatrix
getCostSkimMatrix
(int year)¶ Getter method for cost skim matrix in a given year.
Parameters: - year – Year for which the the skim matrix is requested.
Returns: Cost skim matrix.
getCostSkimMatrixFreight¶
-
public SkimMatrixFreight
getCostSkimMatrixFreight
(int year)¶ Getter method for freight cost skim matrix in a given year.
Parameters: - year – Year for which the the skim matrix is requested.
Returns: Cost skim matrix.
getEngineTypeFractions¶
-
public Map<VehicleType, Map<EngineType, Double>>
getEngineTypeFractions
(int year)¶ Getter method for engine type fractions in a given year.
Parameters: - year – Year of the data.
Returns: Map with engine type fractions.
getFreightDemand¶
-
public FreightMatrix
getFreightDemand
(int year)¶ Getter method for the freight demand in a given year.
Parameters: - year – Year for which the demand is requested.
Returns: Origin-destination matrix with freight vehicle flows.
getListsOfLADsForNewRouteGeneration¶
getPassengerDemand¶
-
public ODMatrixMultiKey
getPassengerDemand
(int year)¶ Getter method for the passenger demand in a given year.
Parameters: - year – Year for which the demand is requested.
Returns: Origin-destination matrix with passenger vehicle flows.
getRoadNetwork¶
-
public RoadNetwork
getRoadNetwork
()¶ Getter method for the road network.
Returns: Road network.
getRoadNetworkAssignment¶
-
public RoadNetworkAssignment
getRoadNetworkAssignment
(int year)¶ Getter method for the road network assignment in a given year.
Parameters: - year – Year for which the road network assignment is requested.
Returns: Road network assignment.
getTimeSkimMatrix¶
-
public SkimMatrix
getTimeSkimMatrix
(int year)¶ Getter method for time skim matrix in a given year.
Parameters: - year – Year for which the the skim matrix is requested.
Returns: Time skim matrix.
getTimeSkimMatrixFreight¶
-
public SkimMatrixFreight
getTimeSkimMatrixFreight
(int year)¶ Getter method for freight time skim matrix in a given year.
Parameters: - year – Year for which the the skim matrix is requested.
Returns: Time skim matrix.
predictHighwayDemand¶
-
public void
predictHighwayDemand
(int predictedYear, int fromYear)¶ Predicts (passenger and freight) highway demand (origin-destination vehicle flows).
Parameters: - predictedYear – The year for which the demand is predicted.
- fromYear – The year from which demand the prediction is made.
predictHighwayDemandUsingResultsOfFromYear¶
-
public void
predictHighwayDemandUsingResultsOfFromYear
(int predictedYear, int fromYear)¶ Predicts (passenger and freight) highway demand (origin-destination vehicle flows). Uses already existing results of the fromYear.
Parameters: - predictedYear – The year for which the demand is predicted.
- fromYear – The year from which demand the prediction is made.
predictHighwayDemands¶
-
public void
predictHighwayDemands
(int toYear, int baseYear)¶ Predicts (passenger and freight) highway demand (origin-destination vehicle flows) for all years from baseYear to toYear
Parameters: - toYear – The final year for which the demand is predicted.
- baseYear – The base year from which the predictions are made.
removeCongestionCharges¶
-
public void
removeCongestionCharges
(int year, PricingPolicy congestionCharges)¶ Removes congestion charges from the list of the existing ones.
Parameters: - year – Year of the congestion charges.
- congestionCharges – Congestion charges.
removeCongestionCharges¶
saveAllResults¶
-
public void
saveAllResults
(int toYear, int baseYear)¶ Saves all results from baseYear to toYear (including intermediate if flat is set)
Parameters: - toYear – The final year for which the demand is predicted.
- baseYear – The base year from which the predictions are made.
saveAllResults¶
-
public void
saveAllResults
(int year)¶ Saves all results into the output folder.
Parameters: - year – Year of the data.
saveAssignmentResults¶
saveEnergyConsumptions¶
setCongestionCharges¶
-
public void
setCongestionCharges
(int year, List<PricingPolicy> congestionCharges)¶ Setter method for congestion charges (overrides them completely).
Parameters: - year – Year of the congestion charges.
- congestionCharges – Congestion charges.
setEngineTypeFractions¶
-
public void
setEngineTypeFractions
(int year, Map<VehicleType, Map<EngineType, Double>> engineTypeFractions)¶ Setter method for engine type fractions in a given year.
Parameters: - year – Year of the data.
- engineTypeFractions – Map with engine type fractions.
setEngineTypeFractions¶
-
public void
setEngineTypeFractions
(int year, VehicleType vht, Map<EngineType, Double> engineTypeFractions)¶ Setter method for engine type fractions in a given year for a specific vehicle type.
Parameters: - year – Year of the data.
- vht – Vehicle type.
- engineTypeFractions – Map with engine type fractions.