Package jline.api.lqn

Class LqnBalanceEquations.Solution

java.lang.Object
jline.api.lqn.LqnBalanceEquations.Solution
Enclosing class:
LqnBalanceEquations

public static final class LqnBalanceEquations.Solution extends Object
The iterates of a solved layered model.

The five vectors map onto the public fields of the same name on jline.solvers.ln.SolverLN; this class does not reference the solver so that the API layer keeps no dependency on it. All are indexed 1-BASED by absolute element index, matching LqnBalanceEquations.Relation.target -- which is NOT how SolverLN stores them, nor how the 0-based LayeredNetworkStruct does, so use fromLayeredIterates(jline.util.matrix.Matrix, jline.util.matrix.Matrix, jline.util.matrix.Matrix, jline.util.matrix.Matrix, jline.util.matrix.Matrix) rather than passing them straight through.

un is the REPORTED utilization, which is not the same quantity as the util iterate: the iterate holds a task's utilization as a SERVER in its own task layer -- the U that closes the thread-pool cycle -- and it is left at zero on a host. The hostutil family needs the reported one, so it is supplied separately rather than read off the solver: getEnsembleAvg re-enters iterate() in every codebase, and a diagnostic must not re-run a fixed point as a side effect of being asked a question. A hostutil record whose host has no un entry is emitted symbolically with a NaN residual.

  • Field Details

  • Constructor Details

  • Method Details

    • fromLayeredIterates

      public static LqnBalanceEquations.Solution fromLayeredIterates(Matrix tput, Matrix util, Matrix thinkt, Matrix servt, Matrix residt)
      A Solution built from the iterate vectors of jline.solvers.ln.SolverLN.

      THE SHIFT IS THE POINT. SolverLN allocates its iterates as new Matrix(1, lqn.nidx), so element idx of the struct lives at COLUMN idx and there is no padded slot. A LqnBalanceEquations.Solution is 1-based, matching LqnBalanceEquations.Relation.target and the MATLAB and C++ twins, so a vector coming off the solver has to be shifted UP by one on the way in; compute shifts it back DOWN before indexing the struct with it. Reading it unshifted silently attributes every element's iterate to its neighbour and leaves one end unset, which no assertion on a single metric would catch.

      un is not among them: the reported utilization comes from the ensemble average table as a List<Double>, which the caller indexes itself, so assign that field directly.