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

Port of solver_ctmc_mapc.m: the pair form of a MAP (and MMPP2) service at an FCFS station, so the CTMC follows the law JMT and both LDES engines sample. More...

#include <cmath>
#include <cstddef>
#include <map>
#include <utility>
#include <vector>
#include "line/lang/distribution.h"
#include "line/lang/qn/network_struct.h"
#include "line/lang/qn/state_events.h"
#include "line/util/error.h"
#include "line/util/linalg.h"
#include "line/util/matrix.h"
Include dependency graph for solver_ctmc_mapc.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::ctmc
namespace  line::ctmc::mapc_detail

Functions

template<class T>
bool line::ctmc::mapc_detail::wants_mapc (const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r)
template<class T>
void line::ctmc::mapc_detail::mapc_class (qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r)
 Rewrite class r at station ist into pair form (c > 1) or mark it carried (c = 1); a private copy.
template<class T>
bool line::ctmc::ctmc_mapc (const qn::NetworkStruct< T > &in, qn::NetworkStruct< T > &out)
 Rewrite a copy of in into out when it has a MAP service at an FCFS station; false, leaving out untouched, when there is nothing to rewrite.

Detailed Description

Port of solver_ctmc_mapc.m: the pair form of a MAP (and MMPP2) service at an FCFS station, so the CTMC follows the law JMT and both LDES engines sample.

Those engines keep ONE sampler per (station, class): every draw starts in the phase the previous draw ENDED in, draws chained in service-start order, idle periods included. With c > 1 servers the next start can happen while earlier draws are still running, so the landing phase of a draw must be known when it starts. With V = (-D0)^-1 D1 a draw started in h ends in j w.p. V(h,j); a busy server is a PAIR (i,j) that moves i->k at D0(i,k)V(k,j)/V(i,j) and completes at D1(i,j)/V(i,j). The class memory variable is the landing of the most recently STARTED draw: a start from h enters (h,j) w.p. V(h,j) and sets h := j, while moves and completions keep it. For a renewal MAP the chain reduces in law to PH/c. The pair law is stored as the lifted MAP D0p (conditioned moves) and D1p((i,j),(j,j')) = D1(i,j)/V(i,j)*V(j,j'), equivalent in law to the original; the bookkeeping read by the state handlers goes to sn.ctmcmapc.

As in the reference, only a multiserver station is rewritten. A single server keeps its law and gets a single entry: the memory is the phase the last completion left the MAP in, which the handlers here did not carry before, so every draw restarted from the entry law. Pairs at c = 1 would be exact too but multiply the space, most of it unreachable, for no gain in the law.

Definition in file solver_ctmc_mapc.h.