Evolife documentation

     summary     

    

******************************************************************************************
Module Evolife.Ecology.Population:        
=================================
EVOLIFE: Module Population:
        A population is a set of semi-permeable groups
******************************************************************************************


    **************************************************************************************
    Class Population:        
    ================
    class Population: list of Groups
        Minimal version
    **************************************************************************************

        ----------------------------------------------------------------------------------
        Method Population.__init__:        
        ==========================
        Creation of the groups - calls createGroup
        ----------------------------------------------------------------------------------
        Arguments:
            . Scenario
            . Observer


        ----------------------------------------------------------------------------------
        Method Population.createGroup:        
        =============================
        Calls class ‘Group’
        ----------------------------------------------------------------------------------
        Arguments:
            . ID
            . Size


        ----------------------------------------------------------------------------------
        Method Population.selectIndividual:        
        ==================================
        random selection of an individual in the population
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Population.lottery:        
        =========================
        random selection of an individual by number in the population
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Population.season:        
        ========================
        increments ‘year’ and calls Oberver’s season and groups’ season
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Population.migration:        
        ===========================
        migration between groups of some percentage of individuals
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Population.group_splitting:        
        =================================
        groups that are too big are split in two,
            and groups that are too small are dispersed
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Population.limit:        
        =======================
        randomly kills individuals until size is reached
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Population.update:        
        ========================
        updates groups and looks for empty groups
        ----------------------------------------------------------------------------------
        Arguments:
            . flagRanking
            . display


        ----------------------------------------------------------------------------------
        Method Population.statistics:        
        ============================
        Updates statistics about the population
        ----------------------------------------------------------------------------------
        Arguments:
            . Complete
            . Display


        ----------------------------------------------------------------------------------
        Method Population.one_year:        
        ==========================
        One year of life.
            Calls ‘limit’, ‘migration’, ‘group_splitting’, ‘season’, ‘statistics’
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Population.members:        
        =========================
        iterates over all individuals in the population
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Population.display:        
        =========================
        calling ‘display’ for all individuals in the population
        ----------------------------------------------------------------------------------


    **************************************************************************************
    Class EvolifePopulation:        inherits from Evolife.Ecology.Population.Population
    =======================
    Population + reproduction + call to Scenario life_game
    **************************************************************************************

        ----------------------------------------------------------------------------------
        Method EvolifePopulation.__init__:        
        =================================
        Creation of groups
        ----------------------------------------------------------------------------------
        Arguments:
            . Scenario
            . Evolife_Obs


        ----------------------------------------------------------------------------------
        Method EvolifePopulation.createGroup:        
        ====================================
        This version of ‘createGroup’ calls the ‘EvolifeGroup’ class instead of the ‘Group’ class
        ----------------------------------------------------------------------------------
        Arguments:
            . ID
            . Size


        ----------------------------------------------------------------------------------
        Method EvolifePopulation.reproduction:        
        =====================================
        launches reproduction in groups
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method EvolifePopulation.life_game:        
        ==================================
        Calls local ‘life_game’ in groups
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method EvolifePopulation.one_year:        
        =================================
        Population’s ‘one_year’ + calls to ‘reproduction’ and ‘life_game’
        ----------------------------------------------------------------------------------


    

    

    Back to Evolife