Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
Public Member Functions | Public Attributes | List of all members
Evolife.Social.SocialSimulation.Social_Population Class Reference

defines a population of interacting agents More...

Public Member Functions

def __init__ (self, parameters, NbAgents, Observer, IndividualClass=None, features={})
 creates a population of social individuals More...
 
def positions (self)
 returns the list of agents' locations More...
 
def neighbours (self, Agent)
 Returns agents of neighbouring qualitied. More...
 
def SignalAvg (self)
 average signal in the population More...
 
def FeatureAvg (self, Feature)
 average value of Feature's value More...
 
def FriendDistance (self)
 average distance between friends More...
 
def display (self)
 Updates agents positions and social links for display. More...
 
def season_initialization (self)
 tells agents to reinitialize each year More...
 
def interactions (self, group=None, NbInteractions=None)
 interactions occur within a group More...
 
def learning (self)
 called at each 'run', several times per year More...
 
def One_Run (self)
 This procedure is repeatedly called by the simulation thread. More...
 
def __len__ (self)
 

Public Attributes

 Features
 
 Pop
 
 PopSize
 
 Obs
 
 Param
 
 NbGroup
 

Detailed Description

defines a population of interacting agents

Definition at line 150 of file SocialSimulation.py.

Constructor & Destructor Documentation

◆ __init__()

def Evolife.Social.SocialSimulation.Social_Population.__init__ (   self,
  parameters,
  NbAgents,
  Observer,
  IndividualClass = None,
  features = {} 
)

creates a population of social individuals

Definition at line 153 of file SocialSimulation.py.

Member Function Documentation

◆ __len__()

def Evolife.Social.SocialSimulation.Social_Population.__len__ (   self)

Definition at line 280 of file SocialSimulation.py.

◆ display()

def Evolife.Social.SocialSimulation.Social_Population.display (   self)

Updates agents positions and social links for display.

Updates average feature values for curves

Definition at line 203 of file SocialSimulation.py.

◆ FeatureAvg()

def Evolife.Social.SocialSimulation.Social_Population.FeatureAvg (   self,
  Feature 
)

average value of Feature's value

Definition at line 185 of file SocialSimulation.py.

◆ FriendDistance()

def Evolife.Social.SocialSimulation.Social_Population.FriendDistance (   self)

average distance between friends

Definition at line 193 of file SocialSimulation.py.

◆ interactions()

def Evolife.Social.SocialSimulation.Social_Population.interactions (   self,
  group = None,
  NbInteractions = None 
)

interactions occur within a group

Definition at line 226 of file SocialSimulation.py.

◆ learning()

def Evolife.Social.SocialSimulation.Social_Population.learning (   self)

called at each 'run', several times per year

Definition at line 235 of file SocialSimulation.py.

◆ neighbours()

def Evolife.Social.SocialSimulation.Social_Population.neighbours (   self,
  Agent 
)

Returns agents of neighbouring qualitied.

Definition at line 170 of file SocialSimulation.py.

◆ One_Run()

def Evolife.Social.SocialSimulation.Social_Population.One_Run (   self)

This procedure is repeatedly called by the simulation thread.

It increments the year through season(). Then for each run (there are NbRunPerYear runs each year), interactions take place within groups

Definition at line 248 of file SocialSimulation.py.

◆ positions()

def Evolife.Social.SocialSimulation.Social_Population.positions (   self)

returns the list of agents' locations

Definition at line 165 of file SocialSimulation.py.

◆ season_initialization()

def Evolife.Social.SocialSimulation.Social_Population.season_initialization (   self)

tells agents to reinitialize each year

Definition at line 221 of file SocialSimulation.py.

◆ SignalAvg()

def Evolife.Social.SocialSimulation.Social_Population.SignalAvg (   self)

average signal in the population

Definition at line 177 of file SocialSimulation.py.

Member Data Documentation

◆ Features

Evolife.Social.SocialSimulation.Social_Population.Features

Definition at line 157 of file SocialSimulation.py.

◆ NbGroup

Evolife.Social.SocialSimulation.Social_Population.NbGroup

Definition at line 163 of file SocialSimulation.py.

◆ Obs

Evolife.Social.SocialSimulation.Social_Population.Obs

Definition at line 161 of file SocialSimulation.py.

◆ Param

Evolife.Social.SocialSimulation.Social_Population.Param

Definition at line 162 of file SocialSimulation.py.

◆ Pop

Evolife.Social.SocialSimulation.Social_Population.Pop

Definition at line 158 of file SocialSimulation.py.

◆ PopSize

Evolife.Social.SocialSimulation.Social_Population.PopSize

Definition at line 160 of file SocialSimulation.py.


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