EstimatedODMatrix¶
-
public class
EstimatedODMatrix
extends RealODMatrix¶ Origin-destination matrix created from productions, attractions and observed trip length distribution.
Author: Milan Lovric
Fields¶
Constructors¶
EstimatedODMatrix¶
-
public
EstimatedODMatrix
(HashMap<String, Integer> productions, HashMap<String, Integer> attractions, SkimMatrix distanceSkimMatrix, double[] binLimitsKm, double[] observedTripLengthDistribution)¶ Constructor for estimated OD matrix.
Parameters: - productions – Productions
- attractions – Attractions
- distanceSkimMatrix – Distance skim matrix
- binLimitsKm – Bin limits in km
- observedTripLengthDistribution – Observed trip length distribution (normalised).
EstimatedODMatrix¶
-
public
EstimatedODMatrix
(String fileName, SkimMatrix distanceSkimMatrix, double[] binLimitsKm, double[] observedTripLengthDistribution)¶ Constructor for estimated OD matrix that reads productions and attractions from an input csv file.
Parameters: - fileName – Path to the input file with productions and attractions
- distanceSkimMatrix – Distance skim matrix
- binLimitsKm – Bin limits in km
- observedTripLengthDistribution – Observed trip length distribution (normalised).
Throws: - IOException – if any.
- FileNotFoundException – if any.
Methods¶
deleteInterzonalFlows¶
getAttractions¶
getBinIndexMatrix¶
-
public ODMatrixMultiKey
getBinIndexMatrix
()¶ Getter method for the bin index matrix.
Returns: Bin index matrix
getObservedTripLengthDistribution¶
-
public double[]
getObservedTripLengthDistribution
()¶ Getter method for the observed trip length distribution.
Returns: Observed trip length distribution
getProductions¶
getTripLengthDistribution¶
-
public double[]
getTripLengthDistribution
()¶ Getter method for the trip length distribution.
Returns: Trip length distribution
iterate¶
-
public void
iterate
()¶ Iterates scaling to productions, scaling to attractions, rounding and scaling to observed trip length distribution.
printMatrixFormatted¶
-
public void
printMatrixFormatted
(int precision)¶ Prints the matrix as a formatted table.