ommx.v1.instance_pb2
Classes
A set of parameters for instantiating an optimization problem from a parametric instance |
Module Contents
- class ommx.v1.instance_pb2.Instance(*, description: global___Instance | None = ..., decision_variables: collections.abc.Iterable[ommx.v1.decision_variables_pb2.DecisionVariable] | None = ..., objective: ommx.v1.function_pb2.Function | None = ..., constraints: collections.abc.Iterable[ommx.v1.constraint_pb2.Constraint] | None = ..., sense: global___Instance = ..., parameters: global___Parameters | None = ..., constraint_hints: ommx.v1.constraint_hints_pb2.ConstraintHints | None = ..., removed_constraints: collections.abc.Iterable[ommx.v1.constraint_pb2.RemovedConstraint] | None = ..., decision_variable_dependency: collections.abc.Mapping[int, ommx.v1.function_pb2.Function] | None = ..., named_functions: collections.abc.Iterable[ommx.v1.named_function_pb2.NamedFunction] | None = ...)
- class DecisionVariableDependencyEntry(*, key: int = ..., value: ommx.v1.function_pb2.Function | None = ...)
- ClearField(field_name: Literal['key', b'key', 'value', b'value']) None
- HasField(field_name: Literal['value', b'value']) bool
- KEY_FIELD_NUMBER: int
- VALUE_FIELD_NUMBER: int
- key: int
- property value: ommx.v1.function_pb2.Function
- class Description(*, name: str | None = ..., description: str | None = ..., authors: collections.abc.Iterable[str] | None = ..., created_by: str | None = ...)
- ClearField(field_name: Literal['_created_by', b'_created_by', '_description', b'_description', '_name', b'_name', 'authors', b'authors', 'created_by', b'created_by', 'description', b'description', 'name', b'name']) None
- HasField(field_name: Literal['_created_by', b'_created_by', '_description', b'_description', '_name', b'_name', 'created_by', b'created_by', 'description', b'description', 'name', b'name']) bool
- WhichOneof(oneof_group: Literal['_created_by', b'_created_by']) Literal['created_by'] | None
- WhichOneof(oneof_group: Literal['_description', b'_description']) Literal['description'] | None
- WhichOneof(oneof_group: Literal['_name', b'_name']) Literal['name'] | None
- AUTHORS_FIELD_NUMBER: int
- CREATED_BY_FIELD_NUMBER: int
- DESCRIPTION_FIELD_NUMBER: int
- NAME_FIELD_NUMBER: int
- property authors: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
- created_by: str
The application or library name that created this message.
- description: str
- name: str
- class Sense
Other types of constraints will be appended here
TODO: Add semi-definite constraints to represent SDP repeated SemiDefiniteConstraint semi_definite_constraints = ?;
The sense of this instance
- ValueType
- ClearField(field_name: Literal['_parameters', b'_parameters', 'constraint_hints', b'constraint_hints', 'constraints', b'constraints', 'decision_variable_dependency', b'decision_variable_dependency', 'decision_variables', b'decision_variables', 'description', b'description', 'named_functions', b'named_functions', 'objective', b'objective', 'parameters', b'parameters', 'removed_constraints', b'removed_constraints', 'sense', b'sense']) None
- HasField(field_name: Literal['_parameters', b'_parameters', 'constraint_hints', b'constraint_hints', 'description', b'description', 'objective', b'objective', 'parameters', b'parameters']) bool
- WhichOneof(oneof_group: Literal['_parameters', b'_parameters']) Literal['parameters'] | None
- CONSTRAINTS_FIELD_NUMBER: int
- CONSTRAINT_HINTS_FIELD_NUMBER: int
- DECISION_VARIABLES_FIELD_NUMBER: int
- DECISION_VARIABLE_DEPENDENCY_FIELD_NUMBER: int
- DESCRIPTION_FIELD_NUMBER: int
- NAMED_FUNCTIONS_FIELD_NUMBER: int
- OBJECTIVE_FIELD_NUMBER: int
- PARAMETERS_FIELD_NUMBER: int
- REMOVED_CONSTRAINTS_FIELD_NUMBER: int
- SENSE_FIELD_NUMBER: int
- property constraint_hints: ommx.v1.constraint_hints_pb2.ConstraintHints
Constraint hints 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, …).
- property constraints: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.constraint_pb2.Constraint]
Constraints of the optimization problem
- property decision_variable_dependency: google.protobuf.internal.containers.MessageMap[int, ommx.v1.function_pb2.Function]
When a decision variable is dependent on another decision variable as polynomial, this map contains the ID of the dependent decision variable as key and the polynomial as value.
- property decision_variables: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.decision_variables_pb2.DecisionVariable]
Decision variables used in this instance
This must constain every decision variables used in the objective and constraints.
This can contains a decision variable that is not used in the objective or constraints.
- property description: global___Instance
- property named_functions: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.named_function_pb2.NamedFunction]
- property objective: ommx.v1.function_pb2.Function
- property parameters: global___Parameters
Parameters used when instantiating this instance
- property removed_constraints: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.constraint_pb2.RemovedConstraint]
Constraints removed via preprocessing. These are restored when evaluated into ommx.v1.Solution.
- sense: global___Instance.Sense.ValueType
The sense of this problem, i.e. minimize the objective or maximize it.
Design decision note: - This is a required field. Most mathematical modeling tools allow for an empty sense and default to minimization. Alternatively, some tools do not create such a field and represent maximization problems by negating the objective function. This project prefers explicit descriptions over implicit ones to avoid such ambiguity and to make it unnecessary for developers to look up the reference for the treatment of omitted cases.
- class ommx.v1.instance_pb2.Parameters(*, entries: collections.abc.Mapping[int, float] | None = ...)
A set of parameters for instantiating an optimization problem from a parametric instance
- class EntriesEntry(*, key: int = ..., value: float = ...)
- ClearField(field_name: Literal['key', b'key', 'value', b'value']) None
- KEY_FIELD_NUMBER: int
- VALUE_FIELD_NUMBER: int
- key: int
- value: float
- ClearField(field_name: Literal['entries', b'entries']) None
- ENTRIES_FIELD_NUMBER: int
- property entries: google.protobuf.internal.containers.ScalarMap[int, float]