Skip to content

Results

Solution

Bases: NamedTuple

The result of solving a problem.

x instance-attribute

x: PyTree[ndarray] | None

The best solution in the structure of the variables, or None if none was found.

objective instance-attribute

objective: float

Objective value of x, or infinity in the direction of optimization without one.

dual_bound instance-attribute

dual_bound: float

Bound on the optimal objective value that SCIP proved.

gap instance-attribute

gap: float

Relative gap between objective and dual_bound.

nodes instance-attribute

nodes: int

Branch-and-bound nodes processed.

statistics instance-attribute

statistics: HandlerStatistics

Callback counters of the expression handler, summed over all functions.

build instance-attribute

build: BuildStatistics

Time and counts of compiling the problem, zero if it was compiled before.

FileSolution

Bases: NamedTuple

The result of solving a problem file with SCIP alone.

x instance-attribute

x: Float[ndarray, ' n'] | None

Values of the variables in file order, or None if no solution was found.

Status

Bases: IntEnum

Why SCIP stopped solving, with SCIP's SCIP_STATUS values.

HandlerStatistics

Bases: NamedTuple

Counters of every callback of the expression handler for one function.

CallbackStatistics

Bases: NamedTuple

Counters of one callback of the expression handler.

calls instance-attribute

calls: int

Times SCIP called the callback.

hits instance-attribute

hits: int

Calls answered from a cache.

runs instance-attribute

runs: int

Program executions.

seconds instance-attribute

seconds: float

Seconds spent in program executions.

BuildStatistics

Bases: NamedTuple

Time and counts of building the terms of a problem.

lower_seconds class-attribute instance-attribute

lower_seconds: float = 0.0

Seconds spent tracing and lowering programs to StableHLO.

compile_seconds class-attribute instance-attribute

compile_seconds: float = 0.0

Seconds spent compiling StableHLO with the PJRT plugin.

load_seconds class-attribute instance-attribute

load_seconds: float = 0.0

Seconds spent reading lowered programs and executables from the disk cache.

lowered class-attribute instance-attribute

lowered: int = 0

Terms whose programs were lowered.

compiled class-attribute instance-attribute

compiled: int = 0

Programs compiled.

loaded class-attribute instance-attribute

loaded: int = 0

Programs whose executables came from the disk cache.

reused class-attribute instance-attribute

reused: int = 0

Terms whose compiled programs were already in memory.

skipped class-attribute instance-attribute

skipped: tuple[str, ...] = ()

Optional programs that were left out, with the reason.

wall_seconds class-attribute instance-attribute

wall_seconds: float = 0.0

Seconds the build took on the wall clock, which is less than the sum of the seconds above when several threads build programs at once.

add

add(other: BuildStatistics) -> BuildStatistics

Returns the sum of two statistics.

ScipVersion

Bases: NamedTuple

Version of the linked SCIP library.