Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
|
Typical observer for an experiment with parameters. More...
Public Member Functions | |
def | __init__ (self, ParameterSet) |
Initializes ScenarioName, EvolifeMainDir, CurveNames, Title, Field_grid and Trajectory_grid Sets DisplayPeriod, TimeLimit, Icon, ... from values taken from ParameterSet ExperienceID is set to current date Sets ResultFile (appends ExperienceID in batch mode) More... | |
def | ResultHeader (self) |
Relevant parameter names are stored into the result file header, juste after the string "Date" Parameter values are added just below the header. More... | |
def | get_info (self, Slot, default=None) |
returns factual information previously stored in Slot. More... | |
Public Member Functions inherited from Evolife.Ecology.Observer.Generic_Observer | |
def | __init__ (self, ObsName='', TimeLimit=10000) |
initializes ScenarioName, EvolifeMainDir, CurveNames, Title, Field_grid and Trajectory_grid More... | |
def | DisplayPeriod (self, Per=0) |
sets or retrieves display period More... | |
def | season (self, year=None) |
increments StepId More... | |
def | Visible (self) |
decides whether the situation should be displayed More... | |
def | Over (self) |
Checks whether time limit has been reached and has not been manually bypassed. More... | |
def | setOutputDir (self, ResultDir='___Results') |
set output directory ('___Results' by default) More... | |
def | recordInfo (self, Slot, Value) |
stores Value in Slot More... | |
def | get_info (self, Slot, default=None, erase=False) |
returns factual information previously stored in Slot returns 'default' (which is None by default) if Slot is not found More... | |
def | inform (self, Info) |
Info is sent by the simulation - Typically a single char, corresponding to a key pressed Useful to customize action. More... | |
def | ResultHeader (self) |
Parameter names are stored with the date in the result file header Header is just the string "Date" by default. More... | |
def | record (self, Position, Window='Field', Reset=False) |
stores current position changes into the Window's buffer ('Field' by default, could be 'Trajectories') 'Position' can also be the string "erase" More... | |
def | Field_grid (self) |
returns initial drawing for 'Field' More... | |
def | Trajectory_grid (self) |
returns initial drawing for 'Trajectories' More... | |
def | get_data (self, Slot, Consumption=True) |
Retrieves data from Slot. More... | |
def | displayed (self) |
Remembers that display occurred (to ensure that it answers once a year) More... | |
def | TextErase (self) |
Erases the text buffer. More... | |
def | TextDisplay (self, Str="") |
stores a string that will be displayed at appropriate time. More... | |
def | curve (self, Name=None, Value=None, Color=None, Legend=None) |
creates or retrieves a curve or return curve's current value. More... | |
def | legend (self) |
returns curves' legends More... | |
def | CurveNames (self) |
returns curves' names More... | |
def | GetPlotOrders (self) |
Returns current curves' values if observer in visible state. More... | |
Public Attributes | |
ParamSet | |
Parameter | |
DispPeriod | |
TimeLimit | |
BatchMode | |
Public Attributes inherited from Evolife.Ecology.Observer.Generic_Observer | |
TimeLimit | |
DispPeriod | |
StepId | |
PreviousStep | |
Infos | |
Curves | |
Field_buffer | |
Trajectory_buffer | |
Typical observer for an experiment with parameters.
Definition at line 520 of file Observer.py.
def Evolife.Ecology.Observer.Experiment_Observer.__init__ | ( | self, | |
ParameterSet | |||
) |
Initializes ScenarioName, EvolifeMainDir, CurveNames, Title, Field_grid and Trajectory_grid Sets DisplayPeriod, TimeLimit, Icon, ... from values taken from ParameterSet ExperienceID is set to current date Sets ResultFile (appends ExperienceID in batch mode)
Reimplemented from Evolife.Ecology.Observer.Generic_Observer.
Reimplemented in Evolife.Ecology.Observer.EvolifeObserver, and Evolife.Ecology.Observer.Observer.
Definition at line 524 of file Observer.py.
def Evolife.Ecology.Observer.Experiment_Observer.get_info | ( | self, | |
Slot, | |||
default = None |
|||
) |
returns factual information previously stored in Slot.
default value is None by default
Reimplemented from Evolife.Ecology.Observer.Generic_Observer.
Reimplemented in Evolife.Ecology.Observer.EvolifeObserver.
Definition at line 564 of file Observer.py.
def Evolife.Ecology.Observer.Experiment_Observer.ResultHeader | ( | self | ) |
Relevant parameter names are stored into the result file header, juste after the string "Date" Parameter values are added just below the header.
Reimplemented from Evolife.Ecology.Observer.Generic_Observer.
Definition at line 552 of file Observer.py.
Evolife.Ecology.Observer.Experiment_Observer.BatchMode |
Definition at line 543 of file Observer.py.
Evolife.Ecology.Observer.Experiment_Observer.DispPeriod |
Definition at line 535 of file Observer.py.
Evolife.Ecology.Observer.Experiment_Observer.Parameter |
Definition at line 531 of file Observer.py.
Evolife.Ecology.Observer.Experiment_Observer.ParamSet |
Definition at line 530 of file Observer.py.
Evolife.Ecology.Observer.Experiment_Observer.TimeLimit |
Definition at line 536 of file Observer.py.