62 return method.rfind(
"spnlp", 0) == 0;
87 if (
opt.method ==
"spnlp2.upper") {
90 }
else if (
opt.method ==
"spnlp2.lower") {
93 }
else if (
opt.method ==
"spnlp1.upper") {
96 }
else if (
opt.method ==
"spnlp1.lower") {
100 throw UnsupportedError(
"solver_ba_spnlp_analyzer: unknown SPN bound method '" +
102 "'. Valid: spnlp2.upper, spnlp2.lower, spnlp1.upper, "
111 bool hasTransition =
false;
112 for (std::size_t i = 0; i < L.
nodes.size() && !hasTransition; ++i)
116 "' bounds a stochastic Petri net; this model has no Transition "
117 "node. Use the queueing-network bound families");
118 for (std::size_t i = 0; i < L.
nodes.size(); ++i) {
120 const std::size_t ist = L.
nodes[i].station;
121 if (ist >= 1 && ist <= M && L.
stations[ist - 1].sched != SchedStrategy::INF)
123 "' does not support queueing places: place " + L.
nodes[i].name +
124 " serves under a non-INF discipline, and the relaxation "
125 "carries one variable per place marking with no notion of an "
133 for (std::size_t pp = 0; pp < bnd.
places.size(); ++pp) {
134 const std::size_t ist = L.
nodes[bnd.
places[pp] - 1].station;
135 if (ist < 1 || ist > M)
continue;
145 const std::size_t ref = L.
classes[0].refstat;
146 if (ref >= 1 && ref <= M) s.
X[0] = s.
Tp(ref - 1, 0);
148 for (std::size_t i = 0; i < M; ++i) nk += s.
Q(i, 0);
150 s.
C[0] = nk / s.
X[0];
UnsupportedError(const std::string &what)
A network plus its refreshed NetworkStruct.
std::vector< JobClass > classes
std::vector< Station< T > > stations
stations[k-1] is the k-th station
std::vector< NodeDef > nodes
every node, in creation order
The exception types the port throws.
BaSolution< T > solver_ba_spnlp_analyzer(const qn::NetworkStruct< T > &L, const BaOptions &opt)
Moment-relaxation LP bounds for a stochastic Petri net.
bool is_spnlp_method(const std::string &method)
Whether a resolved method name belongs to the Petri-net LP family.
SpnLpBounds spn_lpbnd(const qn::NetworkStruct< T > &sn, const SpnLpOptions &options=SpnLpOptions())
Bracket the mean tokens and the throughputs of a stochastic Petri net.
Conservation laws of a layered queueing network, enumerated from its structure.
A queueing network and its refreshed NetworkStruct.
Port of matlab/src/solvers/BA/solver_ba_analyzer.m, the bound-analysis handler behind SolverBA.
Linear-programming bounds on the mean marking and the throughputs of a stochastic timed Petri net.
The options SolverBA reads.
Class-level results, the [Q,U,R,T,C,X] of solver_ba_analyzer.
The brackets; each vector pair holds the minimum then the maximum.
std::vector< double > place_tput_hi
std::vector< double > tokens_lo
std::vector< std::size_t > places
1-based node indices, in level order
std::vector< double > tokens_hi
std::vector< double > place_tput_lo
Options of the relaxation.
bool markovian
true (the default) uses the second-moment, covariance and Little's law families, which need exponenti...