IntegerEncodingPreparation

IntegerEncodingPreparation#

class IntegerEncodingPreparation#

Selection for the used-Integer encoding Preparation phase.

Exactly one encoding owner operation is selected. Validation and mutation semantics remain owned by that operation.

__eq__(other: object, /) → bool#
log_encode_all_used_integers(*, atol: Optional[float] = None) → IntegerEncodingPreparation#

Select log encoding of every used Integer decision variable.

The complete target set is determined from used_decision_variables before mutation and encoded together with the same mathematical rule as log_encode(). atol normalizes bounds that are within tolerance of integers. On success, no used Integer decision variable remains; irrelevant Integer variables are not encoded.

A used Integer with a non-finite or otherwise non-encodable bound raises LogEncodingError. Active SOS1 members cannot be substituted and must be lowered first. Any error leaves this phase’s input unchanged.