Skip to content

Statistics

A solver declares the statistics it can report through fznso_<name>_statistic_list. Each carries a type and two independent flags saying where it can be read from:

  • solution — read with FznsoSolutionMethods::statistic during on_solution, describing the search at the moment that solution was found;
  • solver — read with fznso_<name>_solver_statistic, describing the instance, and still readable after a run has finished.

At least one flag must be set; both may be. An identifier a solver did not declare, or one read from the wrong side, yields FznsoValueAbsent rather than an error.

Counters are cumulative over the life of the solver instance, across runs, unless a solver documents otherwise.

These are the standard FlatZinc statistics, respelled in this registry’s conventions: snake_case rather than camelCase, and the type-prefixed pair int_objective / float_objective where FlatZinc’s untyped text output could report one name as either.

So openNodes is open_nodes, peakDepth is peak_depth, solveTime is solve_time. The one substantive rename is FlatZinc’s variables, which is decisions here, because that is what the rest of this interface calls them.

23 statistics

backjumps: int

Times the solver jumped back past more than one decision.

bool_decisions: int

Boolean decision variables the solver created.

constraints: int

Constraints the solver holds after posting the model, which may differ from the model’s own count once simplification has run.

decisions: int

Decision variables the solver holds after posting the model, which may differ from the model’s own count once simplification has run.

failures: int

Leaf nodes that failed, where propagation proved no solution lies below.

float_decisions: int

Floating-point decision variables the solver created.

float_objective: float

The objective value of the current solution.

float_objective_bound: float

The best dual bound the solver has proved on the objective.

init_time: float

Seconds spent posting the model, before the search began.

int_decisions: int

Integer decision variables the solver created.

int_objective: int

The objective value of the current solution.

Declared by a solver whose objective is an integer; one optimising a float declares float_objective instead.

int_objective_bound: int

The best dual bound the solver has proved on the objective.

The gap between this and int_objective is what remains to be closed. The same value is pushed as it improves through the progress.bound message scope.

nodes: int

Search tree nodes explored.

nogoods: int

Nogoods recorded during the search.

open_nodes: int

Search tree nodes created but not yet explored.

peak_depth: int

Greatest search depth reached.

peak_memory: float

Greatest memory the solver held at once, in megabytes.

propagations: int

Propagator invocations performed.

propagators: int

Propagators the solver created.

Often larger than constraints: one constraint may be enforced by several propagators.

restarts: int

Times the solver restarted the search from the root.

set_of_int_decisions: int

Set decision variables the solver created.

solutions: int

Solutions reported so far, counting from zero for the first.

solve_time: float

Seconds spent searching, excluding the time taken to read the model.