![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Response-time distribution by tagged fluid: a port of solver_fluid_passage_time.m, which is what @@SolverFLD/getCdfRespT delegates to. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <vector>#include "line/lang/qn/network_struct.h"#include "line/solvers/fluid/fluid_odes.h"#include "line/solvers/fluid/solver_fluid.h"#include "line/util/error.h"#include "line/util/lsoda.h"Go to the source code of this file.
Classes | |
| struct | line::fluid::FluidPassage |
| The response-time CDF of one (station, class), sampled on a grid. More... | |
Namespaces | |
| namespace | line |
| namespace | line::fluid |
Functions | |
| template<class T> | |
| FluidPassage | line::fluid::fluid_passage_time (const qn::NetworkStruct< T > &sn, const std::vector< double > &x_steady, std::size_t ist, std::size_t cls, double tol=1e-4, std::size_t points=201, const FluidClosure &closure=FluidClosure()) |
| Response-time CDF at station ist for class cls, both 1-based. | |
| template<class T> | |
| FluidPassage | line::fluid::fluid_tran_passage_time (const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t cls, double tol=1e-4, std::size_t points=201) |
| Port of @@SolverFLD/getTranCdfPassT: the same passage-time distribution started from the model's INITIAL state rather than from its steady state. | |
Response-time distribution by tagged fluid: a port of solver_fluid_passage_time.m, which is what @@SolverFLD/getCdfRespT delegates to.
THE IDEA. The fluid drift gives means, not distributions. To recover one, mark the fluid that is at the station of interest RIGHT NOW and watch it leave: if z(t) is how much of that marked fluid is still there at time t and z(0) is how much there was, then
P(response time <= t) = 1 - z(t) / z(0)
because a marked drop has completed exactly when it is no longer in the block. This is a passage time read off a deterministic trajectory, which is why it needs no state space.
HOW THE MARKING IS DONE. The reference adds a whole extra CLASS to the model, a copy of class c that routes as c does everywhere except at the observed station, where it routes into the ORIGINAL classes. That is a rebuild of the routing table for a class that, by construction, can only ever hold mass at one station: the moment it completes there it becomes untagged. This port therefore adds the tagged block at THAT STATION ONLY and mirrors the events sourced there, which is the same system with none of the table surgery.
WHAT THE TAGGED FLUID STILL PARTICIPATES IN. Its own service, and the station's occupancy: a processor-sharing station splits its capacity over everything present, marked or not, so the tagged block must be counted in ni or the marked fluid would drain as if the station were emptier than it is. That coupling is the reason this cannot be computed from the mean trajectory alone.
THE INITIAL STATE, as the reference sets it: the whole (station, class) block is moved into PHASE ONE of the tagged block, and the original block starts empty. Fluid arriving afterwards is untagged and is not measured.
Definition in file fluid_passage.h.