LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::qn::blocks_events Namespace Reference

Functions

template<class T>
double srv_count (const RowLayout< T > &L, const std::vector< T > &row)
 Jobs in service in a station row: the server block's total.
template<class T>
bool buffer_empty (const RowLayout< T > &L, const std::vector< T > &row)
template<class T>
double block_sum (const std::vector< T > &row, std::size_t w)
template<class T>
double held_servers (const NetworkStruct< T > &sn, std::size_t ind, const RowLayout< T > &L, const std::vector< T > &row)
 Servers held at ind by synchronous calls awaiting a REPLY (python setup_delayoff._held).
template<class T>
std::size_t calling_class (const NetworkStruct< T > &sn, std::size_t ind, std::size_t cls)
 The calling class whose held server a REPLY of class cls releases at ind, or 0 when cls answers no call held there (python _calling_class).
template<class T>
bool holds_call (const NetworkStruct< T > &sn, std::size_t ind, std::size_t cls)
 True when a class-cls departure from ind keeps its server for a synchronous call.
template<class T>
void push (EventOutcome< T > &out, const std::vector< T > &row, const T &rate, const T &prob, const std::vector< std::size_t > &start, const std::vector< std::size_t > &preempt)
 Append one successor with its tags.
template<class T>
std::vector< std::pair< std::vector< T >, T > > setup_arrival_variants (const NetworkStruct< T > &sn, std::size_t ind, const SetupInfo< T > &si, const RowLayout< T > &L, const std::vector< T > &row, std::size_t cls)
 Pre-arrival moves of the setup block (python setup_arrival_variants): with an idle ACTIVE server the row is unchanged; with none, a DELAYOFF server (uniformly among them) is woken and serves the job at once; with none in DELAYOFF, an OFF server starts the ARRIVING class's setup in a phase drawn from its initial vector, and the job waits.
template<class T>
std::vector< std::pair< std::vector< T >, T > > setup_departure_variants (const NetworkStruct< T > &sn, std::size_t ind, const SetupInfo< T > &si, const RowLayout< T > &L, const std::vector< T > &row, std::size_t cls)
 Post-departure moves (python setup_departure_variants): a server freed onto an empty buffer starts the DEPARTING class's delay-off.

Function Documentation

◆ block_sum()

template<class T>
double line::qn::blocks_events::block_sum ( const std::vector< T > & row,
std::size_t w )

Definition at line 3040 of file state_events.h.

References block_sum().

Referenced by block_sum(), setup_arrival_variants(), and setup_departure_variants().

◆ buffer_empty()

template<class T>
bool line::qn::blocks_events::buffer_empty ( const RowLayout< T > & L,
const std::vector< T > & row )

Definition at line 3033 of file state_events.h.

References buffer_empty(), and line::qn::RowLayout< T >::bufw.

Referenced by buffer_empty(), and setup_departure_variants().

◆ calling_class()

template<class T>
std::size_t line::qn::blocks_events::calling_class ( const NetworkStruct< T > & sn,
std::size_t ind,
std::size_t cls )

The calling class whose held server a REPLY of class cls releases at ind, or 0 when cls answers no call held there (python _calling_class).

Definition at line 3065 of file state_events.h.

References calling_class().

Referenced by calling_class(), setup_arrival_variants(), and setup_departure_variants().

◆ held_servers()

template<class T>
double line::qn::blocks_events::held_servers ( const NetworkStruct< T > & sn,
std::size_t ind,
const RowLayout< T > & L,
const std::vector< T > & row )

Servers held at ind by synchronous calls awaiting a REPLY (python setup_delayoff._held).

A held server is neither idle nor in the setup block: it finished a job and waits for the reply, so an arrival cannot take it and a departure cannot start its delay-off.

Definition at line 3053 of file state_events.h.

References line::qn::RowLayout< T >::bufw, held_servers(), line::qn::reply_blocked(), and line::qn::RowLayout< T >::srvw.

Referenced by held_servers(), setup_arrival_variants(), and setup_departure_variants().

◆ holds_call()

template<class T>
bool line::qn::blocks_events::holds_call ( const NetworkStruct< T > & sn,
std::size_t ind,
std::size_t cls )

True when a class-cls departure from ind keeps its server for a synchronous call.

Definition at line 3075 of file state_events.h.

References holds_call().

Referenced by holds_call(), and setup_departure_variants().

◆ push()

template<class T>
void line::qn::blocks_events::push ( EventOutcome< T > & out,
const std::vector< T > & row,
const T & rate,
const T & prob,
const std::vector< std::size_t > & start,
const std::vector< std::size_t > & preempt )

◆ setup_arrival_variants()

template<class T>
std::vector< std::pair< std::vector< T >, T > > line::qn::blocks_events::setup_arrival_variants ( const NetworkStruct< T > & sn,
std::size_t ind,
const SetupInfo< T > & si,
const RowLayout< T > & L,
const std::vector< T > & row,
std::size_t cls )

Pre-arrival moves of the setup block (python setup_arrival_variants): with an idle ACTIVE server the row is unchanged; with none, a DELAYOFF server (uniformly among them) is woken and serves the job at once; with none in DELAYOFF, an OFF server starts the ARRIVING class's setup in a phase drawn from its initial vector, and the job waits.

Definition at line 3099 of file state_events.h.

References block_sum(), line::qn::SetupInfo< T >::c, calling_class(), line::qn::SetupInfo< T >::delay, held_servers(), line::qn::SetupInfo< T >::setup, setup_arrival_variants(), srv_count(), and line::qn::SetupInfo< T >::width.

Referenced by line::qn::after_event_setup(), and setup_arrival_variants().

◆ setup_departure_variants()

template<class T>
std::vector< std::pair< std::vector< T >, T > > line::qn::blocks_events::setup_departure_variants ( const NetworkStruct< T > & sn,
std::size_t ind,
const SetupInfo< T > & si,
const RowLayout< T > & L,
const std::vector< T > & row,
std::size_t cls )

Post-departure moves (python setup_departure_variants): a server freed onto an empty buffer starts the DEPARTING class's delay-off.

Synchronous calls: a REPLY leaving releases the server its call held, and that server finished a job of the CALLING class, whose delay-off law it follows; a calling class's own departure keeps its server for the reply, so it frees none and starts no delay-off.

Definition at line 3162 of file state_events.h.

References block_sum(), buffer_empty(), line::qn::SetupInfo< T >::c, calling_class(), line::qn::SetupInfo< T >::delay, held_servers(), holds_call(), setup_departure_variants(), srv_count(), and line::qn::SetupInfo< T >::width.

Referenced by line::qn::after_event_setup(), and setup_departure_variants().

◆ srv_count()

template<class T>
double line::qn::blocks_events::srv_count ( const RowLayout< T > & L,
const std::vector< T > & row )

Jobs in service in a station row: the server block's total.

Definition at line 3026 of file state_events.h.

References line::qn::RowLayout< T >::bufw, srv_count(), and line::qn::RowLayout< T >::srvw.

Referenced by line::qn::after_event_attempts(), setup_arrival_variants(), setup_departure_variants(), and srv_count().