ommx.v1.parametric_instance_pb2
Classes
Placeholder of a parameter in a parametrized optimization problem |
|
Optimization problem including parameter, variables varying while solving the problem like penalty weights or dual variables. |
Module Contents
- class ommx.v1.parametric_instance_pb2.Parameter(*, id: int = ..., name: str | None = ..., subscripts: collections.abc.Iterable[int] | None = ..., parameters: collections.abc.Mapping[str, str] | None = ..., description: str | None = ...)
Placeholder of a parameter in a parametrized optimization problem
- class ParametersEntry(*, key: str = ..., value: str = ...)
- ClearField(field_name: Literal['key', b'key', 'value', b'value']) None
- KEY_FIELD_NUMBER: int
- VALUE_FIELD_NUMBER: int
- key: str
- value: str
- ClearField(field_name: Literal['_description', b'_description', '_name', b'_name', 'description', b'description', 'id', b'id', 'name', b'name', 'parameters', b'parameters', 'subscripts', b'subscripts']) None
- HasField(field_name: Literal['_description', b'_description', '_name', b'_name', 'description', b'description', 'name', b'name']) bool
- WhichOneof(oneof_group: Literal['_description', b'_description']) Literal['description'] | None
- WhichOneof(oneof_group: Literal['_name', b'_name']) Literal['name'] | None
- DESCRIPTION_FIELD_NUMBER: int
- ID_FIELD_NUMBER: int
- NAME_FIELD_NUMBER: int
- PARAMETERS_FIELD_NUMBER: int
- SUBSCRIPTS_FIELD_NUMBER: int
- description: str
Human-readable description for the parameter
- id: int
ID for the parameter
IDs are not required to be sequential.
The ID must be unique within the instance including the decision variables.
- name: str
Name of the parameter. e.g. x
- property parameters: google.protobuf.internal.containers.ScalarMap[str, str]
Additional metadata for the parameter, same usage as DecisionVariable.parameters
- property subscripts: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
Subscripts of the parameter, same usage as DecisionVariable.subscripts
- class ommx.v1.parametric_instance_pb2.ParametricInstance(*, description: ommx.v1.instance_pb2.Instance.Description | None = ..., decision_variables: collections.abc.Iterable[ommx.v1.decision_variables_pb2.DecisionVariable] | None = ..., parameters: collections.abc.Iterable[global___Parameter] | None = ..., objective: ommx.v1.function_pb2.Function | None = ..., constraints: collections.abc.Iterable[ommx.v1.constraint_pb2.Constraint] | None = ..., sense: ommx.v1.instance_pb2.Instance.Sense.ValueType = ..., 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 = ...)
Optimization problem including parameter, variables varying while solving the problem like penalty weights or dual variables. These parameters are not decision variables.
- 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
- ClearField(field_name: Literal['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['constraint_hints', b'constraint_hints', 'description', b'description', 'objective', b'objective']) bool
- 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. This may contain parameters in addition to the decision variables.
- 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
- property description: ommx.v1.instance_pb2.Instance.Description
- property named_functions: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.named_function_pb2.NamedFunction]
- property objective: ommx.v1.function_pb2.Function
Objective function of the optimization problem. This may contain parameters in addition to the decision variables.
- property parameters: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Parameter]
Parameters of this instance
The ID must be unique within the instance including the decision variables.
- 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: ommx.v1.instance_pb2.Instance.Sense.ValueType
The sense of this problem, i.e. minimize the objective or maximize it.