![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
A LINE Environment embedded as a stage agent plus its stage networks (EmbeddedEnvironment). More...
#include <line/lang/lal/embed.h>
Public Member Functions | |
| EmbeddedEnvironment (const env::Environment< double > &e, const std::string &prefix, std::optional< double > cutoff) | |
| const std::string & | name () const override |
| The part name (the prefix, or the model name). | |
| const std::string & | prefix () const override |
| The embedding prefix, empty when none was given. | |
| std::size_t | initial () override |
| The global index of the initial state. | |
| const std::vector< NodeEvent > & | labels () override |
| Every node key an arc carries, in first-seen order. | |
| bool | is_vanishing (std::size_t s) override |
| True when s is a vanishing state of the embedded model. | |
| bool | has_vanishing () override |
| True when the embedded model has any vanishing state. | |
| void | refresh () override |
| Re-read the embedded model on next use. | |
| NodeEvent | resolve (const std::string &node, lang::EventType event, const std::optional< std::string > &jobclass, const std::optional< std::string > &mode) override |
| The key of a node action, validated against the model's names. | |
| std::string | node_name (std::size_t node) override |
| Name of the 1-based node index of the model. | |
| std::string | class_name (std::size_t cls) override |
| Name of the 1-based class index of the model. | |
| void | check_injection (const NodeEvent &) override |
| Refuse a key that a hand agent cannot drive. | |
| std::vector< std::pair< std::size_t, double > > | inject (std::size_t, const NodeEvent &key) override |
| Passive response to an injected arrival: [(target, probability)]; empty blocks it. | |
| std::vector< std::pair< std::string, std::size_t > > | node_states () override |
| [(node name, isf)] of the stateful node agents (isf is 1-based). | |
| std::string | node_state_label (std::size_t s, std::size_t isf) override |
| The state row of stateful node isf in global state s, as [v1 v2 ...]. | |
| std::vector< double > | node_row (std::size_t s, const std::string &node) override |
| The state row of a stateful node in global state s. | |
| double | node_jobs (std::size_t s, const std::string &node, const std::string &jobclass) override |
| Jobs at a station in global state s: the total, or those of class jobclass when nonempty. | |
| bool | has_stages () override |
| True for an embedded Environment, whose stage is an agent of its own. | |
| std::size_t | stage_of (std::size_t s) override |
| The stage of global state s (Environment only). | |
| std::vector< std::string > | stage_names () override |
| The stage names (Environment only). | |
| std::vector< EmbeddedArc > | outgoing (std::size_t s) override |
| Arcs leaving global state s. | |
| Public Member Functions inherited from line::lal::EmbeddedPart | |
| virtual | ~EmbeddedPart () |
| virtual bool | matches (const NodeEvent &key, const NodeEvent &pattern) const |
| True when key is pattern, or pattern leaves the index open. | |
| virtual void | set_injected (const std::set< std::string > &) |
| Record the classes hand agents inject (names); a change invalidates the enumeration. | |
A LINE Environment embedded as a stage agent plus its stage networks (EmbeddedEnvironment).
The joint state is (clock, x): clock is the stage together with the phases of its running stage clocks, x a global state of that stage's network. In stage e the network evolves with stage e's own arcs; a stage clock ringing moves to the destination stage, starts its clocks afresh, and carries the network state across under the arc's reset policy: no reset (keep) matches every node's state row in the destination stage's space; a queue-length reset q -> f(q) moves to the destination state with queue lengths f(q), keeping the service phases where such a state exists; a resetStateFun (Environment::set_state_reset) gives the entry law of the exit state as the image of its unit vector over the tangible states. Competing arcs are racing phase-type clocks; kernel arcs draw the destination on entry and then run that arc's sojourn clock. Stage changes carry the key Env.STAGE[e->h].
|
inline |
Definition at line 836 of file embed.h.
References line::ErrorKind::ErrorKind(), name(), and prefix().
|
inlineoverridevirtual |
Refuse a key that a hand agent cannot drive.
Implements line::lal::EmbeddedPart.
Definition at line 885 of file embed.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
Referenced by inject().
|
inlineoverridevirtual |
Name of the 1-based class index of the model.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
True for an embedded Environment, whose stage is an agent of its own.
Reimplemented from line::lal::EmbeddedPart.
|
inlineoverridevirtual |
True when the embedded model has any vanishing state.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
The global index of the initial state.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
Passive response to an injected arrival: [(target, probability)]; empty blocks it.
Implements line::lal::EmbeddedPart.
Definition at line 890 of file embed.h.
References check_injection().
|
inlineoverridevirtual |
True when s is a vanishing state of the embedded model.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
Every node key an arc carries, in first-seen order.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
The part name (the prefix, or the model name).
Implements line::lal::EmbeddedPart.
Definition at line 847 of file embed.h.
Referenced by EmbeddedEnvironment().
|
inlineoverridevirtual |
Jobs at a station in global state s: the total, or those of class jobclass when nonempty.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
Name of the 1-based node index of the model.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
The state row of a stateful node in global state s.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
The state row of stateful node isf in global state s, as [v1 v2 ...].
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
[(node name, isf)] of the stateful node agents (isf is 1-based).
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
Arcs leaving global state s.
Implements line::lal::EmbeddedPart.
Definition at line 926 of file embed.h.
References line::lal::EmbeddedNetwork::arcs(), line::Matrix< T >::cols(), line::lal::EmbeddedArc::immediate, line::lal::EmbeddedArc::keys, line::lal::EmbeddedArc::rate, and line::lal::EmbeddedArc::target.
|
inlineoverridevirtual |
The embedding prefix, empty when none was given.
Implements line::lal::EmbeddedPart.
Definition at line 848 of file embed.h.
Referenced by EmbeddedEnvironment().
|
inlineoverridevirtual |
Re-read the embedded model on next use.
Implements line::lal::EmbeddedPart.
|
inlineoverridevirtual |
The key of a node action, validated against the model's names.
Implements line::lal::EmbeddedPart.
Definition at line 877 of file embed.h.
References line::lang::STAGE.
|
inlineoverridevirtual |
The stage names (Environment only).
Reimplemented from line::lal::EmbeddedPart.
|
inlineoverridevirtual |
The stage of global state s (Environment only).
Reimplemented from line::lal::EmbeddedPart.