Ladybird_team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Ladybird MIDox Documentation {#Ladybird_page} ========= ## Introduction ## This document will follow the Model Implementation Documentation with Doxygen (MIDox) format (Topping et al., 2023), the next step in designing, documenting and calibrating complicated models after the “Formal Model” format document (Topping et al., 2022).<br> Here we describe the implementation of the Ladybird formal model \cite chuhutin_seven-spotted_2023 (Chuhutin et al., 2023). The currently documented implementation has been calibrated (ref, Calibration paper) using pattern-based calibration (ref?) that was set up to replicate the basic ecological patterns of the ladybird population. In particular the phenological curves were used to fit the parameters of development, reproduction and mortality, the spatial distribution patterns, mean walking time and average movement speed measured in in field were used to fit the movement parameters. Information about the distribution and popularity of hibernaculae at different points in time was used to fit the parameters concerning the diapause and its timing.<br> This model was created within the ALMaSS (Animal Landscape and Man Simulation System) framework (Topping, 2022; Topping et al., 2003) and therefore by design has the ability to connect with the other animal models that share the same framework (aphids as a food source, other polyphagous insect predators as potential competitors).<br> Designed in C++ using an object-oriented paradigm this model is made generic and easily expandable on purpose. If new behaviours of the ladybirds or new interconnection between the agents and the overall model will be discovered (e.g. in previously not modeled habitats) they could easily be introduced as a part of the model.<br> The division of the code into classes and methods was based on the overall model functionality and does not necessarily have a biological meaning. Thus, we combined the pre-pupa stage of development with the pupa stage since (due to its immobility) it shares the same basic behaviours. On the same note, the method that performs a long range movement is shared independently of the movement purpose (whether it is search for food, dispersion or aggregation).<br> ## Aims and Purposes ## The purpose of this document is to both document the model source code, for readability and future maintenance, but also to record the desicions made when the formal model in its general algorithmic form (Chuhutin et al., 2023) was translated into a source code.<br> The seven-spot ladybird has complicated behaviours (Hodek et al., 2012) that are intricately connected to the landscape parameters. In an effort to build an agent-based model one can only choose some of them for implementation. The behaviours that were chosen to be implemented in detail in our model are those that either: - According to our experts provide an important driver of ladybirds abundance or survival on the population level. (E.g. the cannibalism among the early developmental stages, the local dynamics at each cell, and the cannibalism of more developed stages on the less developed stages) - Are an integral part of an essential processes that are well sampled and documented in literature and therefore provide a tool for the calibration of the model as a whole. (E.g. tracking the abundance of the ladybird in hibernaculae and the spread of the hibernating ladybirds in various landscape types are closely related to the distribution and mortality and are documented in literature (Bianchi & Van der Werf, 2003; Honěk et al., 2007)). The purpose of this model is to be used for complex scenarios landscape-based risk assessment together with a set of underlying prey models. However, it could be used as a standalone model (in the ALMaSS environment), provided the phenology of the aphids, and therefore implementing only one-directional dependence between the predator and the prey. ## Model in Brief ## The model aims to represent a population of ladybirds on a spatially-restricted landscape. While the model is running, agents (that represent various stages of ladybird development) are laid as eggs, develop, forage, move, reproduce, overwinter and die. During each one of these activities the agents interact with the landscape (through temporally dynamic weather, crop rotations, farming events and vegetation growth models), the other species (the prey they are feeding on) and each other (cannibalism and collective hibernation).<br> The life-cycle of ladybird includes four main stages: eggs, larvae, pupae and adults (females), while each one of them is implemented using a specific class (Ladybird_Eggs, Ladybird_Larvae, Ladybird_Pupae and Ladybird_Adult, see Figure 1). The larva stage is composed of four instars, all of which utilize the same class Ladybird_Larvae. Our model is only implementing adult females, while adult males are ignored (the reasoning for that decision is provided by Chuhutin et al (2023)).<br> In addition to classes that represent various developmental stages three supplementary classes exist. The class Ladybird_Base includes the methods and variables which are used by more than one developmental stage (e.g. method Ladybird_Base::Cannibalise() is used both by Ladybird_Larvae and Ladybird_Adult). The class Ladybird_Population_Manager is a class that includes variables and implements methods that are utilised on the level of the ladybird population (e.g. Ladybird_Population_Manager::getMaxHopDistance() that returns maximum hop distance for a ladybird adult, which is the same for all the individuals on each day and is a function of mean daily temperature). The class LadybirdConstantClass includes all the constant variables that are defined in the start of the simulation, its instance is included as a member variable in Ladybird_Population_Manager and used by the rest of the ladybird classes.<br> Two important additional data structures were created inside Ladybird_Population_Manager for implementation purposes. Ladybird_Population_Manager::m_LadybirdDensityMap is a three-dimensional array(\ref hibernation "1") implemented using [Blitz++ library](https://github.com/blitzpp/blitz) that keeps track of the ladybirds of different developmental stages in the landscape. Each time, when the agent moves, dies or is created, the map is updated. The variable type used in the array defines the maximum number of objects of each type so that if we use unsigned char the maximum number of objects is \f[ N_\mathrm{max}=255\cdot \mathrm{Landscape\_size}_x \cdot \mathrm{Landscape\_size}_y \f] which for landscape of 10x10 km equals \f$255\cdot10^8\f$. In pracise the number is much lower, since not all parts of the landscape is used by the agents (e.g. ladybirds avoid locations occupied by water or urban areas). Ladybird_Population_Manager::m_LadybirdCannibalismMap is also a three-dimensional array which is updated at each cannibalism event and is used to remove the individuals, which have been eaten from the simulation. In the \ref implementation "next chapter" we will provide a detailed account on the implementation of each one of the main behaviours, describing the data types and algorithms employed.<br> <br> \image html LadybirdFig1.png "Figure 1. Overview of ladybird classes. The inheritance is denoted with an arrow directed from the inherited towards a base class." width=50% <br> ## Implementation details ## {#implementation} ### Oviposition ### fdfdfd fdfdfd fdfd ## Scheduling ## ## Interconnections ## ## Inputs ## ## Outputs ## ## State variables ## ## Scales ## ## Model parameters ## ## Details ## ## Discussion of implementation ## ## References # \cite chuhutin_seven-spotted_2023 Andrey Chuhutin, Danuta Frydyszczak, Elżbieta Ziółkowska, and Christopher J. Topping. Seven-spotted ladybird Formal Model. <em>In submission to Food and Ecological Systems Modelling Journal</em> <br> \anchor hibernation 1. Hibernating ladybirds have a dedicated row in Ladybird_Population_Manager::m_LadybirdDensityMap despite not being implemented as a separate class.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully