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 withFznsoSolutionMethods::statisticduringon_solution, describing the search at the moment that solution was found;solver— read withfznso_<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.
Where these come from
Section titled “Where these come from”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
Section titled “backjumps”backjumps: intTimes the solver jumped back past more than one decision.
bool_decisions
Section titled “bool_decisions”bool_decisions: intBoolean decision variables the solver created.
constraints
Section titled “constraints”constraints: intConstraints the solver holds after posting the model, which may differ from the model’s own count once simplification has run.
decisions
Section titled “decisions”decisions: intDecision variables the solver holds after posting the model, which may differ from the model’s own count once simplification has run.
failures
Section titled “failures”failures: intLeaf nodes that failed, where propagation proved no solution lies below.
float_decisions
Section titled “float_decisions”float_decisions: intFloating-point decision variables the solver created.
float_objective
Section titled “float_objective”float_objective: floatThe objective value of the current solution.
float_objective_bound
Section titled “float_objective_bound”float_objective_bound: floatThe best dual bound the solver has proved on the objective.
init_time
Section titled “init_time”init_time: floatSeconds spent posting the model, before the search began.
int_decisions
Section titled “int_decisions”int_decisions: intInteger decision variables the solver created.
int_objective
Section titled “int_objective”int_objective: intThe 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
Section titled “int_objective_bound”int_objective_bound: intThe 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.
peak_memory
Section titled “peak_memory”peak_memory: floatGreatest memory the solver held at once, in megabytes.
propagators
Section titled “propagators”propagators: intPropagators the solver created.
Often larger than constraints: one constraint may be enforced by several propagators.
set_of_int_decisions
Section titled “set_of_int_decisions”set_of_int_decisions: intSet decision variables the solver created.
solutions
Section titled “solutions”solutions: intSolutions reported so far, counting from zero for the first.
solve_time
Section titled “solve_time”solve_time: floatSeconds spent searching, excluding the time taken to read the model.