panobbgo.core.StrategyBase#
- class panobbgo.core.StrategyBase(problem, parse_args=False, testing_mode=False, **kwargs)[source]#
This abstract BaseStrategy is the parent class of all Strategies.
Use it this way:
Subclass it, write your optional initializer, afterwards call the initializer of this class (it will start its the main loop).
Overwrite the
execute(), which returns a list of new search points (by requesting them from theheuristicsvia theget_points()method) and might also emitEvents.
This
executemethod will be called repeatedly as long as there are less than the given maximum number of search points evaluated.@type problem: panobbgo.lib.Problem @param problem: @param parse_args: @param testing_mode: @param kwargs: Additional configuration parameters (e.g. max_eval, max_evaluations)
- __init__(problem, parse_args=False, testing_mode=False, **kwargs)[source]#
@type problem: panobbgo.lib.Problem @param problem: @param parse_args: @param testing_mode: @param kwargs: Additional configuration parameters (e.g. max_eval, max_evaluations)
Methods
__init__(problem[, parse_args, testing_mode])@type problem: panobbgo.lib.Problem @param problem: @param parse_args: @param testing_mode: @param kwargs: Additional configuration parameters (e.g. max_eval, max_evaluations).
add(Heur, **kwargs)add_analyzer(a)Add an analyzer to the strategy.
Add a heuristic to the strategy.
analyzer(who)This method is called in self.start() (and only there) for checking all the dependencies of all modules.
execute()Overwrite this method when you extend this base strategy.
heuristic(who)Look up a heuristic by its who tag.
info()init_module(module)StrategyBasecalls this method.on_converged(reason, stats)Called when the Convergence analyzer detects convergence.
start()Validate that the framework is properly set up before starting optimization.
Attributes
average walltime per finished task,
NaNbefore the first one.Compatibility property for legacy code that references evaluators.
effective cpu time in seconds
wall time in seconds