Skip to content
Snippets Groups Projects
Select Git revision
  • f4b189f62f41d7e0c139d24975d1bbc52d616606
  • master default protected
  • beta
  • dev
  • andrewssobral-patch-1
  • update
  • thomas-fork
  • 2.0
  • v3.2.0
  • v3.1.0
  • v3.0
  • bgslib_py27_ocv3_win64
  • bgslib_java_2.0.0
  • bgslib_console_2.0.0
  • bgslib_matlab_win64_2.0.0
  • bgslib_qtgui_2.0.0
  • 2.0.0
  • bgs_console_2.0.0
  • bgs_matlab_win64_2.0.0
  • bgs_qtgui_2.0.0
  • v1.9.2_x86_mfc_gui
  • v1.9.2_x64_java_gui
  • v1.9.2_x86_java_gui
23 results

bgslibrary_vs2010_mfc.rc

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    skylark.jl 1.12 KiB
    ### Persefone - a socio-economic-ecological model of European agricultural landscapes.
    ###
    ### This file holds the code for the Eurasian Skylark (Alauda arvensis).
    ###
    
    """
        Skylark
    
    *Alauda arvensis* is a common and charismatic species of agricultural landscapes.
    At the moment, this implementation is still in development.
    """
    @species Skylark begin
    
        popsize = Int(round(1/10000*reduce(*, size(model.landscape))))
        lifeexpectancy = 365*5
    
        eggharvestmortality = 0.9
        eggpredationmortality = 0.1
        
        initialise! = initrandompopulation(popsize)
    
        habitats = @habitat((@landcover() == grass || 
                             (@landcover() == agriculture && @croptype() != maize &&
                              @cropheight() < 10)) &&
                            @distanceto(forest) > 20)
        
        @phase egg begin
            @kill(@trait(eggpredationmortality), "predation")
    
            #TODO dies if parents die
            
            @respond harvest @kill(@trait(eggharvestmortality), "harvest")
    
            if @trait(age) == 14
                @setphase(nestling)
            end
        end
    
        @phase nestling begin
            #TODO
        end
    
        #TODO
    end