![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | Distrib |
| struct | EntryWorkflow |
| Activity graph of one entry, as a workflow plus its execution counts. More... | |
| struct | GlobalConstants |
| The MATLAB GlobalConstants, as reported by lineStart at its defaults. More... | |
| struct | PhLaw |
| A phase-type law as the composition rules pass it around. More... | |
| struct | Precedence |
| One precedence of the activity graph. More... | |
| struct | SPTree |
| The flat series-parallel tree. More... | |
| class | Workflow |
Enumerations | |
| enum class | PrecedenceType |
| Activity precedence kinds, with the values of MATLAB ActivityPrecedenceType. More... | |
| enum class | SPNodeType |
| A node of the series-parallel tree. More... | |
Functions | |
| template<class T> | |
| PhLaw< T > | ph_law_of (const Distrib< T > &d) |
| The (alpha, S) pair of a phase-type Distrib, the form the composition rules take. | |
| template<class T> | |
| EntryWorkflow< T > | entry_workflow (const ::line::lqn::LqnStruct< T > &lqn, std::size_t eidx, bool with_calls) |
| Activity graph of LQN entry EIDX as a Workflow. | |
| template<class T> | |
| PhLaw< T > | detail_compose_serialized (Workflow< T > &wf, const SPTree< T > &tree, std::size_t k) |
| Recursive body of serial_law, declared first so serial_law can call it. | |
| template<class T> | |
| PhLaw< T > | serial_law (Workflow< T > &wf) |
| Composed law of a workflow in which the branches of an AND fork are SERIAL rather than concurrent, that is, the total work the branches request rather than the elapsed time until the last of them finishes. | |
| template<class T> | |
| std::pair< T, T > | ph_moments (const std::vector< T > &alpha, const Matrix< T > &S) |
| First two moments of a phase-type law without building a Distrib, which is what the layered fixed point needs at every iteration for every composed entry law. | |
|
strong |
Activity precedence kinds, with the values of MATLAB ActivityPrecedenceType.
Definition at line 470 of file lang_types.h.
|
strong |
A node of the series-parallel tree.
Definition at line 189 of file workflow.h.
| PhLaw< T > line::api::lqn::detail_compose_serialized | ( | Workflow< T > & | wf, |
| const SPTree< T > & | tree, | ||
| std::size_t | k ) |
Recursive body of serial_law, declared first so serial_law can call it.
Definition at line 197 of file lqn_ph.h.
References line::api::lqn::Workflow< T >::compose_loop_geometric(), line::api::lqn::Workflow< T >::compose_mixture(), line::api::lqn::Workflow< T >::compose_serial(), detail_compose_serialized(), line::InputError::InputError(), and line::workflow::SPTree< T >::nodes.
Referenced by detail_compose_serialized(), and serial_law().
| EntryWorkflow< T > line::api::lqn::entry_workflow | ( | const ::line::lqn::LqnStruct< T > & | lqn, |
| std::size_t | eidx, | ||
| bool | with_calls ) |
Activity graph of LQN entry EIDX as a Workflow.
The precedences are read from LqnStruct::precedences rather than reconstructed from graph, whose loop back-edges carry probabilities and not counts.
WITH_CALLS true expands every synchronous call of an activity into a leaf of its own, placed in series after the activity, so that the call response law and the host demand law stay separable across iterations. False keeps only the host demands, which is the processor-demand law of the entry: the host is released while a call is outstanding.
Definition at line 104 of file lqn_ph.h.
References line::api::lqn::EntryWorkflow< T >::act_idx_of, line::api::lqn::EntryWorkflow< T >::call_idx_of, line::api::lqn::EntryWorkflow< T >::callexecs, entry_workflow(), line::api::lqn::EntryWorkflow< T >::execs, line::workflow::SPTree< T >::execs, line::api::lqn::Distrib< T >::immediate(), line::InputError::InputError(), line::workflow::SPTree< T >::leaf_of, line::workflow::Precedence< T >::post_acts, line::workflow::Precedence< T >::post_params, line::workflow::Precedence< T >::post_type, line::workflow::Precedence< T >::pre_acts, line::workflow::Precedence< T >::pre_params, line::workflow::Precedence< T >::pre_type, line::lang::SYNC, line::UnsupportedError::UnsupportedError(), line::api::lqn::EntryWorkflow< T >::wf, and line::api::lqn::Workflow< T >::Workflow().
Referenced by entry_workflow().
The (alpha, S) pair of a phase-type Distrib, the form the composition rules take.
For every Markovian family D1 = (-D0 e) alpha, so any row with a positive exit rate recovers alpha when the parameters do not carry it.
Definition at line 52 of file lqn_ph.h.
References line::workflow::PhLaw< T >::alpha, line::lang::APH, line::lang::Distrib< T >::D0, line::lang::Distrib< T >::D1, line::lang::ME, line::lang::Distrib< T >::params, line::lang::PH, ph_law_of(), line::workflow::PhLaw< T >::S, and line::lang::Distrib< T >::type.
Referenced by ph_law_of().
| std::pair< T, T > line::api::lqn::ph_moments | ( | const std::vector< T > & | alpha, |
| const Matrix< T > & | S ) |
First two moments of a phase-type law without building a Distrib, which is what the layered fixed point needs at every iteration for every composed entry law.
A defective ALPHA carries an atom at zero and contributes nothing to either moment.
Returns {mean, squared coefficient of variation}.
Definition at line 258 of file lqn_ph.h.
References line::api::lqn::GlobalConstants::FineTol, line::lu_factor(), line::lu_solve(), ph_moments(), and line::Matrix< T >::rows().
Referenced by ph_moments().
Composed law of a workflow in which the branches of an AND fork are SERIAL rather than concurrent, that is, the total work the branches request rather than the elapsed time until the last of them finishes.
This is the law of the PROCESSOR demand of an LQN entry. Two branches of an AND fork are two activity threads of the same task instance: they overlap in time, so the entry response time is the maximum of the branches, but they run on ONE processor, so the demand they place on it is the sum. Composing the host law with Workflow::to_ph would charge the processor the maximum and let the layer report a utilization below the true one, which no amount of iterating recovers.
Every other node keeps its own composition rule: an OR fork is a mixture, a loop is a geometric compound, so the correlation within a branch survives.
Definition at line 241 of file lqn_ph.h.
References detail_compose_serialized(), line::workflow::SPTree< T >::root, serial_law(), and line::UnsupportedError::UnsupportedError().
Referenced by serial_law().