Package jline.solvers

Class NetworkSensitivityTable

java.lang.Object
jline.solvers.AvgTable
jline.solvers.NetworkSensitivityTable

public class NetworkSensitivityTable extends AvgTable
Table of exact analytic performance sensitivities, one row per (Station, JobClass).

Each row gives the exact analytic derivative of that row's mean performance measures with respect to that station-class service RATE: dTput_dRate, dRespT_dRate, dQLen_dRate and dUtil_dRate. The columns always appear in the order Station, JobClass, dTput_dRate, dRespT_dRate, dQLen_dRate, dUtil_dRate; see getVariableNames().

Every derivative is with respect to the row's OWN rate, i.e. the diagonal of the full parameter Jacobian. The off-diagonal cross-station and cross-class terms are not shown here; they are available from the raw getSens() result for a closed model, whose dX, dQ, dU and dR carry the whole Jacobian.

Closed product-form networks obtain the derivatives from pfqn_sens (differentiated MVA); open product-form networks use the exact closed-form BCMP sensitivities, the stations there being decoupled. Rate derivatives follow from d(.)/d(rate) = -(L/rate) d(.)/dL, since L(i,r) = visits(i,r)/rate(i,r).

Rows are emitted only for the (station, class) pairs that the model defines: a pair whose rate is non-finite or non-positive, or whose demand D(i,r) is non-positive, is skipped, since the class does not visit that station and there is no rate there to differentiate.

See Also:
  • Constructor Details

    • NetworkSensitivityTable

      public NetworkSensitivityTable(List<Double> dTput, List<Double> dRespT, List<Double> dQLen, List<Double> dUtil)
      Creates a sensitivity table from its four numeric columns.
      Parameters:
      dTput - the dTput_dRate column
      dRespT - the dRespT_dRate column
      dQLen - the dQLen_dRate column
      dUtil - the dUtil_dRate column
  • Method Details

    • getVariableNames

      public List<String> getVariableNames()
      The names of every column of the table, the two name columns first: Station, JobClass, then the four numeric columns. Mirrors T.Properties.VariableNames of the MATLAB table.
      Returns:
      the column names, in table order
    • 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 name is not one of the four numeric columns
    • 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
    • getDTput

      public List<Double> getDTput()
      Returns:
      the dTput_dRate column, the derivative of the class throughput with respect to the row's own service rate; identically zero on an open model, whose throughput is fixed by the arrival rate
    • getDRespT

      public List<Double> getDRespT()
      Returns:
      the dRespT_dRate column
    • getDQLen

      public List<Double> getDQLen()
      Returns:
      the dQLen_dRate column
    • getDUtil

      public List<Double> getDUtil()
      Returns:
      the dUtil_dRate column
    • 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
    • getSens

      public Ret.pfqnSens getSens()
      Returns the raw differentiated-MVA result behind this table, the second output that MATLAB's getSensitivityTable returns alongside the table. It carries the FULL parameter Jacobian, of which the table shows only the diagonal, plus the base metrics the derivatives were taken at.
      Returns:
      the pfqn_sens result, or null on an open model, whose closed-form branch runs no differentiated MVA (MATLAB returns an empty sens there)
    • setSens

      public void setSens(Ret.pfqnSens sens)
      Sets the raw differentiated-MVA result.
      Parameters:
      sens - the pfqn_sens result
    • 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
    • getMethod

      public String getMethod()
      Returns the branch that produced the table, the counterpart of MATLAB's SensTable.Properties.UserData.method.
      Returns:
      "exact" for the analytic branch, "fd" for finite differences
    • setMethod

      public void setMethod(String method)
      Sets the branch that produced the table.
      Parameters:
      method - "exact" or "fd"
    • 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.