Package jline.solvers

Class SolverOptions

java.lang.Object
jline.solvers.SolverOptions
Direct Known Subclasses:
AUTOptions, CTMCOptions, EnvOptions, FluidOptions, JMTOptions, LDESOptions, LNOptions, LQNSOptions, MAMOptions, MVAOptions, NCOptions, SSAOptions

public class SolverOptions extends Object
Configuration options for queueing network solvers.

This class contains all configurable parameters that control solver behavior, including convergence criteria, numerical tolerances, algorithmic choices, and output preferences. Options can be customized per solver type or globally across all solvers.

Many options are solver-specific and may be ignored by solvers that don't support them. The class provides builder-style setter methods for convenient configuration chaining.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Advanced configuration options for specialized solver features.
    static class 
    Configuration for ordinary differential equation solvers used in fluid analysis.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    Enable result caching to avoid recomputation
    Advanced configuration options
    double
    Confidence interval level for simulation-based solvers.
    Cutoff threshold for numerical computations.
    boolean
    Force solver execution even when validation fails
    boolean
    Hide immediate transitions from output when possible
    Initial solution for iterative solvers
    int
    Maximum number of iterations for iterative algorithms
    double
    Tolerance for iteration convergence
    boolean
    Keep intermediate results and temporary files
    Target language for execution ("java", "matlab", etc.)
    Solution algorithm/method to use
    ODE solver configurations for fluid analysis
    double[][]
    Load-dependent service rate scaling factors for QRF methods.
    boolean
    Enable remote solver execution
    Remote solver endpoint address
    Number of value iterations for CTMC reward computation.
    int
    Number of samples/operations for simulation-based methods.
    int
    Random number generator seed for reproducibility
    boolean
    Use stiff ODE solvers for numerical integration
    double[]
    Time interval for transient analysis [start, end]
    Fixed timestep for transient analysis (null for adaptive stepping)
    double
    General numerical tolerance
    Verbosity level for solver output
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates SolverOptions with default settings.
    Creates SolverOptions with defaults customized for a specific solver type.
  • Method Summary

    Modifier and Type
    Method
    Description
    confint(double level)
    Sets the confidence interval level for simulation-based solvers (builder pattern).
    Creates a deep copy of this SolverOptions instance.
    cutoff(double s)
    Sets the numerical cutoff threshold as a scalar value (builder pattern).
    cutoff(int s)
    Sets the numerical cutoff threshold as a scalar value (builder pattern).
    cutoff(Matrix cutoffMatrix)
    Sets the numerical cutoff threshold as a matrix (builder pattern).
    force(boolean force)
    Forces solver execution even when validation fails (builder pattern).
    getCutoffMatrix(int nstations, int nclasses)
    Ensures the cutoff is properly dimensioned for the given network structure.
    keep(boolean s)
    Sets whether to keep intermediate results and temporary files (builder pattern).
    Sets the solution method/algorithm (builder pattern).
    samples(int s)
    Sets the number of samples for simulation methods (builder pattern).
    seed(int s)
    Sets the random number generator seed (builder pattern).
    static void
    setLsodaMaxSteps(odesolver.LSODA solver, int maxSteps)
    Set the maximum number of internal steps for an LSODA solver instance via reflection (the library does not expose a public setter).
    void
    setODEMaxStep(double odeMaxStep)
    Sets the maximum step size for ODE solvers and updates all integrators.
    void
    setODEMinStep(double odeMinStep)
    Sets the minimum step size for ODE solvers and updates all integrators.
    verbose(boolean s)
    Sets the verbosity level using a boolean flag (builder pattern).
    Sets the verbosity level for solver output (builder pattern).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • cache

      public boolean cache
      Enable result caching to avoid recomputation
    • cutoff

      public Matrix cutoff
      Cutoff threshold for numerical computations. Can be either a scalar (uniform cutoff for all stations and classes) or a matrix (station × class specific cutoffs). Matrix dimensions should be nstations × nclasses.
    • config

      public SolverOptions.Config config
      Advanced configuration options
    • force

      public boolean force
      Force solver execution even when validation fails
    • hide_immediate

      public boolean hide_immediate
      Hide immediate transitions from output when possible
    • init_sol

      public Matrix init_sol
      Initial solution for iterative solvers
    • iter_max

      public int iter_max
      Maximum number of iterations for iterative algorithms
    • iter_tol

      public double iter_tol
      Tolerance for iteration convergence
    • tol

      public double tol
      General numerical tolerance
    • keep

      public boolean keep
      Keep intermediate results and temporary files
    • lang

      public String lang
      Target language for execution ("java", "matlab", etc.)
    • method

      public String method
      Solution algorithm/method to use
    • remote

      public boolean remote
      Enable remote solver execution
    • remote_endpoint

      public String remote_endpoint
      Remote solver endpoint address
    • odesolvers

      public SolverOptions.ODESolvers odesolvers
      ODE solver configurations for fluid analysis
    • samples

      public int samples
      Number of samples/operations for simulation-based methods.

      Semantics by solver:

      • LDES: Maximum service completion events (default: 1,000,000) - Simulation stops when this many completions are processed - 20% of events used for warmup (MSER-5 for automatic truncation)
      • SSA: Maximum random number generation operations (default: 10,000) - Approximately 2 RNG ops per reaction event (Gillespie algorithm)
      • JMT: Samples per performance metric, minimum 5000 (default: 10,000) - Statistical accuracy parameter, not simulation duration
      • NC: Monte Carlo samples for sampling-based methods (default: 100,000)
      • LQNS: Simulation length parameter for lqsim tool
      • Analytical solvers (MVA, MAM, CTMC, Fluid, etc.): Not used
    • seed

      public int seed
      Random number generator seed for reproducibility
    • stiff

      public boolean stiff
      Use stiff ODE solvers for numerical integration
    • timespan

      public double[] timespan
      Time interval for transient analysis [start, end]
    • timestep

      public Double timestep
      Fixed timestep for transient analysis (null for adaptive stepping)
    • verbose

      public VerboseLevel verbose
      Verbosity level for solver output
    • rewardIterations

      public Integer rewardIterations
      Number of value iterations for CTMC reward computation. Used by SolverCTMC for computing cumulative rewards via value iteration. Default is 1000 iterations.
    • confint

      public double confint
      Confidence interval level for simulation-based solvers. When set to a value between 0 and 1 (e.g., 0.95 for 95% confidence), the solver will compute and return confidence interval bounds. When set to 0 or negative, confidence intervals are disabled. Default is 0 (disabled).
    • qrfAlpha

      public double[][] qrfAlpha
      Load-dependent service rate scaling factors for QRF methods. Dimensions: alpha[i][n] where i is station index and n is population level. When null, defaults to ones(M, N) in the QRF solver.
  • Constructor Details

    • SolverOptions

      public SolverOptions()
      Creates SolverOptions with default settings. Initializes all parameters to sensible defaults suitable for most models.
    • SolverOptions

      public SolverOptions(SolverType solverType)
      Creates SolverOptions with defaults customized for a specific solver type.
      Parameters:
      solverType - the type of solver to configure defaults for, or null for generic defaults
  • Method Details

    • copy

      public SolverOptions copy()
      Creates a deep copy of this SolverOptions instance. All fields including nested objects are properly cloned.
      Returns:
      a deep copy of this options object
    • cutoff

      public SolverOptions cutoff(int s)
      Sets the numerical cutoff threshold as a scalar value (builder pattern). This creates a uniform cutoff matrix where all stations and classes use the same cutoff. The matrix will be properly dimensioned when the solver runs.
      Parameters:
      s - cutoff value to apply uniformly
      Returns:
      this SolverOptions instance for method chaining
    • cutoff

      public SolverOptions cutoff(double s)
      Sets the numerical cutoff threshold as a scalar value (builder pattern). This creates a uniform cutoff matrix where all stations and classes use the same cutoff. The matrix will be properly dimensioned when the solver runs.
      Parameters:
      s - cutoff value to apply uniformly
      Returns:
      this SolverOptions instance for method chaining
    • cutoff

      public SolverOptions cutoff(Matrix cutoffMatrix)
      Sets the numerical cutoff threshold as a matrix (builder pattern). The matrix should have dimensions nstations × nclasses where each element specifies the cutoff for a specific station-class combination.
      Parameters:
      cutoffMatrix - Matrix of cutoff values with dimensions nstations × nclasses
      Returns:
      this SolverOptions instance for method chaining
      Throws:
      IllegalArgumentException - if the matrix is null or has invalid dimensions
    • getCutoffMatrix

      public Matrix getCutoffMatrix(int nstations, int nclasses)
      Ensures the cutoff is properly dimensioned for the given network structure. If cutoff is null, initializes it to POSITIVE_INFINITY for all stations and classes. If cutoff is a 1x1 matrix (scalar), expands it to full dimensions. If cutoff is already properly dimensioned, leaves it unchanged.
      Parameters:
      nstations - Number of stations in the network
      nclasses - Number of job classes in the network
      Returns:
      The properly dimensioned cutoff matrix
    • keep

      public SolverOptions keep(boolean s)
      Sets whether to keep intermediate results and temporary files (builder pattern).
      Parameters:
      s - true to keep files, false to clean up
      Returns:
      this SolverOptions instance for method chaining
    • method

      public SolverOptions method(String s)
      Sets the solution method/algorithm (builder pattern).
      Parameters:
      s - method name (e.g., "mva", "ctmc", "ssa", "fluid")
      Returns:
      this SolverOptions instance for method chaining
    • samples

      public SolverOptions samples(int s)
      Sets the number of samples for simulation methods (builder pattern).
      Parameters:
      s - number of samples to generate
      Returns:
      this SolverOptions instance for method chaining
    • seed

      public SolverOptions seed(int s)
      Sets the random number generator seed (builder pattern).
      Parameters:
      s - seed value for reproducible random number generation
      Returns:
      this SolverOptions instance for method chaining
    • setODEMaxStep

      public void setODEMaxStep(double odeMaxStep)
      Sets the maximum step size for ODE solvers and updates all integrators.
      Parameters:
      odeMaxStep - maximum step size for numerical integration
    • setODEMinStep

      public void setODEMinStep(double odeMinStep)
      Sets the minimum step size for ODE solvers and updates all integrators.
      Parameters:
      odeMinStep - minimum step size for numerical integration
    • verbose

      public SolverOptions verbose(VerboseLevel s)
      Sets the verbosity level for solver output (builder pattern).
      Parameters:
      s - verbosity level
      Returns:
      this SolverOptions instance for method chaining
    • verbose

      public SolverOptions verbose(boolean s)
      Sets the verbosity level using a boolean flag (builder pattern).
      Parameters:
      s - true for standard output, false for silent mode
      Returns:
      this SolverOptions instance for method chaining
    • force

      public SolverOptions force(boolean force)
      Forces solver execution even when validation fails (builder pattern).
      Parameters:
      force - true to force execution despite validation failures
      Returns:
      this SolverOptions instance for method chaining
    • confint

      public SolverOptions confint(double level)
      Sets the confidence interval level for simulation-based solvers (builder pattern). A value between 0 and 1 enables CI computation (e.g., 0.95 for 95% confidence). A value of 0 or negative disables CI computation.
      Parameters:
      level - confidence level (0-1) or 0 to disable
      Returns:
      this SolverOptions instance for method chaining
    • setLsodaMaxSteps

      public static void setLsodaMaxSteps(odesolver.LSODA solver, int maxSteps)
      Set the maximum number of internal steps for an LSODA solver instance via reflection (the library does not expose a public setter).