starling_sim.basemodel.algorithms.algorithm
Module Contents
Classes
This class describes a generic structure for the algorithms of the simulation |
- class starling_sim.basemodel.algorithms.algorithm.Algorithm(simulation_model=None, operator=None, verb=False)
This class describes a generic structure for the algorithms of the simulation
- NAME = 'unnamed algorithm'
- run()
Core method of the Algorithm class, called to run the algorithm.
This method must be implemented for all algorithms.
Algorithm inputs are accessed in the class attributes.
- Returns:
None, the algorithm result is stored in self.result
- log_message(message, lvl=ALGO_LEVEL)
Logs the message in the logger using the class data
- Parameters:
message – message displayed in log
lvl – level value, default is ALGO_LEVEL
- __str__()
Give a string display to the algorithm.
- Returns:
string with algorithm information