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

The mfq method: a port of solver_mfq.m and the single-queue gate fluid_is_single_queue.m. More...

#include <cmath>
#include <cstddef>
#include <limits>
#include <vector>
#include "line/api/mam/map_moment.h"
#include "line/api/mam/mfq_fluflu_sojourn.h"
#include "line/lang/qn/network_struct.h"
#include "line/util/error.h"
#include "line/util/lu.h"
#include "line/util/matrix.h"
Include dependency graph for fluid_mfq.h:

Go to the source code of this file.

Classes

struct  line::fluid::MfqTopology
 What the single-queue gate found, when it matches. More...
struct  line::fluid::MfqResult
 The metrics mfq reports for its single queue. More...

Namespaces

namespace  line
namespace  line::fluid

Functions

template<class T>
MfqTopology line::fluid::mfq_is_single_queue (const qn::NetworkStruct< T > &sn)
 Port of fluid_is_single_queue.m: the model must be one open class flowing Source -> Queue -> Sink and nothing else.
template<class T>
MfqResult line::fluid::fluid_mfq (const qn::NetworkStruct< T > &sn, const MfqTopology &top, double tol)
 Solve the single fluid queue of sn.

Detailed Description

The mfq method: a port of solver_mfq.m and the single-queue gate fluid_is_single_queue.m.

WHAT MAKES THIS DIFFERENT FROM EVERY OTHER FLUID METHOD HERE. The others approximate a network by following the mean drift of its queues. This one is EXACT, and only works on one queue: a Source feeding a single station whose arrival and service processes are Markov-modulated fluids. It solves the fluid queue analytically rather than integrating anything, which is why it carries a topology gate instead of a tolerance – there is nothing to converge.

WHAT IT SOLVES. Both processes are given as (D0, D1) pairs and converted to BuTools fluid form: the background generator is Q = D0 + D1 and the fluid rate in each phase is the row sum of D1. mfq_fluflu_sojourn (already ported from BuTools' FluFluQueue) then returns a matrix-exponential representation of the sojourn time, whose mean is the response time. Queue length follows by Little's law, which is exact in steady state, and throughput is the arrival rate the queue is stable under.

THE M/M/1 SHORT CIRCUIT is the reference's. With a single-phase arrival and a single-phase service there is no modulation left, the fluid machinery is degenerate, and the reference falls back to the textbook formulas L = rho/(1-rho), W = 1/(mu - lambda). Reproduced, including the instability check: at rho >= 1 the queue has no stationary distribution and the reference reports infinities rather than a finite wrong answer.

Definition in file fluid_mfq.h.