![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Port of State.pollingInfo: the derived description of a polling controller. More...
#include <line/lang/qn/polling_info.h>
Public Attributes | |
| lang::PollingType | ptype = lang::PollingType::EXHAUSTIVE |
| std::size_t | pk = 1 |
| std::vector< bool > | polled |
| std::vector< bool > | has_sw |
| std::vector< std::size_t > | ksw |
| std::vector< Matrix< T > > | sw_d0 |
| std::vector< Matrix< T > > | sw_d1 |
| std::vector< std::vector< T > > | sw_pie |
| std::size_t | off = 0 |
| std::size_t | width = 0 |
| std::size_t | ipos = static_cast<std::size_t>(-1) |
| std::size_t | iswk = static_cast<std::size_t>(-1) |
| std::size_t | ictr = static_cast<std::size_t>(-1) |
| bool | valid = false |
Port of State.pollingInfo: the derived description of a polling controller.
The controller lives in the shared node block of the local variables and holds, in order, [pos, swk, ctr]. Each column is materialized ONLY when the discipline needs it, so a polling station never carries state its dynamics cannot distinguish:
pos the buffer the server is at or heading to. Needed only when some switchover is non-immediate: while a job is in service pos equals that job's class, and while the station is empty with immediate switchovers the position is unobservable. swk 0 when the server sits at pos, else the phase of the switchover into it. Same condition as pos. ctr the visit budget. Every discipline except EXHAUSTIVE bounds a visit.
An Immediate switchover is deliberately NOT a state: its rate is ~1e8, and taking that literally would make the generator stiff and add a spurious state per buffer. polling_next folds it into the enclosing transition.
EVERY POLLING STATION HAS A CONTROLLER, whichever API declared it and even when none did. The reference returns [] only for a node that is not a polling station and otherwise defaults to EXHAUSTIVE with every switchover immediate, so NetworkStruct::effective_polling resolves the two C++ spellings – set_polling writing sn.pollingparam, and setPollingType / setSwitchover writing the Station fields – into one description.
BUILDING NO CONTROLLER WAS NOT A DEGRADED MODEL BUT A CRASH. Reading only pollingparam left every station declared the other way (the JSON reader included) with valid = false and, with it, an EMPTY polled. polling_next indexes polled[pos-1] with no size test, and an empty std::vector<bool> holds a NULL word pointer, so that index segfaults rather than returning a garbage bit – which is why the failure surfaced as a SIGSEGV inside after_event_station_arv and not as a wrong number.
Definition at line 73 of file polling_info.h.
| std::vector<bool> line::qn::PollingInfo< T >::has_sw |
Definition at line 76 of file polling_info.h.
Referenced by line::qn::after_event_station_switch(), line::qn::polling_blocks(), line::qn::polling_info(), line::qn::polling_next(), and line::qn::refresh_sync().
| std::size_t line::qn::PollingInfo< T >::ictr = static_cast<std::size_t>(-1) |
Definition at line 84 of file polling_info.h.
Referenced by line::qn::polling_blocks(), line::qn::polling_get(), line::qn::polling_info(), and line::qn::polling_set().
| std::size_t line::qn::PollingInfo< T >::ipos = static_cast<std::size_t>(-1) |
Definition at line 82 of file polling_info.h.
Referenced by line::qn::polling_blocks(), line::qn::polling_get(), line::qn::polling_info(), and line::qn::polling_set().
| std::size_t line::qn::PollingInfo< T >::iswk = static_cast<std::size_t>(-1) |
Definition at line 83 of file polling_info.h.
Referenced by line::qn::polling_blocks(), line::qn::polling_get(), line::qn::polling_info(), and line::qn::polling_set().
| std::vector<std::size_t> line::qn::PollingInfo< T >::ksw |
Definition at line 77 of file polling_info.h.
Referenced by line::qn::after_event_station_switch(), line::qn::polling_blocks(), line::qn::polling_info(), and line::qn::polling_land().
| std::size_t line::qn::PollingInfo< T >::off = 0 |
Definition at line 80 of file polling_info.h.
Referenced by line::qn::append_local_vars(), line::qn::polling_get(), line::qn::polling_info(), and line::qn::polling_set().
| std::size_t line::qn::PollingInfo< T >::pk = 1 |
Definition at line 75 of file polling_info.h.
Referenced by line::qn::polling_blocks(), line::qn::polling_budget(), and line::qn::polling_info().
| std::vector<bool> line::qn::PollingInfo< T >::polled |
Definition at line 76 of file polling_info.h.
Referenced by line::qn::polling_blocks(), line::qn::polling_info(), and line::qn::polling_next().
| lang::PollingType line::qn::PollingInfo< T >::ptype = lang::PollingType::EXHAUSTIVE |
Definition at line 74 of file polling_info.h.
Referenced by line::qn::after_event_station_dep(), line::qn::polling_blocks(), line::qn::polling_budget(), and line::qn::polling_info().
| std::vector<Matrix<T> > line::qn::PollingInfo< T >::sw_d0 |
Definition at line 78 of file polling_info.h.
Referenced by line::qn::after_event_station_switch(), and line::qn::polling_info().
| std::vector<Matrix<T> > line::qn::PollingInfo< T >::sw_d1 |
Definition at line 78 of file polling_info.h.
Referenced by line::qn::after_event_station_switch(), and line::qn::polling_info().
| std::vector<std::vector<T> > line::qn::PollingInfo< T >::sw_pie |
Definition at line 79 of file polling_info.h.
Referenced by line::qn::polling_info(), and line::qn::polling_land().
| bool line::qn::PollingInfo< T >::valid = false |
Definition at line 85 of file polling_info.h.
Referenced by line::qn::after_event_station_switch(), line::qn::append_local_vars(), line::qn::polling_info(), and line::qn::refresh_sync().
| std::size_t line::qn::PollingInfo< T >::width = 0 |
Definition at line 80 of file polling_info.h.
Referenced by line::qn::append_local_vars(), and line::qn::polling_info().