Package jline.solvers

Class NetworkMomentTable

java.lang.Object
jline.solvers.AvgTable
jline.solvers.NetworkMomentTable

public class NetworkMomentTable extends AvgTable
Table of exact higher moments of the per-class performance measures, one row per (Station, JobClass).

Which columns are present depends on the moment orders requested of NetworkSolver.getMomentTable(int[]): order 1 contributes QLen and RespT, order 2 contributes QLenVar, QLenSCV, RespTVar and RespTSCV, order 3 contributes QLenSkew and RespTSkew. They always appear in the order Station, JobClass, QLen, QLenVar, QLenSCV, QLenSkew, RespT, RespTVar, RespTSCV, RespTSkew, filtered to the requested set; see getVariableNames().

QLenSkew is a genuinely per-class quantity: the generating parameter need not scale a whole demand column, and scaling L(i,r) alone is Akyildiz-Strelen Theorem 1 with the class subset T = {r}, which generates the moments of n(i,r) itself. It is available only for closed single-server models, the scope of Pfqn_sens_mom, and is NaN otherwise.

The means agree with NetworkAvgTable, which reaches them by a different code path. RespTVar, RespTSCV and RespTSkew are NaN at any station that is not FCFS: the sojourn-time distribution of a processor-sharing or LCFS center is not known in general, so there is no correct value to report.

See Also:
  • Constructor Details

    • NetworkMomentTable

      public NetworkMomentTable(List<String> columnNames, List<List<Double>> columns)
      Creates a 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, JobClass, 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 queue length column (order 1)
    • getQLenVar

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

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

      public List<Double> getRespT()
      Returns:
      the mean response time column (order 1)
    • getRespTVar

      public List<Double> getRespTVar()
      Returns:
      the response-time variance column (order 2), NaN away from FCFS
    • getRespTSCV

      public List<Double> getRespTSCV()
      Returns:
      the response-time SCV column (order 2), NaN away from FCFS
    • getRespTSkew

      public List<Double> getRespTSkew()
      Returns:
      the response-time skewness column (order 3), NaN away from FCFS
    • getQLenSkew

      public List<Double> getQLenSkew()
      Returns:
      the per-class queue-length skewness column (order 3), NaN unless the model is closed single-server
    • getClassNames

      public List<String> getClassNames()
      Returns:
      the job class names, one per row
    • setClassNames

      public void setClassNames(List<String> classNames)
      Sets the job class names, one per row.
      Parameters:
      classNames - the class names
    • 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 NetworkMomentResult getMoments()
      Returns the raw moment results, including the full per-station covariance blocks that this table shows only the diagonal of.
      Returns:
      the raw moment results
    • setMoments

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

      public int findRow(String stationName, String className)
      Returns the index of the row for a (station, class) pair, or -1 if absent. A pair is absent when the class does not visit the station.
      Parameters:
      stationName - the station name
      className - the job class 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.