Package jline.solvers

Class NetworkMomentChainTable

java.lang.Object
jline.solvers.AvgTable
jline.solvers.NetworkMomentChainTable

public class NetworkMomentChainTable extends AvgTable
Table of exact higher moments of the per-chain queue length, one row per (Station, Chain).

This is the chain-level analogue of NetworkAvgChainTable, and it sits between the two other moment tables: NetworkMomentTable is per class, NetworkMomentStationTable is per station total, and this one is per chain, i.e. per group of classes that circulate together. Row (i,c) reports the moments of Q_(i,c) = sum_(r in chain c) n(i,r).

All three tables are the same recursion under different groupings of the classes: the generating parameter scales the service times of a class subset T at a station, and the moments it produces are those of sum_(r in T) n(i,r). T = {r} gives the per-class table, T = chain gives this one, T = all classes gives the station table. That is Theorem 1 of Akyildiz and Strelen; Strelen's own x_i is the last case. Unlike the per-class table, order 3 is fully available here.

Which columns are present depends on the moment orders requested: order 1 contributes QLen, order 2 contributes QLenVar and QLenSCV, order 3 contributes QLenM3 and QLenSkew; see getVariableNames().

See Also:
  • Constructor Details

    • NetworkMomentChainTable

      public NetworkMomentChainTable(List<String> columnNames, List<List<Double>> columns)
      Creates a chain 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 two name columns first: Station, Chain, 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 two name columns
      Returns:
      the column values
    • getQLen

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

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

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

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

      public List<Double> getQLenSkew()
      Returns:
      the chain 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
    • getChainNames

      public List<String> getChainNames()
      Returns:
      the chain names, one per row
    • setChainNames

      public void setChainNames(List<String> chainNames)
      Sets the chain names, one per row.
      Parameters:
      chainNames - the chain names
    • getMoments

      public NetworkMomentStationResult getMoments()
      Returns the raw moment results, including the cross-chain and cross-station covariances 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, String chainName)
      Returns the index of the row for a (station, chain) pair, or -1 if absent.
      Parameters:
      stationName - the station name
      chainName - the chain 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.