ommx.v1.sample_set_pb2
Classes
Output of the sampling process. |
|
Evaluated constraint for samples |
|
A pair of decision variable description and its sampled values |
|
Evaluated named function for samples |
|
A map from sample IDs to sampled values |
|
A map from sample ID to state |
Module Contents
- class ommx.v1.sample_set_pb2.SampleSet(*, objectives: global___SampledValues | None = ..., decision_variables: collections.abc.Iterable[global___SampledDecisionVariable] | None = ..., constraints: collections.abc.Iterable[global___SampledConstraint] | None = ..., named_functions: collections.abc.Iterable[global___SampledNamedFunction] | None = ..., feasible: collections.abc.Mapping[int, bool] | None = ..., feasible_unrelaxed: collections.abc.Mapping[int, bool] | None = ..., feasible_relaxed: collections.abc.Mapping[int, bool] | None = ..., sense: ommx.v1.instance_pb2.Instance.Sense.ValueType = ...)
Output of the sampling process.
- class FeasibleEntry(*, key: int = ..., value: bool = ...)
- ClearField(field_name: Literal['key', b'key', 'value', b'value']) None
- KEY_FIELD_NUMBER: int
- VALUE_FIELD_NUMBER: int
- key: int
- value: bool
- class FeasibleRelaxedEntry(*, key: int = ..., value: bool = ...)
- ClearField(field_name: Literal['key', b'key', 'value', b'value']) None
- KEY_FIELD_NUMBER: int
- VALUE_FIELD_NUMBER: int
- key: int
- value: bool
- class FeasibleUnrelaxedEntry(*, key: int = ..., value: bool = ...)
- ClearField(field_name: Literal['key', b'key', 'value', b'value']) None
- KEY_FIELD_NUMBER: int
- VALUE_FIELD_NUMBER: int
- key: int
- value: bool
- ClearField(field_name: Literal['constraints', b'constraints', 'decision_variables', b'decision_variables', 'feasible', b'feasible', 'feasible_relaxed', b'feasible_relaxed', 'feasible_unrelaxed', b'feasible_unrelaxed', 'named_functions', b'named_functions', 'objectives', b'objectives', 'sense', b'sense']) None
- HasField(field_name: Literal['objectives', b'objectives']) bool
- CONSTRAINTS_FIELD_NUMBER: int
- DECISION_VARIABLES_FIELD_NUMBER: int
- FEASIBLE_FIELD_NUMBER: int
- FEASIBLE_RELAXED_FIELD_NUMBER: int
- FEASIBLE_UNRELAXED_FIELD_NUMBER: int
- NAMED_FUNCTIONS_FIELD_NUMBER: int
- OBJECTIVES_FIELD_NUMBER: int
- SENSE_FIELD_NUMBER: int
- property constraints: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SampledConstraint]
- property decision_variables: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SampledDecisionVariable]
- property feasible: google.protobuf.internal.containers.ScalarMap[int, bool]
Feasibility for both remaining and removed constraints of each sample.
The meaning of feasible field in SDK changes between Python SDK 1.6.0 to 1.7.0. In Python SDK 1.6.0, feasible represents the feasibility of remaining constraints of each sample, i.e. removed constraints (introduced in 1.6.0) are not considered. After Python SDK 1.7.0, feasible represents the feasibility of all constraints of each sample. The feasibility of 1.6.0 is renamed to feasible_relaxed in 1.7.0.
- property feasible_relaxed: google.protobuf.internal.containers.ScalarMap[int, bool]
Feasibility for remaining (non-removed) constraints of each sample.
- property feasible_unrelaxed: google.protobuf.internal.containers.ScalarMap[int, bool]
[Deprecated] This field has been introduced in Python SDK 1.6.0 to represent the feasibility of all constraints of each sample. The feasible field is used in this sense after Python SDK 1.7.0.
- property named_functions: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SampledNamedFunction]
- property objectives: global___SampledValues
- sense: ommx.v1.instance_pb2.Instance.Sense.ValueType
Minimize or Maximize
- class ommx.v1.sample_set_pb2.SampledConstraint(*, id: int = ..., equality: ommx.v1.constraint_pb2.Equality.ValueType = ..., name: str | None = ..., subscripts: collections.abc.Iterable[int] | None = ..., parameters: collections.abc.Mapping[str, str] | None = ..., description: str | None = ..., removed_reason: str | None = ..., removed_reason_parameters: collections.abc.Mapping[str, str] | None = ..., evaluated_values: global___SampledValues | None = ..., used_decision_variable_ids: collections.abc.Iterable[int] | None = ..., feasible: collections.abc.Mapping[int, bool] | None = ...)
Evaluated constraint for samples
- class FeasibleEntry(*, key: int = ..., value: bool = ...)
- ClearField(field_name: Literal['key', b'key', 'value', b'value']) None
- KEY_FIELD_NUMBER: int
- VALUE_FIELD_NUMBER: int
- key: int
- value: bool
- 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
- class RemovedReasonParametersEntry(*, 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', '_removed_reason', b'_removed_reason', 'description', b'description', 'equality', b'equality', 'evaluated_values', b'evaluated_values', 'feasible', b'feasible', 'id', b'id', 'name', b'name', 'parameters', b'parameters', 'removed_reason', b'removed_reason', 'removed_reason_parameters', b'removed_reason_parameters', 'subscripts', b'subscripts', 'used_decision_variable_ids', b'used_decision_variable_ids']) None
- HasField(field_name: Literal['_description', b'_description', '_name', b'_name', '_removed_reason', b'_removed_reason', 'description', b'description', 'evaluated_values', b'evaluated_values', 'name', b'name', 'removed_reason', b'removed_reason']) bool
- WhichOneof(oneof_group: Literal['_description', b'_description']) Literal['description'] | None
- WhichOneof(oneof_group: Literal['_name', b'_name']) Literal['name'] | None
- WhichOneof(oneof_group: Literal['_removed_reason', b'_removed_reason']) Literal['removed_reason'] | None
- DESCRIPTION_FIELD_NUMBER: int
- EQUALITY_FIELD_NUMBER: int
- EVALUATED_VALUES_FIELD_NUMBER: int
- FEASIBLE_FIELD_NUMBER: int
- ID_FIELD_NUMBER: int
- NAME_FIELD_NUMBER: int
- PARAMETERS_FIELD_NUMBER: int
- REMOVED_REASON_FIELD_NUMBER: int
- REMOVED_REASON_PARAMETERS_FIELD_NUMBER: int
- SUBSCRIPTS_FIELD_NUMBER: int
- USED_DECISION_VARIABLE_IDS_FIELD_NUMBER: int
- description: str
Detail human-readable description of the constraint.
- property evaluated_values: global___SampledValues
Evaluated values of constraint for each sample
- property feasible: google.protobuf.internal.containers.ScalarMap[int, bool]
Feasibility of each sample
- id: int
Constraint ID
- name: str
Name of the constraint.
- property parameters: google.protobuf.internal.containers.ScalarMap[str, str]
Key-value parameters of the constraint.
- removed_reason: str
Short removed reason of the constraint. This field exists only if this message is evaluated from a removed constraint.
- property removed_reason_parameters: google.protobuf.internal.containers.ScalarMap[str, str]
Detailed parameters why the constraint is removed. This field exists only if this message is evaluated from a removed constraint.
- property subscripts: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
Integer parameters of the constraint.
- property used_decision_variable_ids: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
IDs of decision variables used to evaluate this constraint
- class ommx.v1.sample_set_pb2.SampledDecisionVariable(*, decision_variable: ommx.v1.decision_variables_pb2.DecisionVariable | None = ..., samples: global___SampledValues | None = ...)
A pair of decision variable description and its sampled values
- ClearField(field_name: Literal['_samples', b'_samples', 'decision_variable', b'decision_variable', 'samples', b'samples']) None
- HasField(field_name: Literal['_samples', b'_samples', 'decision_variable', b'decision_variable', 'samples', b'samples']) bool
- WhichOneof(oneof_group: Literal['_samples', b'_samples']) Literal['samples'] | None
- DECISION_VARIABLE_FIELD_NUMBER: int
- SAMPLES_FIELD_NUMBER: int
- property decision_variable: ommx.v1.decision_variables_pb2.DecisionVariable
- property samples: global___SampledValues
Sampled values of decision variable. This becomes None if the decision variable is not sampled.
- class ommx.v1.sample_set_pb2.SampledNamedFunction(*, id: int = ..., name: str | None = ..., subscripts: collections.abc.Iterable[int] | None = ..., parameters: collections.abc.Mapping[str, str] | None = ..., description: str | None = ..., evaluated_values: global___SampledValues | None = ..., used_decision_variable_ids: collections.abc.Iterable[int] | None = ...)
Evaluated named function for samples
- 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', 'evaluated_values', b'evaluated_values', 'id', b'id', 'name', b'name', 'parameters', b'parameters', 'subscripts', b'subscripts', 'used_decision_variable_ids', b'used_decision_variable_ids']) None
- HasField(field_name: Literal['_description', b'_description', '_name', b'_name', 'description', b'description', 'evaluated_values', b'evaluated_values', '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
- EVALUATED_VALUES_FIELD_NUMBER: int
- ID_FIELD_NUMBER: int
- NAME_FIELD_NUMBER: int
- PARAMETERS_FIELD_NUMBER: int
- SUBSCRIPTS_FIELD_NUMBER: int
- USED_DECISION_VARIABLE_IDS_FIELD_NUMBER: int
- description: str
Detail human-readable description of the named function.
- property evaluated_values: global___SampledValues
Evaluated values of the named function for each sample
- id: int
Named Function ID
- name: str
Name of the named function.
- property parameters: google.protobuf.internal.containers.ScalarMap[str, str]
Key-value parameters of the named function.
- property subscripts: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
Integer parameters of the named function.
- property used_decision_variable_ids: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
IDs of decision variables used to evaluate this constraint
- class ommx.v1.sample_set_pb2.SampledValues(*, entries: collections.abc.Iterable[global___SampledValues] | None = ...)
A map from sample IDs to sampled values
- class SampledValuesEntry(*, value: float = ..., ids: collections.abc.Iterable[int] | None = ...)
Compressed sampled values, but uncompressed state is also valid. The reader should not assume that every states are distinct.
- ClearField(field_name: Literal['ids', b'ids', 'value', b'value']) None
- IDS_FIELD_NUMBER: int
- VALUE_FIELD_NUMBER: int
- property ids: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
IDs of the sample
- value: float
- ClearField(field_name: Literal['entries', b'entries']) None
- ENTRIES_FIELD_NUMBER: int
- property entries: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SampledValues]
- class ommx.v1.sample_set_pb2.Samples(*, entries: collections.abc.Iterable[global___Samples] | None = ...)
A map from sample ID to state
- class SamplesEntry(*, state: ommx.v1.solution_pb2.State | None = ..., ids: collections.abc.Iterable[int] | None = ...)
Sampling processes are likely to generate same samples multiple times. We compress the same samples into one entry. Note that uncompressed state is also valid. The reader should not assume that every states are distinct.
- ClearField(field_name: Literal['ids', b'ids', 'state', b'state']) None
- HasField(field_name: Literal['state', b'state']) bool
- IDS_FIELD_NUMBER: int
- STATE_FIELD_NUMBER: int
- property ids: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
IDs of the sample
- property state: ommx.v1.solution_pb2.State
State of the sample
- ClearField(field_name: Literal['entries', b'entries']) None
- ENTRIES_FIELD_NUMBER: int
- property entries: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Samples]