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

Event-based representation of the fluid marking process of a stochastic Petri net. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <functional>
#include <limits>
#include <map>
#include <string>
#include <vector>
#include "line/lang/qn/network_struct.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for fluid_petri_terms.h:

Go to the source code of this file.

Classes

struct  line::fluid::petri::PetriMode
 One firing mode of one transition, with its arcs and its firing process. More...
struct  line::fluid::petri::PetriTerms
 The assembled drift terms of a net. More...

Namespaces

namespace  line
namespace  line::fluid
namespace  line::fluid::petri

Functions

double line::fluid::petri::petri_fine_tol ()
 GlobalConstants.FineTol, the reference's own "effectively zero".
template<class T>
PetriTerms line::fluid::petri::petri_build_terms (const qn::NetworkStruct< T > &sn)
 Assemble the drift terms of a net.

Detailed Description

Event-based representation of the fluid marking process of a stochastic Petri net.

Port of matlab/src/solvers/FLD/fluid_petri_terms.m, cross-checked against jar/src/main/java/jline/solvers/fluid/petri/PetriTerms.java.

A GSPN is already a density-dependent Markov population process, which is the object the moment-closure family of SolverFLD is built on: the marking is the population, a transition mode is a reaction, its incidence column is the jump, and the rate law lambda*min(enabling degree, servers) is the same min() non-linearity the min-normal closure exists to smooth. Nothing about the closure changes here; only where the drift comes from.

dx/dt = D * r(x, Sigma, phi, mu)

THE STATE, x = [ m ; y ].

m(p,k) token mass of class k at place p. One coordinate per (place, class) pair some arc touches, the initial marking loads, or a Source feeds; a pair nothing reaches is dropped rather than carried as a null direction of the Newton system. y(j,h) the number of mode-j servers running in phase h, for a mode whose firing time has more than one phase. Their SUM is not free: the ENABLE synchronization latches it instantaneously to min(enabling degree, servers), so the latch is an ALGEBRAIC row with one free-sign unknown mu_j and the phase split evolves differentially. CARRYING THE DISTRIBUTION INSTEAD OF THE COUNT LOOKS TIDIER AND IS WRONG: the resulting equation is missing a term and agrees with the count form only AT a fixed point.

There is no Source coordinate: an exogenous arrival is a CONSTANT-propensity event depositing one token, as it is in the NRM SPN runner. There is no Sink coordinate either: a firing arc into a sink is mass leaving the net.

THE EVENTS, one column of D each: kind 1 a firing of mode j out of phase h into phase h'; kind 2 an internal phase change; kind 3 an exogenous arrival; kind 4 a firing of an IMMEDIATE mode, at the algebraic flow phi_j; kind 5 the server latch of a multi-phase mode, at the free-sign unknown mu_j.

Arithmetic: DOUBLE ONLY. The closures evaluate the normal CDF, which is not an element of the field generated by the inputs under any arithmetic, so the templated form this tree uses elsewhere would buy nothing.

Definition in file fluid_petri_terms.h.