macop.callbacks.base

Abstract Checkpoint classes for callback process

Classes

Callback(every, filepath)

Callback abstract class in order to compute some instruction every evaluation

class macop.callbacks.base.Callback(every, filepath)[source]

Callback abstract class in order to compute some instruction every evaluation

algo

{Algorithm} – main algorithm instance reference

every

{int} – checkpoint frequency used (based on number of evaluations)

filepath

{str} – file path where checkpoints will be saved

abstract load()[source]

Load last backup line of solution and set algorithm state at this backup

abstract run()[source]

Check if necessary to do backup based on every variable

setAlgo(algo)[source]

Specify the main algorithm instance reference

Parameters

algo – {Algorithm} – main algorithm instance reference