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/sn/sn_state.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
 Conservation laws of a layered queueing network, enumerated from its structure.
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.

CLOSED CHAINS. The reference seeds a closed chain from State.toMarginal of its reference station (solver_qna.m:94): the TOTAL number of jobs the initial state holds there, written into every class column of that row. This port reads the same quantity from sn_declared_marginal, which decodes a declared state and falls back to initDefault's placement. Each sweep then rescales a closed chain's column to its population, which, unlike the open case below, is a finite factor, so the sweeps genuinely iterate to a fixed point; the PS station takes the finite-population geometric bound (U - U^(N+1)) / (1 - U), and the result is rescaled to the population once more on the way out. SolverMVA still advertises qna for fully open models only (its feature set withdraws ClosedClass), exactly as the reference does, so the closed path is reached by calling the analyzer directly.

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.