RealODMatrix¶
-
public class
RealODMatrix
implements AssignableODMatrix¶ Origin-destination matrix with real values.
Author: Milan Lovric
Constructors¶
Methods¶
calculateTripEnds¶
calculateTripStarts¶
clone¶
-
public RealODMatrix
clone
()¶
createLadMatrixFromTEMProMatrix¶
-
public static RealODMatrix
createLadMatrixFromTEMProMatrix
(RealODMatrix temproMatrix, Zoning zoning)¶ Creates LAD OD matrix from Tempro OD matrix.
Parameters: - temproMatrix – TEMPro ODMatrix used as weights to disaggregate LAD matrix.
- zoning – Zoning system with mapping between TEMPro and LAD zones.
Returns: LAD based OD matrix.
createTEMProFromLadMatrix¶
-
public static RealODMatrix
createTEMProFromLadMatrix
(RealODMatrix ladODMatrix, RealODMatrix baseTempro, Zoning zoning)¶ Creates tempro OD matrix from LAD OD matrix.
Parameters: - ladODMatrix – LAD to LAD OD matrix.
- baseTempro – TEMPro ODMatrix used as weights to disaggregate LAD matrix.
- zoning – Zoning system with mapping between TEMPro and LAD zones.
Returns: TEMPro based OD matrix.
createUnitMatrix¶
createUnitMatrix¶
-
public static RealODMatrix
createUnitMatrix
(List<String> zones)¶ Creates a quadratic unit OD matrix for a given lists of zones.
Parameters: - zones – List of zones.
Returns: Unit OD matrix.
createUnitMatrix¶
-
public static RealODMatrix
createUnitMatrix
(Set<String> zones)¶ Creates a quadratic unit OD matrix for a given lists of zones.
Parameters: - zones – Set of zones.
Returns: Unit OD matrix.
deleteInterzonalFlows¶
getAbsoluteDifference¶
-
public double
getAbsoluteDifference
(RealODMatrix other)¶ Gets sum of absolute differences between elements of two matrices.
Parameters: - other – The other matrix.
Returns: Sum of absolute differences.
getFlow¶
getIntFlow¶
getSortedDestinations¶
getSortedOrigins¶
getTotalIntFlow¶
-
public int
getTotalIntFlow
()¶ Gets sum of all the (rounded) flows in the matrix.
Returns: Sum of all the (rounded) flows in the matrix (i.e. number of trips).
getUnsortedDestinations¶
getUnsortedOrigins¶
printMatrixFormatted¶
-
public void
printMatrixFormatted
(int precision)¶ Prints the matrix as a formatted table.
Parameters: - precision – Number of decimal places for the matrix value.
printMatrixFormatted¶
saveMatrixFormatted¶
saveMatrixFormatted2¶
scaleMatrixValue¶
-
public void
scaleMatrixValue
(double factor)¶ Scales matrix values with a scaling factor.
Parameters: - factor – Scaling factor.
scaleMatrixValue¶
-
public void
scaleMatrixValue
(RealODMatrix scalingMatrix)¶ Scales matrix values with another matrix (element-wise multiplication).
Parameters: - scalingMatrix – Scaling matrix.
setFlow¶
sumMatrixSubset¶
-
public double
sumMatrixSubset
(List<String> origins, List<String> destinations)¶ Sums the elements of a matrix subset (provided as two lists of origins and destinations).
Parameters: - origins – List of origin zones (a subset).
- destinations – List of destination zones (a subset).
Returns: Sum of the subset.