metaheuristic_designer.reporter module#

Module defining the abstract reporter interface for algorithm progress output.

class Reporter[source]#

Bases: ABC

Abstract interface for progress reporters.

A reporter is notified at three key moments of an optimization run: initialization, after each generation, and at completion. Implementations can display progress bars, log messages, update dashboards, etc.

Methods

log_end(algorithm)

Called once, after the optimization loop finishes.

log_init(algorithm)

Called once, before the main optimization loop starts.

log_step(algorithm)

Called after each generation.

abstract log_init(algorithm)[source]#

Called once, before the main optimization loop starts.

Parameters:
algorithmAlgorithm

The algorithm that is about to run.

Parameters:

algorithm (Algorithm)

abstract log_step(algorithm)[source]#

Called after each generation.

Parameters:
algorithmAlgorithm

The running algorithm, with up-to-date population, iteration count, and best solution.

Parameters:

algorithm (Algorithm)

abstract log_end(algorithm)[source]#

Called once, after the optimization loop finishes.

Parameters:
algorithmAlgorithm

The algorithm that has just finished.

Parameters:

algorithm (Algorithm)