LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
infer_lqn_getobs.h File Reference

Observation vector of a solved LQN, z = h(a). More...

#include <cstddef>
#include <string>
#include <vector>
#include "line/api/infer/infer_lqn_findbyname.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for infer_lqn_getobs.h:

Go to the source code of this file.

Classes

struct  line::infer::LqnMetrics< T >
 Per-element metric vectors, each aligned with the element name list. More...
struct  line::infer::LqnObsSpec
 One row of MATLAB's OBSSPEC struct array. More...

Namespaces

namespace  line
namespace  line::infer

Enumerations

enum class  line::infer::LqnMetric { line::infer::QLen , line::infer::Util , line::infer::RespT , line::infer::Tput }
 The four per-element metrics of a solved LQN, as in getEnsembleAvg. More...

Functions

template<class T>
std::vector< T > line::infer::infer_lqn_getobs (const std::vector< std::string > &names, const LqnMetrics< T > &metrics, const std::vector< LqnObsSpec > &spec)
 Observation vector of a solved LQN, z = h(a).

Detailed Description

Observation vector of a solved LQN, z = h(a).

Templated port of matlab/src/api/infer/infer_lqn_getobs.m. The JAR carries the same selection inline inside jline/api/infer/InferLqn.java.

This is the measurement half of the LQN parameter identification method of Zheng, Yang, Woodside, Litoiu, Iszlai, "Tracking Time-Varying Parameters in Software Systems with Extended Kalman Filters", CASCON 2005: given the per-element metric vectors of a solved model, it selects the entries the filter observes, in the order the specification lists them. It is the map whose sensitivity infer_lqn_jacobian differentiates and whose residual infer_lqn_ekf corrects on.

The metric name is an enum here rather than MATLAB's case-insensitive string, so an unknown metric is a compile error instead of a runtime one; the only runtime rejection left is the one MATLAB also makes, an element name absent from the LQN. That rejection is an InputError and NOT a not-a-number or a zero: an observation silently read off the wrong element would be indistinguishable from a badly fitting model.

ARITHMETIC: selection and copying only, no operation on the values at all, so the port is exact in every instantiation.

Definition in file infer_lqn_getobs.h.