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

Convergence-based stopping: batch the four metrics and stop once EVERY active (station, class) pair has reached the requested relative precision. More...

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

Public Member Functions

void init (std::size_t M, std::size_t K, const LdesOptions &o, std::uint64_t max_events)
bool enabled () const
std::uint64_t interval () const
void finalize_batch (const Accum &acc, const std::vector< std::size_t > &nservers, double now)
 Close the current batch at now and record one batch mean per metric.
bool converged (const std::vector< std::vector< bool > > &off) const
 True once every active pair has reached the tolerance on all four metrics.
int batches () const

Detailed Description

Convergence-based stopping: batch the four metrics and stop once EVERY active (station, class) pair has reached the requested relative precision.

THE CONJUNCTION IS THE POINT. A run stops when the WORST metric at the WORST pair is precise enough, not when the aggregate is: stopping on an average relative precision leaves the lightly loaded stations, whose estimates converge slowest, arbitrarily wrong while the report looks converged.

A pair whose mean is effectively zero counts as converged: a relative precision against zero is not a bound, it is a division. Transcribes checkConvergence and isMetricConverged.

Definition at line 516 of file ldes_stats.h.

Member Function Documentation

◆ batches()

int line::ldes::engine::Convergence::batches ( ) const
inline

Definition at line 587 of file ldes_stats.h.

◆ converged()

bool line::ldes::engine::Convergence::converged ( const std::vector< std::vector< bool > > & off) const
inline

True once every active pair has reached the tolerance on all four metrics.

Definition at line 566 of file ldes_stats.h.

◆ enabled()

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

Definition at line 539 of file ldes_stats.h.

◆ finalize_batch()

void line::ldes::engine::Convergence::finalize_batch ( const Accum & acc,
const std::vector< std::size_t > & nservers,
double now )
inline

◆ init()

void line::ldes::engine::Convergence::init ( std::size_t M,
std::size_t K,
const LdesOptions & o,
std::uint64_t max_events )
inline

◆ interval()

std::uint64_t line::ldes::engine::Convergence::interval ( ) const
inline

Definition at line 540 of file ldes_stats.h.


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