Class Expolynomial

All Implemented Interfaces:
Serializable, Copyable

public class Expolynomial extends ContinuousDistribution implements Serializable
Expolynomial distribution with density f(x) = sum ci * x^ai * exp(-li*x).

Represents an expolynomial density over a bounded domain [eft, lft], matching the GEN expolynomial format of external stochastic Petri net tools. The density is carried as an expolynomial expression string rather than as numeric parameters, so it is opaque to this class: the class stores and transports it verbatim.

The parameter slots mirror the MATLAB reference implementation (matlab/src/lang/processes/Expolynomial.m):

  • param 1 - density, the expolynomial density expression string
  • param 2 - eft, the earliest firing time (lower bound of support)
  • param 3 - lft, the latest firing time (upper bound of support, possibly Double.POSITIVE_INFINITY)

Moments. As in MATLAB and in the Python-native implementation, the moments of an expolynomial density are not obtained by numerical integration: getMean(), getSCV(), getSkewness(), evalCDF(double), evalLST(double) and sample(int, Random) all return NaN. The distribution is therefore a transport-only type in the lang layer: it carries the density to engines that can interpret the GEN expolynomial syntax, and every moment-based solver sees NaN rather than a silently wrong value.

Support. Unlike MATLAB, which passes a NaN placeholder triple to the superclass constructor, the support is reported here as the pair (eft, lft), matching the getSupport of the Python-native implementation.

See Also:
  • Constructor Details

    • Expolynomial

      public Expolynomial(String density, double eft, double lft)
      Creates an expolynomial distribution.
      Parameters:
      density - density expression string in expolynomial (GEN) format
      eft - earliest firing time (lower bound of support)
      lft - latest firing time (upper bound of support, may be Double.POSITIVE_INFINITY)
  • Method Details

    • getDensity

      public String getDensity()
      Returns the density expression string in expolynomial (GEN) format.
    • getEft

      public double getEft()
      Returns the earliest firing time, i.e. the lower bound of the support.
    • getLft

      public double getLft()
      Returns the latest firing time, i.e. the upper bound of the support. May be Double.POSITIVE_INFINITY for an unbounded density.
    • getMean

      public double getMean()
      Returns NaN: the mean is not obtained by numerical integration.
      Specified by:
      getMean in class Distribution
      Returns:
      the mean value
    • getSCV

      public double getSCV()
      Returns NaN: the SCV is not obtained by numerical integration.
      Specified by:
      getSCV in class Distribution
      Returns:
      the squared coefficient of variation
    • getSkewness

      public double getSkewness()
      Returns NaN: the skewness is not obtained by numerical integration.
      Specified by:
      getSkewness in class Distribution
      Returns:
      the skewness value
    • evalCDF

      public double evalCDF(double t)
      Returns NaN: the CDF of an expolynomial density expression is not evaluated here.
      Specified by:
      evalCDF in class Distribution
      Parameters:
      t - the point at which to evaluate the CDF
      Returns:
      the CDF value at point t
    • evalLST

      public double evalLST(double s)
      Returns NaN: the LST of an expolynomial density expression is not evaluated here.
      Specified by:
      evalLST in class ContinuousDistribution
      Parameters:
      s - the Laplace domain variable
      Returns:
      the LST value at s
    • getProcess

      public MatrixCell getProcess()
      Returns the numeric part of the process representation, {eft, lft}, as two singleton matrices. The density expression is a string and hence cannot be held in a MatrixCell; obtain it with getDensity().
      Specified by:
      getProcess in class ContinuousDistribution
      Returns:
      MatrixCell with distribution-specific parameters
    • sample

      public double[] sample(int n, Random random)
      Returns an array of n NaNs: sampling an expolynomial density expression is not supported.
      Specified by:
      sample in class Distribution
      Parameters:
      n - the number of samples to generate
      random - the random number generator to use
      Returns:
      array of random samples
    • toString

      public String toString()
      Overrides:
      toString in class Object