LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::ldes::engine::BusyPeriods Class Reference

The busy-period tracker of one run. More...

#include <line/solvers/ldes/ldes_busyperiod.h>

Public Member Functions

 BusyPeriods ()
void init (const std::vector< BpTarget > &targets, int orders, std::size_t nstations)
bool enabled () const
void track (std::size_t station, std::size_t cls, int delta, double now)
 Record a population change of delta (+1 or -1) for cls at station.
void commit ()
 Close every exit no longer contradicted by a same-instant arrival.
void reset ()
 Discard everything observed during the warmup.
const std::vector< BpTarget > & targets () const
int orders () const
double mean (std::size_t ti, std::size_t oi) const
 Mean duration of order oi+1 at target ti; 0 when nothing was observed.
double count (std::size_t ti, std::size_t oi) const

Detailed Description

The busy-period tracker of one run.

orders is the highest order measured; 0 disables the measurement and every entry point below returns immediately, so the engine pays nothing for it.

Definition at line 57 of file ldes_busyperiod.h.

Constructor & Destructor Documentation

◆ BusyPeriods()

line::ldes::engine::BusyPeriods::BusyPeriods ( )
inline

Definition at line 59 of file ldes_busyperiod.h.

Member Function Documentation

◆ commit()

void line::ldes::engine::BusyPeriods::commit ( )
inline

Close every exit no longer contradicted by a same-instant arrival.

Definition at line 117 of file ldes_busyperiod.h.

Referenced by track().

◆ count()

double line::ldes::engine::BusyPeriods::count ( std::size_t ti,
std::size_t oi ) const
inline

Definition at line 161 of file ldes_busyperiod.h.

◆ enabled()

bool line::ldes::engine::BusyPeriods::enabled ( ) const
inline

Definition at line 78 of file ldes_busyperiod.h.

◆ init()

void line::ldes::engine::BusyPeriods::init ( const std::vector< BpTarget > & targets,
int orders,
std::size_t nstations )
inline

Definition at line 61 of file ldes_busyperiod.h.

References orders(), and targets().

◆ mean()

double line::ldes::engine::BusyPeriods::mean ( std::size_t ti,
std::size_t oi ) const
inline

Mean duration of order oi+1 at target ti; 0 when nothing was observed.

Definition at line 158 of file ldes_busyperiod.h.

◆ orders()

int line::ldes::engine::BusyPeriods::orders ( ) const
inline

Definition at line 156 of file ldes_busyperiod.h.

Referenced by init().

◆ reset()

void line::ldes::engine::BusyPeriods::reset ( )
inline

Discard everything observed during the warmup.

A period IN PROGRESS at the reset has an unknown start, so its entry is invalidated and the period is dropped when it ends – counting it from the reset instant would report a truncated period as a whole one and bias every mean downwards.

Definition at line 143 of file ldes_busyperiod.h.

◆ targets()

const std::vector< BpTarget > & line::ldes::engine::BusyPeriods::targets ( ) const
inline

Definition at line 155 of file ldes_busyperiod.h.

Referenced by init().

◆ track()

void line::ldes::engine::BusyPeriods::track ( std::size_t station,
std::size_t cls,
int delta,
double now )
inline

Record a population change of delta (+1 or -1) for cls at station.

now must be non-decreasing across calls: the first call at a strictly later instant is what commits the exits pending from the previous one.

Definition at line 86 of file ldes_busyperiod.h.

References commit(), and line::ldes::engine::BpTarget::job_class.


The documentation for this class was generated from the following file: