Solver configuration#
- class jaxls.TrustRegionConfig[source]#
TrustRegionConfig(lambda_initial: ‘float | jax.Array’ = 0.0005, lambda_factor: ‘float | jax.Array’ = 2.0, lambda_min: ‘float | jax.Array’ = 1e-05, lambda_max: ‘float | jax.Array’ = 1000000.0, step_quality_min: ‘float | jax.Array’ = 0.001)
- class jaxls.TerminationConfig[source]#
TerminationConfig(max_iterations: ‘jdc.Static[int]’ = 100, early_termination: ‘jdc.Static[bool]’ = True, cost_tolerance: ‘float | jax.Array’ = 1e-05, gradient_tolerance: ‘float | jax.Array’ = 0.0001, gradient_tolerance_start_step: ‘int | jax.Array’ = 10, parameter_tolerance: ‘float | jax.Array’ = 1e-06)
- max_iterations: Annotated[int, '__jax_dataclasses_static_field__'] = 100#
Maximum number of optimization steps. For constrained problems, this is the maximum iterations per inner solve (not total iterations).
- early_termination: Annotated[bool, '__jax_dataclasses_static_field__'] = True#
If set to True, terminate when any of the tolerances are met. If False, always run max_iterations steps.
- cost_tolerance: float | Array = 1e-05#
We terminate if |cost change| / cost < cost_tolerance. For constrained problems, this acts as a floor for the adaptive inner solver tolerance.
- gradient_tolerance: float | Array = 0.0001#
We terminate if norm_inf(x - rplus(x, linear delta)) < gradient_tolerance. For constrained problems, this acts as a floor for the adaptive inner solver tolerance.
- class jaxls.ConjugateGradientConfig[source]#
Iterative solver for sparse linear systems. Can run on CPU or GPU.
For inexact steps, we use the Eisenstat-Walker criterion. For reference, see “Choosing the Forcing Terms in an Inexact Newton Method”, Eisenstat & Walker, 1996.”
- eisenstat_walker_gamma: float | Array = 0.9#
Eisenstat-Walker criterion gamma term. Controls how quickly the tolerance decreases. Typical values range from 0.5 to 0.9. Higher values lead to more aggressive tolerance reduction.
- class jaxls.AugmentedLagrangianConfig[source]#
Configuration for Augmented Lagrangian solver (ALGENCAN-style).
- penalty_initial: float | Array | None = None#
Initial penalty parameter. If None, uses ALGENCAN-style heuristic:
rho = 10 * max(1, |f|) / max(1, 0.5 * c^2). Set to a fixed value (e.g., 1.0) to override the automatic initialization.
- tolerance_absolute: float | Array = 1e-05#
max(snorm, csupn) < tol.- Type:
Absolute convergence tolerance
- tolerance_relative: float | Array = 0.0001#
snorm / snorm_initial < tol.- Type:
Relative convergence tolerance