Package org.ojalgo.optimisation
Class Optimisation.Options
java.lang.Object
org.ojalgo.optimisation.Optimisation.Options
- All Implemented Interfaces:
Optimisation
- Enclosing interface:
Optimisation
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ojalgo.optimisation.Optimisation
Optimisation.Constraint, Optimisation.ConstraintType, Optimisation.Integration<M extends Optimisation.Model,
S extends Optimisation.Solver>, Optimisation.Model, Optimisation.Objective, Optimisation.Options, Optimisation.ProblemStructure, Optimisation.Result, Optimisation.Sense, Optimisation.Solver, Optimisation.State -
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
This may turn on various experimental features.Used to determine/validate feasibility.int
The maximmum number of iterations allowed for the solve() command.int
Calculations will be terminated after this number of iterations if a feasible solution has been found.If this is null nothing is printed, if it is not null then progress/debug messages are printed to that BasicLogger.boolean
Detailed (debug) logging or not.Class
<? extends Optimisation.Solver> Which Optimisation.Solver to debug.private Object
private ConvexSolver.Configuration
private IntegerStrategy
private LinearSolver.Configuration
For display only!Object.toString()
and log message formatting.Describes the (required/sufficient) accuracy of the solution.Controls if sparse/iterative solvers should be favoured over dense/direct alternatives.long
The maximmum number of millis allowed for the solve() command.long
Calculations will be terminated after this amount of time if a feasible solution has been found.boolean
If true models and solvers will validate data at various points. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabort
(CalendarDateDuration duration) Set thetime_abort
to the given duration.convex()
Configurations specific to ojAlgo's built-inConvexSolver
.convex
(ConvexSolver.Configuration configuration) debug
(Class<? extends Optimisation.Solver> solver) Will configure detailed debug logging and validation<T> Optional
<T> getConfigurator
(Class<T> type) integer()
integer
(IntegerStrategy strategy) Set the strategy/configuration for theIntegerSolver
.linear()
linear
(LinearSolver.Configuration configuration) Configurations specific to ojAlgo's built-inLinearSolver
.progress
(Class<? extends Optimisation.Solver> solver) Will configure high level (low volume) progress loggingvoid
setConfigurator
(Object configurator) A configurator for 3:d party solvers.suffice
(CalendarDateDuration duration) Set thetime_suffice
to the given duration.
-
Field Details
-
experimental
public boolean experimentalThis may turn on various experimental features. If you do not know exactly what you want to turn on, for the specific version you're using, then always leave this 'false'. -
feasibility
Used to determine/validate feasibility. Are the variables within their bounds or not, are the constraints violated or not? are the variable values integer or not?Primarily used in
ExpressionsBasedModel
. Not used (should not be) as part of solver logic, but ouside the solvers to validate their results. -
iterations_abort
public int iterations_abortThe maximmum number of iterations allowed for the solve() command. -
iterations_suffice
public int iterations_sufficeCalculations will be terminated after this number of iterations if a feasible solution has been found. If no feasible solution has been found calculations will continue until one is found or iterations_abort is reached. This option is, probably, only of interest with the IntegerSolver. -
logger_appender
If this is null nothing is printed, if it is not null then progress/debug messages are printed to that BasicLogger. -
logger_detailed
public boolean logger_detailedDetailed (debug) logging or not. -
logger_solver
Which Optimisation.Solver to debug. Null means NO solvers. This setting is only relevant iflogger_appender
has been set. -
print
For display only!Object.toString()
and log message formatting. -
solution
Describes the (required/sufficient) accuracy of the solution. It is used when copying the solver's solution back to the model (converting from double to BigDecimal). Specific solvers may also use this as a stopping criteria or similar. The default essentially copies the numbers as is – corresponding to full double precision – but with no more than 14 decimals. -
sparse
Controls if sparse/iterative solvers should be favoured over dense/direct alternatives. Sparse/iterative alternatives are usually preferable with larger models, but there are also algorithmical differences that could make one alternative better than the other for a (your) specific case. There are 3 different possibilities for this option:- TRUE Will use the sparse linear solver and the iterative convex solver.
- FALSE Will use the dense linear solver and the direct convex solver.
- NULL ojAlgo will use some logic to choose for you. This is the default. Currently, the dense LinearSolver and the iterative ConvexSolver will be used. In the vast majority of cases these are the best alternatives.
-
time_abort
public long time_abortThe maximmum number of millis allowed for the solve() command. Executions will be aborted regardless of if a solution has been found or not. -
time_suffice
public long time_sufficeCalculations will be terminated after this amount of time if a feasible solution has been found. If no feasible solution has been found calculations will continue until one is found or time_abort is reached. This option is , probably, only of interest with the IntegerSolver. -
validate
public boolean validateIf true models and solvers will validate data at various points. Validation is turned off by default. Turning it on will significantly slow down execution - even very expensive validation may be performed. -
myConfigurator
-
myConvexConfiguration
-
myIntegerStrategy
-
myLinearConfiguration
-
-
Constructor Details
-
Options
public Options()
-
-
Method Details
-
abort
Set thetime_abort
to the given duration. A duration may be constructed this way:CalendarDateUnit.HOUR.newDuration(0.5)
. -
convex
Configurations specific to ojAlgo's built-inConvexSolver
. -
convex
-
debug
Will configure detailed debug logging and validation -
getConfigurator
-
integer
-
integer
Set the strategy/configuration for theIntegerSolver
. You can either reconfigure theIntegerStrategy.DEFAULT
instance or create an entirely new implementation of the interface. -
linear
-
linear
Configurations specific to ojAlgo's built-inLinearSolver
. -
progress
Will configure high level (low volume) progress logging -
setConfigurator
A configurator for 3:d party solvers. Each such solver may define its own configurator type. -
suffice
Set thetime_suffice
to the given duration. A duration may be constructed this way:CalendarDateUnit.HOUR.newDuration(0.5)
.
-