ObjectivePreparation

ObjectivePreparation#

class ObjectivePreparation#

Selection for the active-objective Preparation phase.

The phase invokes convert_active_objective(). When the target differs from the active sense, that owner operation changes only the solver-facing objective. An existing output_objective is retained; otherwise the pre-conversion objective and sense are captured there. Solution and sample evaluation retain the entry output semantics. Convert the active objective to target during Preparation.

Invariants#

The immutable target records the solver-facing sense requested by Preparation.

>>> from ommx import ObjectivePreparation, Sense
>>> preparation = ObjectivePreparation(target=Sense.Minimize)
>>> assert preparation.target == Sense.Minimize
__eq__(other: object, /) → bool#
__new__(*, target: Sense) → ObjectivePreparation#
property target: Sense#

Read-only property.