ommx.v1.constraint_hints_pb2

Classes

ConstraintHints

A constraint hint is an additional inforomation to be used by solver to gain performance.

Module Contents

class ommx.v1.constraint_hints_pb2.ConstraintHints(*, one_hot_constraints: collections.abc.Iterable[ommx.v1.one_hot_pb2.OneHot] | None = ..., sos1_constraints: collections.abc.Iterable[ommx.v1.sos1_pb2.SOS1] | None = ...)

A constraint hint is an additional inforomation to be used by solver to gain performance. They are derived from one-or-more constraints in the instance and typically contains information of special types of constraints (e.g. one-hot, SOS, …).

ClearField(field_name: Literal['one_hot_constraints', b'one_hot_constraints', 'sos1_constraints', b'sos1_constraints']) None
ONE_HOT_CONSTRAINTS_FIELD_NUMBER: int
SOS1_CONSTRAINTS_FIELD_NUMBER: int
property one_hot_constraints: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.one_hot_pb2.OneHot]

e.g. x_1 + … + x_n = 1 for binary variables x_1, …, x_n.

Type:

One-hot constraint

property sos1_constraints: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.sos1_pb2.SOS1]

at most one of x_1, …, x_n can be non-zero.

Type:

SOS1 constraint