Class LDESOptions

java.lang.Object
jline.solvers.SolverOptions
jline.solvers.ldes.LDESOptions

public class LDESOptions extends SolverOptions
Configuration options for LINE Discrete Event Simulator (LDES) solver.

LDESOptions extends the base solver options to provide LDES-specific configuration parameters. LDES uses the SSJ library for discrete-event simulation that generates sample paths of the queueing network state evolution over time.

Key LDES characteristics:

  • Discrete event simulation approach using SSJ library
  • Handles multiclass Jackson queueing networks
  • Supports steady-state analysis
  • Provides statistical estimates with confidence intervals
  • Uses event-count based stopping (samples = max service completions)
  • Default: 200,000 service completion events

Default Configuration (based on benchmark analysis):

 samples     = 200,000   (good accuracy/speed balance, ~5% mean error)
 tranfilter  = "mser5"   (adaptive warmup detection)
 warmupfrac  = 0.20      (20% warmup for fixed filter)
 cimethod    = "obm"     (overlapping batch means)
 obmoverlap  = 0.50      (50% overlap)
 cnvgon      = false     (fixed event count)
 
For heavy-tailed workloads (high SCV), consider increasing samples to 500,000+.

Since:
1.0
See Also:
  • Field Details

    • DEFAULT_SAMPLES

      public static final int DEFAULT_SAMPLES
      Default number of service completion events for LDES solver (200,000)
      See Also:
    • DEFAULT_CNVG_TOL

      public static final double DEFAULT_CNVG_TOL
      Default convergence tolerance (5% relative precision)
      See Also:
    • DEFAULT_CNVG_BATCH

      public static final int DEFAULT_CNVG_BATCH
      Default minimum number of batches before checking convergence
      See Also:
    • cnvgon

      public boolean cnvgon
      Enable convergence-based stopping. When enabled, simulation stops when confidence interval half-width relative to mean falls below the convergence tolerance for all metrics. Default: false (disabled to maintain backward compatibility with existing tests)
    • cnvgtol

      public double cnvgtol
      Convergence tolerance - stop when (CI half-width / mean) is below this threshold. A value of 0.05 means 5% relative precision. Default: 0.05
    • cnvgbatch

      public int cnvgbatch
      Minimum number of batches required before checking for convergence. More batches provide more reliable confidence interval estimates. Default: 20
    • cnvgchk

      public int cnvgchk
      Number of events between convergence checks. A value of 0 means auto-calculate (samples / 50). Default: 0 (auto)
    • DEFAULT_MSER_BATCH

      public static final int DEFAULT_MSER_BATCH
      Default MSER batch size (MSER-5 standard)
      See Also:
    • DEFAULT_WARMUP_FRAC

      public static final double DEFAULT_WARMUP_FRAC
      Default warmup fraction when using fixed method
      See Also:
    • tranfilter

      public String tranfilter
      Transient filter method for warmup detection and removal. Valid values: "mser5" (automatic MSER-5), "fixed" (fixed fraction), "none" (no filtering). Default: "mser5"
    • mserbatch

      public int mserbatch
      Batch size for MSER transient detection algorithm. Only used when tranfilter = "mser5". Default: 5 (standard MSER-5)
    • warmupfrac

      public double warmupfrac
      Warmup fraction when using fixed transient filter. Fraction of total events discarded as warmup (0.0 to 1.0). Only used when tranfilter = "fixed". Default: 0.2 (20% warmup)
    • DEFAULT_OBM_OVERLAP

      public static final double DEFAULT_OBM_OVERLAP
      Default OBM overlap fraction (50% overlap)
      See Also:
    • DEFAULT_CI_MIN_BATCH

      public static final int DEFAULT_CI_MIN_BATCH
      Default minimum batch size for CI computation
      See Also:
    • DEFAULT_CI_MIN_OBS

      public static final int DEFAULT_CI_MIN_OBS
      Default minimum observations required for CI computation
      See Also:
    • cimethod

      public String cimethod
      Confidence interval computation method. Valid values: "obm" (overlapping batch means), "bm" (batch means), "spectral" (Heidelberger-Welch spectral analysis), "none" (no CI). Default: "obm"
    • obmoverlap

      public double obmoverlap
      Overlap fraction for OBM confidence intervals (0.0 to 1.0). 0.5 = 50% overlap (standard), 0.0 = non-overlapping (same as bm). Only used when cimethod = "obm". Default: 0.5
    • ciminbatch

      public int ciminbatch
      Minimum batch size for confidence interval computation. Actual batch size is max(ciminbatch, sqrt(n)) where n is sample count. Default: 10
    • ciminobs

      public int ciminobs
      Minimum number of post-warmup observations required before computing CIs. If fewer observations available, CI is set to 0 (unavailable). Default: 100
    • DEFAULT_SPECTRAL_LOW_FREQ_FRAC

      public static final double DEFAULT_SPECTRAL_LOW_FREQ_FRAC
      Default fraction of lowest frequencies used for spectral regression
      See Also:
    • spectralLowFreqFrac

      public double spectralLowFreqFrac
      Fraction of lowest frequencies to use for log-periodogram regression in the Heidelberger-Welch spectral method. Only used when cimethod = "spectral". Default: 0.25 (lowest 25% of frequencies)
    • basTrace

      public boolean basTrace
      Enable detailed BAS (Blocking After Service) tracing for debugging. Default: false
    • maxSimEvents

      public int maxSimEvents
      Maximum number of total simulation events (all types: arrivals, departures, routing, setup, etc.). When set to a positive value, the simulation stops when this limit is reached, regardless of service completion count. A value of -1 means no limit (only service completion count is used). Default: -1 (no limit)
    • DEFAULT_REPLICATIONS

      public static final int DEFAULT_REPLICATIONS
      Default number of replications (1 = single run, backward compatible)
      See Also:
    • replications

      public int replications
      Number of independent replications to run. When > 1, enables parallel replication mode where each replication runs independently with its own RNG stream, and results are aggregated using cross-replication variance for confidence intervals. Default: 1 (single long run with batch means, backward compatible)
    • numThreads

      public int numThreads
      Number of parallel threads for replication execution. Default: Runtime.getRuntime().availableProcessors() / 2 Only used when replications > 1.
  • Constructor Details

    • LDESOptions

      public LDESOptions()
      Constructs a new LDESOptions instance with default LDES solver configuration. Sets the maximum service completion events to 200,000 by default. Verbose output is disabled by default for LDES.
  • Method Details

    • setCnvgon

      public LDESOptions setCnvgon(boolean enabled)
      Sets whether convergence-based stopping is enabled.
      Parameters:
      enabled - true to enable convergence checking
      Returns:
      this options instance for method chaining
    • setCnvgtol

      public LDESOptions setCnvgtol(double tolerance)
      Sets the convergence tolerance.
      Parameters:
      tolerance - the relative precision threshold (e.g., 0.05 for 5%)
      Returns:
      this options instance for method chaining
    • setCnvgbatch

      public LDESOptions setCnvgbatch(int minBatches)
      Sets the minimum number of batches before checking convergence.
      Parameters:
      minBatches - the minimum number of batches required
      Returns:
      this options instance for method chaining
    • setCnvgchk

      public LDESOptions setCnvgchk(int interval)
      Sets the number of events between convergence checks.
      Parameters:
      interval - the number of events (0 for auto-calculation)
      Returns:
      this options instance for method chaining
    • setTranfilter

      public LDESOptions setTranfilter(String method)
      Sets the transient filter method.
      Parameters:
      method - the transient filter method ("mser5", "fixed", or "none")
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if method is not valid
    • setMserbatch

      public LDESOptions setMserbatch(int batchSize)
      Sets the MSER batch size.
      Parameters:
      batchSize - the batch size for MSER algorithm (must be >= 1)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if batchSize is less than 1
    • setWarmupfrac

      public LDESOptions setWarmupfrac(double fraction)
      Sets the warmup fraction for fixed transient filter.
      Parameters:
      fraction - the warmup fraction (0.0 to 1.0, exclusive)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if fraction is not in [0, 1)
    • setCimethod

      public LDESOptions setCimethod(String method)
      Sets the confidence interval computation method.
      Parameters:
      method - the CI method ("obm", "bm", or "none")
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if method is not valid
    • setSpectralLowFreqFrac

      public LDESOptions setSpectralLowFreqFrac(double fraction)
      Sets the fraction of lowest frequencies for spectral log-periodogram regression.
      Parameters:
      fraction - the fraction (0.0 to 1.0, exclusive of 0)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if fraction is not in (0, 1]
    • setObmoverlap

      public LDESOptions setObmoverlap(double overlap)
      Sets the OBM overlap fraction.
      Parameters:
      overlap - the overlap fraction (0.0 to 1.0)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if overlap is not in [0, 1]
    • setCiminbatch

      public LDESOptions setCiminbatch(int minSize)
      Sets the minimum batch size for CI computation.
      Parameters:
      minSize - the minimum batch size (must be >= 2)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if minSize is less than 2
    • setCiminobs

      public LDESOptions setCiminobs(int minObs)
      Sets the minimum observations required for CI computation.
      Parameters:
      minObs - the minimum number of observations (must be >= 10)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if minObs is less than 10
    • setMaxSimEvents

      public LDESOptions setMaxSimEvents(int maxEvents)
      Sets the maximum number of total simulation events.
      Parameters:
      maxEvents - the maximum number of events (-1 for no limit, must be >= 1 or -1)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if maxEvents is less than 1 and not -1
    • setReplications

      public LDESOptions setReplications(int numReps)
      Sets the number of independent replications to run. When > 1, enables parallel replication mode with cross-replication CI.
      Parameters:
      numReps - number of replications (must be >= 1)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if numReps is less than 1
    • setNumThreads

      public LDESOptions setNumThreads(int threads)
      Sets the number of parallel threads for replication execution.
      Parameters:
      threads - number of threads (must be >= 1)
      Returns:
      this options instance for method chaining
      Throws:
      IllegalArgumentException - if threads is less than 1
    • copy

      public LDESOptions copy()
      Creates a deep copy of this LDESOptions object. Overrides the base class copy() to preserve LDES-specific fields.
      Overrides:
      copy in class SolverOptions
      Returns:
      a deep copy of this LDESOptions object