Outputs information about the search duration and the best-found solution.
(self, result: Result)
| 127 | logger.info(line) |
| 128 | |
| 129 | def end(self, result: Result): |
| 130 | """ |
| 131 | Outputs information about the search duration and the best-found |
| 132 | solution. |
| 133 | """ |
| 134 | if self._print: |
| 135 | msg = _END.format( |
| 136 | iters=result.num_iterations, |
| 137 | runtime=result.runtime, |
| 138 | best_cost=result.cost(), |
| 139 | summary=result.summary(), |
| 140 | ) |
| 141 | |
| 142 | for line in msg.splitlines(): |
| 143 | logger.info(line) |
| 144 | |
| 145 | def restart(self): |
| 146 | """ |