Class NetworkMomentStationTable
Which columns are present depends on the moment orders requested of
NetworkSolver.getMomentStationTable(int[]): order 1 contributes
QLen, order 2 contributes QLenVar and QLenSCV, order 3 contributes QLenM3 and
QLenSkew. They always appear in that order, filtered to the requested set; see
getVariableNames().
Every column is a moment of the total Q_i = sum_r n(i,r). The moments beyond
the second are generated by differentiating with respect to the reciprocal
capacity of station i, which scales the service times of all classes at that
station at once; that parameter therefore produces moments of the station total
and not of any single class, which is why they are not in
NetworkMomentTable. The two are consistent: QLenVar here equals the sum of
the per-class covariance block of NetworkMomentTable at that station.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index of the row for a station, or -1 if absent.get(int col) Returns the values of the given numeric column.Returns a numeric column by name.Returns the raw moment results, including the cross-station covariance matrix that this table does not show.getQLen()The names of every column of the table, the name column first: Station, then the numeric columns that the requested moment orders selected.booleanWhether a numeric column is present, i.e.voidprint()Prints the table contents in a human-readable format.voidprint(SolverOptions options) Prints the table.voidPrints the table.voidsetMoments(NetworkMomentStationResult moments) Sets the raw moment results.voidsetNDigits(int nDigits) Sets the number of decimal digits to display in formatted output.voidsetStationNames(List<String> stationNames) Sets the station names, one per row.Methods inherited from class jline.solvers.AvgTable
fmtValue, getData, printFormattedTable, sanitize, setOptions, toMatrix
-
Constructor Details
-
NetworkMomentStationTable
Creates a station moment table from the numeric columns that the requested moment orders select.- Parameters:
columnNames- names of the numeric columns, in table ordercolumns- the numeric columns, aligned withcolumnNames
-
-
Method Details
-
getVariableNames
The names of every column of the table, the name column first: Station, then the numeric columns that the requested moment orders selected. MirrorsT.Properties.VariableNamesof the MATLAB table.- Returns:
- the column names, in table order
-
hasColumn
Whether a numeric column is present, i.e. whether its moment order was requested.- Parameters:
name- the column name- Returns:
- true if the column is present
-
getColumn
Returns a numeric column by name.- Parameters:
name- the column name- Returns:
- the column values
- Throws:
RuntimeException- if the column was not selected by the requested moment orders
-
get
Returns the values of the given numeric column.- Overrides:
getin classAvgTable- Parameters:
col- column index intogetVariableNames()minus the name column- Returns:
- the column values
-
getQLen
- Returns:
- the mean total queue length column (order 1)
-
getQLenVar
- Returns:
- the total queue-length variance column (order 2)
-
getQLenSCV
- Returns:
- the total queue-length SCV column (order 2)
-
getQLenM3
- Returns:
- the total queue-length third moment column (order 3)
-
getQLenSkew
- Returns:
- the total queue-length skewness column (order 3)
-
getStationNames
- Returns:
- the station names, one per row
-
setStationNames
Sets the station names, one per row.- Parameters:
stationNames- the station names
-
getMoments
Returns the raw moment results, including the cross-station covariance matrix that this table does not show.- Returns:
- the raw moment results
-
setMoments
Sets the raw moment results.- Parameters:
moments- the raw moment results
-
findRow
Returns the index of the row for a station, or -1 if absent.- Parameters:
stationName- the station name- Returns:
- the row index, or -1
-
setNDigits
public void setNDigits(int nDigits) Sets the number of decimal digits to display in formatted output.- Parameters:
nDigits- the number of digits
-
print
public void print()Description copied from class:AvgTablePrints the table contents in a human-readable format. Implementation is provided by subclasses for specific table types. -
print
Prints the table.- Parameters:
options- the solver options controlling verbosity
-
printTable
public void printTable()Prints the table.
-