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

QNA, the two-moment open-network decomposition analyzer. More...

#include <cmath>
#include <string>
#include <vector>
#include "line/api/da/da_fpi.h"
#include "line/api/da/da_traffic_superpos.h"
#include "line/api/npfqn/npfqn_traffic_split_rr.h"
#include "line/lang/qn/network_struct.h"
#include "line/solvers/mva/mva_types.h"
Include dependency graph for solver_qna.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::mva

Functions

template<class T>
MvaSolution< T > line::mva::solver_qna (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_qna.m.

Detailed Description

QNA, the two-moment open-network decomposition analyzer.

Templated port of matlab/src/solvers/MVA/solver_qna.m, which implements Section 7.2.3 of N. Gautam, "Analysis of Queues", CRC Press 2012, with corrections the reference records as agreed with the author.

The structure is decomposition-aggregation. Each sweep

  1. SUPERPOSES the flows into every station: a1(i,r) is the arrival rate of class r at station i and a2(i,r) the squared coefficient of variation of that superposed stream, both accumulated over the routing;
  2. SOLVES each station in isolation – an infinite server passes its input SCV straight through, a PS station takes a geometric-bound queue length, and an FCFS station takes the multiserver GI/G/c waiting-time approximation with the Whitt alpha(m) correction;
  3. SPLITS the departure stream along each outgoing arc, f2 = 1 + p (d2-k) with k the round-robin split degree (npfqn_traffic_split_rr): at k = 1 this is the exact SCV of a Bernoulli-thinned renewal stream, and at k > 1 that of a one-in-k deterministic dispatch, which is less variable;

and da_fpi drives the sweeps to a fixed point on the queue lengths.

SCOPE. OPEN CHAINS ONLY. The reference reaches State.toMarginal to seed a closed chain's queue length (solver_qna.m:94), which needs a state-encoding layer this port does not have, and SolverMVA.listValidMethods advertises qna only for a fully open model in the first place. A closed chain is refused by name rather than seeded with a guess.

REFERENCE INDEXING, REPRODUCED AND CHECKED. solver_qna.m indexes sn.rt, which is STATEFUL-indexed, with STATION indices, and reads sn.njobs, which is CLASS-indexed, with a CHAIN index. Both are silently correct exactly when the stations coincide with the stateful nodes and the chains with the classes, which is the shape of the models the method is advertised for. This port checks that instead of assuming it, and refuses by name otherwise – the alternative is reading an unrelated row and returning a number.

SELF-LOOPING CLASSES. The reference special-cases sn.isslc in three places. This port has no SelfLoopingClass (JobClassType is OPEN or CLOSED only), so those branches are unreachable and are not transcribed; a class type this port cannot build cannot reach here.

Arithmetic: TRANSCENDENTAL. da_fpi stops on a tolerance, and the alpha(m) correction takes a real power of the utilization.

Definition in file solver_qna.h.