Objectives

Objective — a quantity to optimise within a ModelConfiguration.

class Objective(objective, maximise=False, priority=Priority.HIGH, weight=1.0, name=None)[source]

A numeric quantity the solver should maximise or minimise.

Construct via ModelConfiguration.add_objective(). The wrapped Calculation must be INTEGER or DECIMAL.

property name: str | None

Optional display name for this objective.

build()[source]

Serialise to a JSON-compatible dict.

Return type:

dict[str, Any]