Skip to content

Options

SolveOptions

Bases: NamedTuple

Limits and settings of one solve.

time_limit class-attribute instance-attribute

time_limit: float | None = None

Seconds after which SCIP stops, or None for no limit.

gap_limit class-attribute instance-attribute

gap_limit: float | None = None

Relative gap at which SCIP stops, or None for SCIP's default.

node_limit class-attribute instance-attribute

node_limit: int | None = None

Number of nodes after which SCIP stops, or None for no limit.

settings class-attribute instance-attribute

settings: tuple[ScipSetting, ...] = ()

Further parameter values, applied after the fields above.

Emphasis

Bases: IntEnum

SCIP's predefined parameter settings, with its SCIP_PARAMEMPHASIS values.

Verbosity

Bases: IntEnum

How much SCIP prints, as the values of its display/verblevel parameter.

ScipSetting

Bases: NamedTuple

A value for one SCIP parameter.

ScipParameter

ScipParameter(path: str, parameter_type: ParameterType)

Bases: Enum

A parameter of SCIP with its default plugins, named after its path.

NUMERICS_FEASTOL is the parameter numerics/feastol. The docstring of each member is SCIP's description.

CompileOptions

Bases: NamedTuple

Options of turning the functions of a problem into SCIP expressions.

split_sums class-attribute instance-attribute

split_sums: bool = True

Whether a sum of nonlinear terms becomes one SCIP expression per term.

gradient_interval_limit class-attribute instance-attribute

gradient_interval_limit: int = 300

Largest function, in jaxpr equations, that gets gradient bounds for monotonicity.

XLA takes tens of seconds to compile the interval derivative of large functions, and monotonicity is optional.

disk_cache class-attribute instance-attribute

disk_cache: bool = True

Whether lowered programs and executables are stored in the cache directory.

The directory is CYXLA_CACHE_DIR if set, and ~/.cache/cyxla otherwise.

threads class-attribute instance-attribute

threads: int | None = None

Number of threads that lower and compile programs, or None for one per CPU core.

With 1, the programs are built one after another on the calling thread.

RelaxationOptions

Bases: NamedTuple

Options of the McCormick relaxations that JAXormick builds for each function.

alpha_bb class-attribute instance-attribute

alpha_bb: bool = False

Whether relaxations are intersected with αBB relaxations from Hessian bounds.

tighten_bounds class-attribute instance-attribute

tighten_bounds: bool = False

Whether intermediate intervals are narrowed by affine relaxations at the box middle.

RelaxationMode

Bases: Enum

How the gradients of the convex and concave relaxations are computed.

FORWARD class-attribute instance-attribute

FORWARD = 'forward'

Forward mode, which gives smaller programs for functions of few inputs.

REVERSE class-attribute instance-attribute

REVERSE = 'reverse'

Reverse mode, which is cheaper when a function has many inputs.

HandlerOptions

Bases: NamedTuple

Optional features of the expression handler, all on by default.

Each switch exists so that its effect on solving can be measured. Switching one off never makes results wrong, only slower or less tight.

caches class-attribute instance-attribute

caches: bool = True

Whether each expression keeps its recent values, gradients, bounds and estimators.

init_estimates class-attribute instance-attribute

init_estimates: bool = True

Whether the initial LP relaxation gets estimators at three points of the box.

monotonicity class-attribute instance-attribute

monotonicity: bool = True

Whether monotonicity is reported from interval bounds of the gradient.

global_estimators class-attribute instance-attribute

global_estimators: bool = True

Whether estimators over the global box are marked as globally valid.

reverse_propagation class-attribute instance-attribute

reverse_propagation: bool = True

Whether bounds on a function tighten the bounds of its inputs.

hessian class-attribute instance-attribute

hessian: bool = True

Whether SCIP gets exact Hessian-vector products of each function.

zero_copy class-attribute instance-attribute

zero_copy: bool = True

Whether executions read and write host memory directly when the plugin allows it.

prefetch class-attribute instance-attribute

prefetch: bool = True

Whether the first entry of a block that needs a run fills the inputs of all entries.

The run then answers the callbacks of the other entries at the same point or box.