Class Options
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanEnables diagnostic output.booleanEnables the feasible interior-point method.intThe maximum number of solver iterations before returning a solution.doubleThe maximum elapsed wall clock time in seconds before returning a solution.doubleThe solver will stop once the error is below this tolerance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithDiagnostics(boolean diagnostics) Enables or disables diagnostic output.withFeasibleIPM(boolean feasibleIPM) Enables or disables the feasible interior-point method.withMaxIterations(int maxIterations) Sets the max iterations.withTimeout(double timeout) Sets the timeout.withTolerance(double tolerance) Sets the tolerance.
-
Field Details
-
tolerance
The solver will stop once the error is below this tolerance. -
maxIterations
The maximum number of solver iterations before returning a solution. -
timeout
The maximum elapsed wall clock time in seconds before returning a solution. -
feasibleIPM
Enables the feasible interior-point method.When the inequality constraints are all feasible, step sizes are reduced when necessary to prevent them becoming infeasible again. This is useful when parts of the problem are ill-conditioned in infeasible regions (e.g., square root of a negative value). This can slow or prevent progress toward a solution though, so only enable it if necessary.
-
diagnostics
Enables diagnostic output.See https://sleipnirgroup.github.io/Sleipnir/md_usage.html#output for more information.
-
-
Constructor Details
-
Options
public Options()Default options.
-
-
Method Details
-
withTolerance
Sets the tolerance.- Parameters:
tolerance- The solver will stop once the error is below this tolerance.- Returns:
- This Options object.
-
withMaxIterations
Sets the max iterations.- Parameters:
maxIterations- The maximum number of solver iterations before returning a solution.- Returns:
- This Options object.
-
withTimeout
Sets the timeout.- Parameters:
timeout- The maximum elapsed wall clock time in seconds before returning a solution.- Returns:
- This Options object.
-
withFeasibleIPM
Enables or disables the feasible interior-point method.When the inequality constraints are all feasible, step sizes are reduced when necessary to prevent them becoming infeasible again. This is useful when parts of the problem are ill-conditioned in infeasible regions (e.g., square root of a negative value). This can slow or prevent progress toward a solution though, so only enable it if necessary.
- Parameters:
feasibleIPM- Enables or disables the feasible interior-point method.- Returns:
- This Options object.
-
withDiagnostics
Enables or disables diagnostic output.- Parameters:
diagnostics- Enables or disables diagnostic output.- Returns:
- This Options object.
-