![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Transition(model, name): a Petri-net transition, with its modes declared after it as MATLAB, the JAR and Python declare theirs. More...
#include <line/lang/qn/nodes.h>
Public Member Functions | |
| Transition (NetworkModel &m, const std::string &nm) | |
| Transition (NetworkModel &m, const std::string &nm, const qn::TransitionParam< double > &par) | |
| The all-at-once form, for a caller that already holds a finished block. | |
| std::size_t | add_mode (const std::string &nm) |
| addMode(name): the new mode's 1-based index. | |
| void | set_distribution (std::size_t mode, const Dist &d) |
| setDistribution(mode, dist): the mode's firing law. | |
| void | set_timing_strategy (std::size_t mode, lang::TimingStrategy ts) |
| setTimingStrategy(mode, strategy): TIMED or IMMEDIATE. | |
| void | set_number_of_servers (std::size_t mode, double n) |
| setNumberOfServers(mode, n); GlobalConstants::MaxInt is infinite. | |
| void | set_firing_priorities (std::size_t mode, double prio) |
| setFiringPriorities(mode, priority). | |
| void | set_firing_weights (std::size_t mode, double w) |
| setFiringWeights(mode, weight): the share among simultaneously enabled modes. | |
| void | set_firing_rate_dependence (std::size_t mode, const std::function< double(const std::vector< double > &)> &g) |
| setFiringRateDependence(mode, g): g(marking) scales the firing rate. | |
| void | set_enabling_conditions (std::size_t mode, const JobClass &cls, const Place &place, double tokens) |
| setEnablingConditions(mode, class, place, tokens). | |
| void | set_inhibiting_conditions (std::size_t mode, const JobClass &cls, const Place &place, double tokens) |
| setInhibitingConditions(mode, class, place, tokens); absent means never. | |
| void | set_firing_outcome (std::size_t mode, const JobClass &cls, const Node &dest, double tokens) |
| setFiringOutcome(mode, class, node, tokens); the node may be a Sink. | |
| Public Member Functions inherited from line::Node | |
| std::size_t | get_index () const |
| get_index(): the 1-based node index the builder assigned. | |
| const std::string & | get_name () const |
| getName(). | |
| NetworkModel & | model () const |
| The model this node belongs to. | |
| operator std::size_t () const | |
| A handle IS its index wherever one is expected. | |
| void | set_routing (std::size_t cls, lang::RoutingStrategy rs) |
| setRouting(class, strategy). | |
| void | set_routing_weights (std::size_t cls, const std::map< std::size_t, double > &weights) |
| setRoutingWeight(class, weights): the WRROBIN share per destination. | |
Additional Inherited Members | |
| Protected Member Functions inherited from line::Node | |
| Node (NetworkModel &m, std::size_t idx, const std::string &nm) | |
| Protected Attributes inherited from line::Node | |
| NetworkModel * | model_ |
| std::size_t | idx_ |
| std::string | name_ |
Transition(model, name): a Petri-net transition, with its modes declared after it as MATLAB, the JAR and Python declare theirs.
Transition t1(model, "T1");
const std::size_t mode1 = t1.add_mode("Mode1");
t1.set_distribution(mode1, Exp(2.0));
t1.set_enabling_conditions(mode1, c1, p1, 2);
t1.set_firing_outcome(mode1, c1, p2, 2);
THE ARCS TAKE HANDLES, not indices: a Place where a place is meant and a JobClass where a class is meant, so mixing the two is a compile error. Both convert to std::size_t, which is exactly what made them interchangeable at a call site written against the index API.
|
inline |
Definition at line 286 of file nodes.h.
References line::Node::Node().
|
inline |
The all-at-once form, for a caller that already holds a finished block.
Definition at line 288 of file nodes.h.
References line::Node::Node().
|
inline |
addMode(name): the new mode's 1-based index.
Definition at line 292 of file nodes.h.
References line::qn::Network< T >::add_mode(), line::Node::idx_, and line::Node::model_.
|
inline |
setDistribution(mode, dist): the mode's firing law.
Definition at line 294 of file nodes.h.
References line::Node::idx_, line::Node::model_, and line::qn::Network< T >::set_mode_distribution().
|
inline |
setEnablingConditions(mode, class, place, tokens).
Definition at line 378 of file nodes.h.
References line::JobClass::get_index(), line::Node::get_index(), line::Node::idx_, line::Node::model_, and line::qn::Network< T >::set_enabling_conditions().
|
inline |
setFiringOutcome(mode, class, node, tokens); the node may be a Sink.
Definition at line 388 of file nodes.h.
References line::JobClass::get_index(), line::Node::get_index(), line::Node::idx_, line::Node::model_, line::Node::Node(), and line::qn::Network< T >::set_firing_outcome().
|
inline |
setFiringPriorities(mode, priority).
Definition at line 306 of file nodes.h.
References line::Node::idx_, line::Node::model_, and line::qn::Network< T >::set_firing_priority().
|
inline |
setFiringRateDependence(mode, g): g(marking) scales the firing rate.
Definition at line 314 of file nodes.h.
References line::Node::idx_, line::Node::model_, and line::qn::Network< T >::set_mode_firing_dependence().
|
inline |
setFiringWeights(mode, weight): the share among simultaneously enabled modes.
Definition at line 310 of file nodes.h.
References line::Node::idx_, line::Node::model_, and line::qn::Network< T >::set_firing_weight().
|
inline |
setInhibitingConditions(mode, class, place, tokens); absent means never.
Definition at line 383 of file nodes.h.
References line::JobClass::get_index(), line::Node::get_index(), line::Node::idx_, line::Node::model_, and line::qn::Network< T >::set_inhibiting_conditions().
|
inline |
setNumberOfServers(mode, n); GlobalConstants::MaxInt is infinite.
Definition at line 302 of file nodes.h.
References line::Node::idx_, line::Node::model_, and line::qn::Network< T >::set_mode_servers().
|
inline |
setTimingStrategy(mode, strategy): TIMED or IMMEDIATE.
Definition at line 298 of file nodes.h.
References line::Node::idx_, line::Node::model_, and line::qn::Network< T >::set_mode_timing().