Class InferLqn
Estimates hidden Layered Queueing Network parameters (activity host
demands, task think times) from measured performance data (response times,
utilizations, throughputs), following Zheng, Yang, Woodside, Litoiu, Iszlai,
"Tracking Time-Varying Parameters in Software Systems with Extended Kalman
Filters", CASCON 2005 (equations 1-9). The parameter is modelled as a
zero-mean random walk a_k = a_{k-1} + w and the measurement as z_k = h(a_k)+v,
where h is the LQN performance model. This is the JAR counterpart of the
MATLAB infer_lqn family and the native-Python
line_solver.inference.infer_lqn; results match across codebases.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFinite-difference sensitivity matrix H = dh/da together with h0 = h(a). -
Method Summary
Modifier and TypeMethodDescriptionstatic InferLqnResultekf(Function<Matrix, Matrix> hfun, Matrix a0, Matrix P0, Matrix Z, Matrix Q, Matrix R, InferLqnOptions opt) Extended Kalman Filter tracking a hidden parameter vector across Z.static MatrixgetObs(LayeredNetworkAvgTable table, List<ObsSpec> obsSpec) Extract the observation vector selected by obsSpec from a solved table.static MatrixgetParams(LayeredNetwork model, List<ParamSpec> paramSpec) Read the current values of the parameters named in paramSpec.static InferLqnResultinferLqn(LayeredNetwork model, List<ParamSpec> paramSpec, List<ObsSpec> obsSpec, Matrix Z, InferLqnOptions opt) Identify hidden LQN parameters from measured performance data.static InferLqn.JacobianResultForward finite-difference sensitivity matrix of h at a.static voidsetParams(LayeredNetwork model, List<ParamSpec> paramSpec, Matrix a) Apply a parameter vector to a LayeredNetwork in place.
-
Method Details
-
setParams
Apply a parameter vector to a LayeredNetwork in place.- Parameters:
model- the LQN whose parameters are setparamSpec- list of parameters to seta- (np x 1) parameter vector
-
getParams
Read the current values of the parameters named in paramSpec. -
getObs
Extract the observation vector selected by obsSpec from a solved table. -
jacobian
public static InferLqn.JacobianResult jacobian(Function<Matrix, Matrix> hfun, Matrix a, double fdStep, double fdFloor) Forward finite-difference sensitivity matrix of h at a.Column i is (h(a + d_i) - h0)/d_i with d_i = fdStep*max(|a_i|, fdFloor). hfun is evaluated np+1 times. This is the approximate sensitivity matrix H_k used in the EKF update.
-
ekf
public static InferLqnResult ekf(Function<Matrix, Matrix> hfun, Matrix a0, Matrix P0, Matrix Z, Matrix Q, Matrix R, InferLqnOptions opt) Extended Kalman Filter tracking a hidden parameter vector across Z.- Parameters:
hfun- maps a parameter vector to a predicted observation z = h(a)a0- (np x 1) initial estimateP0- (np x np) initial covarianceZ- (no x nsteps) measurement matrix, one column per stepQ- (np x np) drift covarianceR- (no x no) measurement covarianceopt- options (fdStep, fdFloor, clampPositive, aTrue, verbose)
-
inferLqn
public static InferLqnResult inferLqn(LayeredNetwork model, List<ParamSpec> paramSpec, List<ObsSpec> obsSpec, Matrix Z, InferLqnOptions opt) Identify hidden LQN parameters from measured performance data.Estimates the parameters named in paramSpec (activity host demands and/or task think times) of the LayeredNetwork model from the measurement sequence Z (no x nsteps) using an EKF over the observation model defined by obsSpec. A single measurement column with opt.QFac = 0 reduces to one-shot least-squares calibration. On return the model has the final estimate applied.
-