Package jline.solvers

Class LayeredNetworkSensitivityTable

java.lang.Object
jline.solvers.AvgTable
jline.solvers.LayeredNetworkSensitivityTable

public class LayeredNetworkSensitivityTable extends AvgTable
Layer-wise table of performance sensitivities of a layered network, one row per (Layer, Station, JobClass).

This is the layered sibling of NetworkSensitivityTable: it is the concatenation of the per-layer tables that SolverLN obtains from its layer solvers, with a leading Layer column carrying the name of the layer Network. The columns always appear in the order Layer, Station, JobClass, dTput_dRate, dRespT_dRate, dQLen_dRate, dUtil_dRate; see getVariableNames().

IMPORTANT, on what these derivatives mean. Each entry is a derivative WITHIN ITS LAYER, taken with the layer parameters that the fixed point produced held fixed. It is a partial derivative of the layer submodel, not the total derivative of the layered model: perturbing a host demand in one layer moves the think times, populations and service rates of the other layers through the fixed-point map, and that indirect term is not included here. The layer table is the right object for attributing a bottleneck inside a layer, and the wrong one for predicting the effect of a parameter change on the solved layered model. For the latter, finite-difference the LayeredNetwork itself.

getMethod() reports the branch summary, "exact" or "fd" when every layer took the same branch and "mixed" when they disagreed; getLayerMethods() reports the branch of each layer separately. These mirror MATLAB's SensTable.Properties.UserData.method and .layerMethods.

See Also:
  • Constructor Details

    • LayeredNetworkSensitivityTable

      public LayeredNetworkSensitivityTable(List<Double> dTput, List<Double> dRespT, List<Double> dQLen, List<Double> dUtil)
      Creates a layered 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 three name columns first: Layer, 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
    • getDTput

      public List<Double> getDTput()
      Returns:
      the dTput_dRate column
    • 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
    • getLayerNames

      public List<String> getLayerNames()
      Returns:
      the layer names, one per row
    • setLayerNames

      public void setLayerNames(List<String> layerNames)
      Sets the layer names, one per row.
      Parameters:
      layerNames - the layer 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
    • 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
    • getMethod

      public String getMethod()
      Returns the branch summary of the table, the counterpart of MATLAB's SensTable.Properties.UserData.method.
      Returns:
      "exact" or "fd" when every layer took the same branch, "mixed" when the layers disagreed, and the empty string when no layer contributed
    • setMethod

      public void setMethod(String method)
      Sets the branch summary of the table.
      Parameters:
      method - "exact", "fd" or "mixed"
    • getLayerMethods

      public List<String> getLayerMethods()
      Returns the branch taken by each layer, the counterpart of MATLAB's SensTable.Properties.UserData.layerMethods.
      Returns:
      one entry per layer, null where the layer contributed no rows
    • setLayerMethods

      public void setLayerMethods(List<String> layerMethods)
      Sets the branch taken by each layer.
      Parameters:
      layerMethods - one entry per layer
    • getLayerSens

      public List<Ret.pfqnSens> getLayerSens()
      Returns the raw differentiated-MVA result of each layer, the counterpart of the cell array that MATLAB returns as the second output alongside the table.
      Returns:
      one entry per layer, null where the layer took the finite-difference branch or the open exact branch
    • setLayerSens

      public void setLayerSens(List<Ret.pfqnSens> layerSens)
      Sets the raw differentiated-MVA result of each layer.
      Parameters:
      layerSens - one entry per layer
    • findRow

      public int findRow(String layerName, String stationName, String className)
      Returns the index of the row for a (layer, station, class) triple, or -1 if absent.
      Parameters:
      layerName - the layer name
      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.