Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
Public Member Functions | List of all members
Evolife.Scenarii.CustomScenario.Observer Class Reference

Observer stores display instructions and makes statistics See Evolife/Apps/GraphicExample.py for examples. More...

Inheritance diagram for Evolife.Scenarii.CustomScenario.Observer:
Inheritance graph
[legend]
Collaboration diagram for Evolife.Scenarii.CustomScenario.Observer:
Collaboration graph
[legend]

Public Member Functions

def Field_grid (self)
 initial draw: here a blue line More...
 
- Public Member Functions inherited from Evolife.Ecology.Observer.EvolifeObserver
def __init__ (self, Scenario)
 calls Experiment_Observer constructor if Scenario is not None, Generic_Observer otherwise calls Meta_Examiner constructor More...
 
def GetPlotOrders (self)
 Gets the curves to be displayed from the scenario and returns intantaneous values to be displayed on these curves. More...
 
def get_info (self, Slot, default=None)
 returns factual information previously stored in Slot More...
 
def TextDisplay (self, Str="")
 stores a string that will be displayed at appropriate time More...
 
def Field_grid (self)
 returns initial drawing for 'Field' More...
 
def Trajectory_grid (self)
 returns initial drawing for 'Trajectories' More...
 
- Public Member Functions inherited from Evolife.Ecology.Observer.Observer
def __init__ (self, Scenario=None)
 calls Experiment_Observer constructor if Scenario is not None, Generic_Observer otherwise calls Meta_Examiner constructor More...
 
def get_data (self, Slot, Consumption=True)
 Retrieves data stored in Slot from Experiment_Observer (or, if None, from Meta_Examiner) More...
 
- Public Member Functions inherited from Evolife.Ecology.Observer.Meta_Examiner
def __init__ (self, Name='')
 Defines a storage that will contain various examiners (which are dicts of storages) All examiners are supposed to have the same slots (low-level storages) More...
 
def statistics (self)
 gathers data from the stored examiners and stores them as a dictionary of tuples (a tuple per slot) (number_of_instances, best_of_each_coordinate, average_of_each_coordinate, list_of_instances) More...
 
def get_data (self, Slot)
 Performs statistics on storage 'Slot'. More...
 
- Public Member Functions inherited from Evolife.Ecology.Observer.Storage
def __init__ (self, Name)
 calls reset More...
 
def reset (self, length=-1)
 initializes the 'storage', 'average' and 'best' lists More...
 
def open_ (self, length=-1)
 marks the storage as 'open' More...
 
def store (self, vector)
 stores a vecor in the storage More...
 
def statistics (self)
 to be overloaded More...
 
def close_ (self)
 sets the storage as 'closed' More...
 
def get_data (self)
 returns a tuple of all the vectors in the storage More...
 
- Public Member Functions inherited from Evolife.Ecology.Observer.Experiment_Observer
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...
 

Additional Inherited Members

- Public Attributes inherited from Evolife.Ecology.Observer.Observer
 Scenario
 
- Public Attributes inherited from Evolife.Ecology.Observer.Meta_Examiner
 Statistics
 
- Public Attributes inherited from Evolife.Ecology.Observer.Storage
 Name
 
 open
 
 storage
 
 average
 
 best
 
 length
 
 itemLength
 
- Public Attributes inherited from Evolife.Ecology.Observer.Experiment_Observer
 ParamSet
 
 Parameter
 
 DispPeriod
 
 TimeLimit
 
 BatchMode
 
- Public Attributes inherited from Evolife.Ecology.Observer.Generic_Observer
 TimeLimit
 
 DispPeriod
 
 StepId
 
 PreviousStep
 
 Infos
 
 Curves
 
 Field_buffer
 
 Trajectory_buffer
 

Detailed Description

Observer stores display instructions and makes statistics See Evolife/Apps/GraphicExample.py for examples.

Definition at line 50 of file CustomScenario.py.

Member Function Documentation

◆ Field_grid()

def Evolife.Scenarii.CustomScenario.Observer.Field_grid (   self)

initial draw: here a blue line

Reimplemented from Evolife.Ecology.Observer.EvolifeObserver.

Definition at line 54 of file CustomScenario.py.


The documentation for this class was generated from the following file: