![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The two-station LCFS + LCFS-PR closed network. More...
#include <cmath>#include <vector>#include "line/api/pfqn/pfqn_lcfsqn_ca.h"#include "line/api/pfqn/pfqn_perm.h"#include "line/lang/qn/network_struct.h"#include "line/solvers/nc/nc_types.h"#include "line/util/error.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::nc |
Functions | |
| template<class T> | |
| NcSolution< T > | line::nc::solver_nc_lcfsqn (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, std::size_t lcfsStat, std::size_t lcfsprStat) |
| Port of solver_nc_lcfsqn.m. | |
The two-station LCFS + LCFS-PR closed network.
Port of solver_nc_lcfsqn.m.
A last-come-first-served station WITHOUT preemption is not a BCMP station: the queue-length distribution depends on the order of arrival, so no product form and no ordinary normalizing constant exist for it. The pair LCFS / LCFS-PR does admit a closed form (Casale, QUESTA 2026) whose constant pfqn_lcfsqn_ca computes by recursion, and whose per-class measures are sums of PERMANENTS over the boundary position between the two stations.
THE PERMANENT FORMULAS ASSUME ONE JOB PER CLASS. A class with N_r > 1 is expanded into N_r exchangeable single-job copies, the constant is rescaled to the distinguishable-jobs one G_exp = G prod_r N_r!, and the per-copy measures are scaled back by N_r. This is what makes the routine cost (sum N)! – exponential in the population – so it is a special-case analyzer, not a general one.
Arithmetic: the permanents are exact-capable (pfqn_perm uses the integer Pascal recurrence), but lG is a log, so the analyzer is guarded on has_transcendental for that alone.
Definition in file solver_nc_lcfsqn.h.