Class SolverOptions
-
- All Implemented Interfaces:
public class SolverOptionsConfiguration 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSolverOptions.ConfigAdvanced configuration options for specialized solver features. These options control solver-specific behavior and may not be applicable to all solver types.
public classSolverOptions.ODESolversConfiguration for ordinary differential equation solvers used in fluid analysis. Contains different integrators optimized for various problem characteristics.
-
Field Summary
Fields Modifier and Type Field Description public booleancachepublic Matrixcutoffpublic SolverOptions.Configconfigpublic booleanforcepublic booleanhide_immediatepublic Matrixinit_solpublic intiter_maxpublic doubleiter_tolpublic doubletolpublic booleankeeppublic Stringlangpublic Stringmethodpublic booleanremotepublic Stringremote_endpointpublic SolverOptions.ODESolversodesolverspublic intsamplespublic intseedpublic booleanstiffpublic Array<double>timespanpublic Doubletimesteppublic VerboseLevelverbose
-
Constructor Summary
Constructors Constructor Description SolverOptions()Creates SolverOptions with default settings. SolverOptions(SolverType solverType)Creates SolverOptions with defaults customized for a specific solver type.
-
Method Summary
Modifier and Type Method Description SolverOptionscopy()Creates a deep copy of this SolverOptions instance. SolverOptionscutoff(int s)Sets the numerical cutoff threshold as a scalar value (builder pattern). SolverOptionscutoff(double s)Sets the numerical cutoff threshold as a scalar value (builder pattern). SolverOptionscutoff(Matrix cutoffMatrix)Sets the numerical cutoff threshold as a matrix (builder pattern). MatrixgetCutoffMatrix(int nstations, int nclasses)Ensures the cutoff is properly dimensioned for the given network structure. SolverOptionskeep(boolean s)Sets whether to keep intermediate results and temporary files (builder pattern). SolverOptionsmethod(String s)Sets the solution method/algorithm (builder pattern). SolverOptionssamples(int s)Sets the number of samples for simulation methods (builder pattern). SolverOptionsseed(int s)Sets the random number generator seed (builder pattern). voidsetODEMaxStep(double odeMaxStep)Sets the maximum step size for ODE solvers and updates all integrators. voidsetODEMinStep(double odeMinStep)Sets the minimum step size for ODE solvers and updates all integrators. SolverOptionsverbose(VerboseLevel s)Sets the verbosity level for solver output (builder pattern). SolverOptionsverbose(boolean s)Sets the verbosity level using a boolean flag (builder pattern). SolverOptionsforce(boolean force)Forces solver execution even when validation fails (builder pattern). -
-
Constructor Detail
-
SolverOptions
SolverOptions()
Creates SolverOptions with default settings.
-
SolverOptions
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 Detail
-
copy
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
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
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
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
-
getCutoffMatrix
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 networknclasses- Number of job classes in the network- Returns:
The properly dimensioned cutoff matrix
-
keep
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
SolverOptions method(String s)
Sets the solution method/algorithm (builder pattern).
- Parameters:
s- method name (e.g.- Returns:
this SolverOptions instance for method chaining
-
samples
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
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
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
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
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
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
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
-
-
-
-