Package jline.solvers

Class NetworkMomentStationTable

java.lang.Object
jline.solvers.AvgTable
jline.solvers.NetworkMomentStationTable

public class NetworkMomentStationTable extends AvgTable
Table of exact higher moments of the TOTAL queue length, one row per station.

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 Details

    • NetworkMomentStationTable

      public NetworkMomentStationTable(List<String> columnNames, List<List<Double>> columns)
      Creates a station moment table from the numeric columns that the requested moment orders select.
      Parameters:
      columnNames - names of the numeric columns, in table order
      columns - the numeric columns, aligned with columnNames
  • Method Details

    • getVariableNames

      public List<String> getVariableNames()
      The names of every column of the table, the name column first: Station, then the numeric columns that the requested moment orders selected. Mirrors T.Properties.VariableNames of the MATLAB table.
      Returns:
      the column names, in table order
    • hasColumn

      public boolean hasColumn(String name)
      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

      public List<Double> getColumn(String name)
      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

      public List<Double> get(int col)
      Returns the values of the given numeric column.
      Overrides:
      get in class AvgTable
      Parameters:
      col - column index into getVariableNames() minus the name column
      Returns:
      the column values
    • getQLen

      public List<Double> getQLen()
      Returns:
      the mean total queue length column (order 1)
    • getQLenVar

      public List<Double> getQLenVar()
      Returns:
      the total queue-length variance column (order 2)
    • getQLenSCV

      public List<Double> getQLenSCV()
      Returns:
      the total queue-length SCV column (order 2)
    • getQLenM3

      public List<Double> getQLenM3()
      Returns:
      the total queue-length third moment column (order 3)
    • getQLenSkew

      public List<Double> getQLenSkew()
      Returns:
      the total queue-length skewness column (order 3)
    • getStationNames

      public List<String> getStationNames()
      Returns:
      the station names, one per row
    • setStationNames

      public void setStationNames(List<String> stationNames)
      Sets the station names, one per row.
      Parameters:
      stationNames - the station names
    • getMoments

      public NetworkMomentStationResult getMoments()
      Returns the raw moment results, including the cross-station covariance matrix that this table does not show.
      Returns:
      the raw moment results
    • setMoments

      public void setMoments(NetworkMomentStationResult moments)
      Sets the raw moment results.
      Parameters:
      moments - the raw moment results
    • findRow

      public int findRow(String stationName)
      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: AvgTable
      Prints the table contents in a human-readable format. Implementation is provided by subclasses for specific table types.
      Specified by:
      print in class AvgTable
    • print

      public void print(SolverOptions options)
      Prints the table.
      Parameters:
      options - the solver options controlling verbosity
    • printTable

      public void printTable()
      Prints the table.