LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
spn_lpbnd.h File Reference

Linear-programming bounds on the mean marking and the throughputs of a stochastic timed Petri net. More...

#include <cmath>
#include <cstddef>
#include <cstdio>
#include <limits>
#include <map>
#include <string>
#include <vector>
#include "line/api/mam/map_moment.h"
#include "line/api/spn/spn_sinvariants.h"
#include "line/lang/distribution.h"
#include "line/lang/lang_types.h"
#include "line/lang/qn/network_struct.h"
#include "line/util/error.h"
#include "line/util/lp_highs.h"
#include "line/util/simplex.h"
Include dependency graph for spn_lpbnd.h:

Go to the source code of this file.

Classes

struct  line::spn::SpnLpOptions
 Options of the relaxation. More...
struct  line::spn::SpnLpMode
 One (transition, mode) pair over place levels. More...
struct  line::spn::SpnLpBounds
 The brackets; each vector pair holds the minimum then the maximum. More...

Namespaces

namespace  line
 Conservation laws of a layered queueing network, enumerated from its structure.
namespace  line::spn

Functions

template<class T>
SpnLpBounds line::spn::spn_lpbnd (const qn::NetworkStruct< T > &sn, const SpnLpOptions &options=SpnLpOptions())
 Bracket the mean tokens and the throughputs of a stochastic Petri net.

Detailed Description

Linear-programming bounds on the mean marking and the throughputs of a stochastic timed Petri net.

The stationary chain is relaxed to a MOMENT POLYTOPE: the uniformized evolution equation is written for E[X_p], E[X_p^2] and E[X_p1 X_p2], which gives linear equalities among the mean marking x, the enabling probabilities q and the products y(p,t) = E[X_p e_t]; behavioural and probabilistic inequalities are added on top; and every reported measure is then obtained by minimising and maximising its linear form over that polytope. Any stationary point of the true chain satisfies every row, so the two optima BRACKET the exact value whatever the polytope leaves out.

This is the Petri-net sibling of the QRF bounds in SolverBA: same technique, a different index space, and a LINEAR objective, so there is no stationary point to escape from and the answer is a property of the model alone.

VARIABLES, over place levels l and modes e: x(l) the mean tokens, q(e) the probability that mode e is enabled, th(e) its throughput, u(e) the state-equation firing counts, and y(l,e) = E[X_l e_e] on the Markovian side only. u is EXISTENTIAL and is not reported: E[X] is a convex combination of reachable markings, each of which is m0 + C h for some nonnegative integer h, so the mean satisfies m0 + C u for some nonnegative real u.

ONE LEVEL PER (PLACE, CLASS), place-major, as in the reference: the arcs are read per class off TransitionParam::enabling / inhibiting / firing, so a multiclass net gets P*R place levels (level l = pp*R + k) and the per-level invariant family (8) is the finest one. A single-class net has one level per place, as before.

THE INITIAL MARKING is read, in the reference's order, from the declared per-place state (NetworkStruct::initmarking, Place.setState) when any place declares tokens, else from the reference station of each closed class through spn_sinvariants; SpnLpOptions::init overrides both.

THE TOKEN COUNTS CREATED BY A FIRING ARE DETERMINISTIC IN LINE, which removes a whole branch of the reference: it allows sigma_(t,p)(n) to be random and splits the covariance family into an independent case (its eq. 7) and a selective one (its eq. 8). A firing outcome is an integer weight, so E[sigma^2] = sigma^2 and E[sigma_p1 sigma_p2] = sigma_p1 sigma_p2 hold exactly and eq. (7) is the correct form. Eq. (8) has no LINE model behind it and is deliberately absent.

LIVENESS IS OFF BY DEFAULT, AND THAT IS DELIBERATE. The reference's two liveness rows (sum_t q_t >= 1 and x_p <= sum_t y_(p,t)) hold only on a live net, and liveness is not something this function can cheaply certify – an inhibitor arc alone is enough to deadlock a net that looks well formed. A bound that silently assumed it would be wrong rather than loose on exactly the models where a bound is most wanted, so the rows are opt-in.

WHAT THE ROWS ARE WORTH, MEASURED. They are the whole of the lower side. On the reference's own Table 2 (its Fig. 2b production line, five rate vectors) assumelive reproduces its published l.b. column to four decimals – 1.1653 against 1.165, 1.8288 against 1.829, 1.5814 against 1.581, 1.3592 against 1.359, 1.3497 against 1.350 – while without them the Markovian lower bound collapses onto the OPERATIONAL one on four of the five. The upper side needs neither row and matches the published u.b.2 either way.

Reference: Z. Liu, "Performance Analysis of Stochastic Timed Petri Nets Using Linear Programming Approach", IEEE Trans. Software Engineering 24(11), 1998, 1014-1030. The constraint families are its Table 1, p. 1022; the bracket statement is its Theorem 3, p. 1021.

MATLAB twin: spn_lpbnd.m. JAR twin: Spn_lpbnd.java. Python twin: api/spn/lpbnd.py.

Definition in file spn_lpbnd.h.