ommx.adapter
Attributes
Exceptions
Raised when the problem is proven to be infeasible. |
|
Raised when no solution was returned. |
|
Raised when the problem is proven to be unbounded. |
Classes
An abstract interface for OMMX Sampler Adapters, defining how samplers should be used with OMMX. |
|
An abstract interface for OMMX Solver Adapters, defining how solvers should be used with OMMX. |
Module Contents
- exception ommx.adapter.InfeasibleDetected
Raised when the problem is proven to be infeasible.
This corresponds to
Optimality.OPTIMALITY_INFEASIBLEand indicates that the mathematical model itself has no feasible solution. Should not be used when infeasibility cannot be proven (e.g., heuristic solvers).
- exception ommx.adapter.NoSolutionReturned
Raised when no solution was returned.
This indicates that the solver did not return any solution (whether feasible or not) (e.g., due to time limits). This does not prove that the mathematical model itself is infeasible.
- exception ommx.adapter.UnboundedDetected
Raised when the problem is proven to be unbounded.
This corresponds to
Optimality.OPTIMALITY_UNBOUNDEDand indicates that the mathematical model itself is unbounded. Should not be used when unboundedness cannot be proven (e.g., heuristic solvers).
- class ommx.adapter.SamplerAdapter(ommx_instance: ommx.v1.Instance)
An abstract interface for OMMX Sampler Adapters, defining how samplers should be used with OMMX.
See the implementation guide for more details.
- abstract decode(data: SolverOutput) ommx.v1.Solution
- abstract decode_to_sampleset(data: SamplerOutput) ommx.v1.SampleSet
- classmethod sample(ommx_instance: ommx.v1.Instance) ommx.v1.SampleSet
- Abstractmethod:
- classmethod solve(ommx_instance: ommx.v1.Instance) ommx.v1.Solution
- Abstractmethod:
- property sampler_input: SamplerInput
- Abstractmethod:
- property solver_input: SolverInput
- Abstractmethod:
- class ommx.adapter.SolverAdapter(ommx_instance: ommx.v1.Instance)
An abstract interface for OMMX Solver Adapters, defining how solvers should be used with OMMX.
See the implementation guide for more details.
- abstract decode(data: SolverOutput) ommx.v1.Solution
- classmethod solve(ommx_instance: ommx.v1.Instance) ommx.v1.Solution
- Abstractmethod:
- property solver_input: SolverInput
- Abstractmethod:
- ommx.adapter.SamplerInput
- ommx.adapter.SamplerOutput
- ommx.adapter.SolverInput
- ommx.adapter.SolverOutput