Package jline.solvers.fluid.petri
Class PetriClosures
java.lang.Object
jline.solvers.fluid.petri.PetriClosures
The min-normal moment closures a Petri-net transition mode needs. Java twin of
the MATLAB
fluid_min_closure and fluid_minmulti_closure.
A queueing station needs the TWO-argument min(n,c). A transition
mode needs the many-argument one: its enabling degree is
e(m) = min_a ( m_a / w_a )over every input arc a, and the rate law then caps that at the mode's server count. There is no closed form for the expectation of a min of more than two correlated normals, so this uses the recursion of Clark (1961): the running min is replaced at each step by the normal with its exact first two moments, and the next argument is folded in with the exact bivariate formulas. The deterministic cap is folded in last, by the two-argument closure itself, so a single-arc mode reduces EXACTLY to the closure the queueing methods already use and no second code path exists for it.
THE RECURSION IS ORDER DEPENDENT, as Clark's approximation always is: only the first two moments of the running min are kept, so folding the arcs in a different order gives a slightly different answer. The order here is the caller's, i.e. increasing state coordinate, which the layout fixes and which therefore reproduces across the four codebases.
Reference: C. E. Clark, "The greatest of a finite set of random variables", Operations Research 9(2):145-162, 1961.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe result of the many-argument closure. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe band inside which two arguments are treated as equal at zero variance. -
Method Summary
Modifier and TypeMethodDescriptionstatic double[]minClosure(double n, double c, double s2, double vc, double cov) E[min(X,Y)] and dE/dE[X] for jointly normal X, Y.static PetriClosures.MinMultiminMultiClosure(double[] mu, Matrix S, double c) Min-normal closure of E[min(X_1,...,X_A,c)] by Clark's recursion.static doublenormCdf(double z) The standard normal CDF, without a statistics dependency.static doublenormPdf(double z) The standard normal density.
-
Field Details
-
FINE_TOL
public static final double FINE_TOLThe band inside which two arguments are treated as equal at zero variance.- See Also:
-
-
Method Details
-
minClosure
public static double[] minClosure(double n, double c, double s2, double vc, double cov) E[min(X,Y)] and dE/dE[X] for jointly normal X, Y. -
minMultiClosure
Min-normal closure of E[min(X_1,...,X_A,c)] by Clark's recursion.- Parameters:
mu- means of the arguments, already scaled by the arc weightsS- covariance of the arguments, symmetric positive semi-definitec- deterministic cap (the mode's server count); infinite for none
-
normCdf
public static double normCdf(double z) The standard normal CDF, without a statistics dependency. -
normPdf
public static double normPdf(double z) The standard normal density.
-