ResultΒΆ
- class ResultΒΆ
Container of optimization solutions and conversion/runtime metadata.
Methods
Attributes
Best solution in the result set.
Solver/client result.
Graph embedding information.
The time the solver used to solve the problem.
Whether to filter out infeasible solutions.
Model conversion information.
Number of solve executions aggregated.
The time between sending the request and receiving the response from the solver.
View of all solutions.
Split view for each independent solve.
Total time including conversion and solve.
- class GraphConversionΒΆ
Graph embedding conversion details used during solving.
- class ChainBreakFractionsΒΆ
List-like view of chain break fractions.
- __getitem__(self, key: int) floatΒΆ
Return the element at the index.
A negative index counts from the end, as in a Python list.
- Parameters:
key (int) β The index of the element.
- Return type:
- Raises:
IndexError β The index is out of range.
- __init__(*args, **kwargs)ΒΆ
- __init__(*args, **kwargs)ΒΆ
- property chain_break_fractionsΒΆ
Chain break fraction for each solve.
- Return type:
- property chainsΒΆ
Embedding chains for each logical variable.
- property src_graphΒΆ
Source (input polynomial) graph for embedding.
- property values_listΒΆ
Physical variable assignments for each solve.
- Return type:
- class ModelConversionΒΆ
Model conversion details used during solving.
- class IntermediateMappingΒΆ
Mapping between original and intermediate variables during model conversion.
- class ItemsViewΒΆ
View of key-value pairs in
IntermediateMapping.- __init__(*args, **kwargs)ΒΆ
- class KeysViewΒΆ
View of keys in
IntermediateMapping.- __contains__(self, arg: Poly, /) boolΒΆ
- __contains__(self, arg: object, /) bool
__contains__
Overload 1.
- Args:
arg (amplify.Poly)
- Returns:
bool:
Overload 2.
- Args:
arg (object)
- Returns:
bool:
- __init__(*args, **kwargs)ΒΆ
- class ValuesViewΒΆ
View of values in
IntermediateMapping.- __init__(*args, **kwargs)ΒΆ
- __iter__(self) ValuesViewΒΆ
- Return type:
- __contains__(self, arg: Poly, /) boolΒΆ
- __contains__(self, arg: object, /) bool
__contains__
Overload 1.
- Args:
arg (amplify.Poly)
- Returns:
bool:
Overload 2.
- Args:
arg (object)
- Returns:
bool:
- __init__(*args, **kwargs)ΒΆ
- values(self) ValuesViewΒΆ
- Return type:
- __init__(*args, **kwargs)ΒΆ
- property mappingΒΆ
Mapping from input variables to intermediate expressions.
- Return type:
- property values_listΒΆ
Intermediate variable assignments for each solve.
- Return type:
- class SolutionListΒΆ
List-like view of solutions.
- __getitem__(self, key: int) SolutionΒΆ
Return the element at the index.
A negative index counts from the end, as in a Python list.
- Parameters:
key (int) β The index of the element.
- Return type:
- Raises:
IndexError β The index is out of range.
- __init__(*args, **kwargs)ΒΆ
- class SplitViewΒΆ
List-of-list-like view of solutions that splits solutions by independent solves.
- __getitem__(self, key: int) ResultΒΆ
Return the element at the index.
A negative index counts from the end, as in a Python list.
- Parameters:
key (int) β The index of the element.
- Return type:
- Raises:
IndexError β The index is out of range.
- __init__(*args, **kwargs)ΒΆ
- class ValuesListΒΆ
List-like view of value mappings for solutions.
- __getitem__(self, key: int) ValuesΒΆ
Return the element at the index.
A negative index counts from the end, as in a Python list.
- Parameters:
key (int) β The index of the element.
- Return type:
- Raises:
IndexError β The index is out of range.
- __init__(*args, **kwargs)ΒΆ
- __getitem__(self, key: int) SolutionΒΆ
Return the element at the index.
A negative index counts from the end, as in a Python list.
- Parameters:
key (int) β The index of the element.
- Return type:
- Raises:
IndexError β The index is out of range.
- __init__(*args, **kwargs)ΒΆ
- __nb_signature__ = 'class Result(typing.Generic[_BaseClient_co])'ΒΆ
- property bestΒΆ
Best solution in the result set.
The best solution is the feasible solution with the smallest objective value. When
filter_solutionisTrue, the result holds only the feasible solutions, so this property raises as soon as the result is empty.- Returns:
The solution that has the smallest objective value among the feasible solutions.
- Return type:
- Raises:
RuntimeError β The result holds no solution, or it holds no feasible solution.
- property client_resultΒΆ
Solver/client result.
The raw response of the machine. Its type depends on the client that solved the model. It is
Nonewhen the solve kept no client result, as after a conversion only run.
- property embeddingΒΆ
Graph embedding information.
- Return type:
GraphConversion | None
- property intermediateΒΆ
Model conversion information.
- Return type:
- property response_timeΒΆ
The time between sending the request and receiving the response from the solver.
- Return type:
- property solutionsΒΆ
View of all solutions.
- Return type: