OptimizeResponse
Object containing the optimization results and all of the metrics returned by the solver.
- titanq.OptimizeResponse.computation_id(self) UUID
The computation id is a Universal unique id that identify this computation inside the TitanQ platform.
Provide this id on any support request to the InfinityQ.
Returns
The computation id of this solve.
- titanq.OptimizeResponse.computation_metrics(self, key: str | None = None) Any
The computation metrics the solver returns
Returns
All computation metrics if no key is given of the specific metrics with the associated key if one is provided.
Raises
- KeyError
The given key does not exist.
- titanq.OptimizeResponse.constraint_violations(self) Tuple[List[int] | None, List[List[int]] | None]
Obtain constraint violations for each engine (
num_engines
). If no constraints were used in the computation, the values will be None.Return
A tuple of two lists - First list indicate the total number of constraint violations for each engine - Second list contains a list of the constraint violation indexes for each engine
- titanq.OptimizeResponse.metrics(self, key: str | None = None) str | Dict[str, Any]
Deprecated since version 0.7.0: Use computation_metrics() or original_input_params() instead.
Returns
All metrics if no key is given. A specific metric with the associated key if one is provided.
Raises
- KeyError
The given key does not exist
- titanq.OptimizeResponse.original_input_params(self, key: str | None = None) Any
The original input params sent to the solver
Returns
All original params if no key is given. A specific param with the associated key if one is provided.
Raises
- KeyError
The given key does not exist
- titanq.OptimizeResponse.result_items(self) List[Tuple[float, ndarray]]
ex. [(-10000, [0, 1, 1, 0]), (-20000, [1, 0, 1, 0]), …]
Returns
List of tuples containing the solutions objective value and its corresponding result vector