Bee Pollination on Lavender Flowers

Bee Pollination on Lavender Flowers preview image

This model is seeking new collaborators — would you please help?

1 collaborator

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.4.0 • Viewed 12 times • Downloaded 0 times • Run 0 times
Download the 'Bee Pollination on Lavender Flowers' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Info tab cannot be displayed because of an encoding error

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals[
  hive-x hive-y
  flower-color-male flower-color-male-nectar
  flower-color-female flower-color-female-nectar
  ground-color
  energy-reduction-factor
  nectar-regeneration-freq
  bloom-factor
  spawn-factor
  hive-nectar
  bee-max-nectar
]
turtles-own[
  energy pollen-carried?
  nectar-carried
  curr-step curr-heading
  is-active?
]
patches-own[
  nectar flower-health
  is-flower? time-to-nectar-regeneration
  is-female? is-pollinated?
  time-to-bloom
]

to setup
  clear-all
  setup-flower-patches
  setup-bees
  reset-ticks
end 

to setup-flower-patches
  ;;; Setup soil and flower patches
  init-globals
  setup-hive
  ask patches [
    set is-flower? false
    set is-female? false
    set is-pollinated? false
    if pxcor != hive-x or pycor != hive-y[
      set pcolor ground-color
      if random 100 < flower-spread [
        set flower-health random 100
        setup-flower-attr
      ]
    ]
  ]
end 

to init-globals
  set flower-color-male 116
  set flower-color-male-nectar 114
  set flower-color-female 138
  set flower-color-female-nectar 135
  set energy-reduction-factor (floor ((no-of-ticks-per-day * 30) / 100))
  set nectar-regeneration-freq (no-of-ticks-per-day / daily-nectar-generation)
  set bloom-factor (no-of-ticks-per-day * bloom-days)

  set-spawn-factor

  (
    ifelse ambient-temprature >= 18 [set ground-color 63]
    ambient-temprature > 10 [set ground-color 33]
    [set ground-color white]
  )
end 

to set-spawn-factor
  ;;; Bee Spawnning changes according to the ambient temprature
  (
    ifelse ambient-temprature >= 18 [set spawn-factor no-of-ticks-per-day]
    [set spawn-factor (no-of-ticks-per-day * 5)]
  )
end 

to setup-hive
  ;;; Setup a hive at a random location in the field
  set hive-x random max-pxcor
  set hive-y random max-pycor
  ask patch hive-x hive-y[
    set plabel "HV"
    set pcolor 15
    set plabel-color white
  ]
end 

to setup-flower-attr
  ;;; Setup for flower attributes
  ifelse random flower-spread < (min (list nectar-ratio flower-spread)) [
     set nectar per-flower-nectar
  ][
    set time-to-nectar-regeneration random nectar-regeneration-freq
  ]
  set is-flower? true
  flower-to-female
  change-flower-color
end 

to flower-to-female
  ;;; Randomizing the gender for a flower
  if random 2 > 0 [set is-female? true]
end 

to change-flower-color
  ;;; Setting up the color of the flower according to the presence of nectar and gender
  ifelse is-female? = true [set pcolor flower-color-female]
      [set pcolor flower-color-male]

  if nectar > 0 [
    ifelse is-female? = true [set pcolor flower-color-female-nectar]
      [set pcolor flower-color-male-nectar]
  ]
end 

to setup-bees
  ;;; Setup for bees
  create-turtles number-of-bees [
    set energy random 100
    create-bee
    set is-active? false
    (
      ifelse ambient-temprature >= 18 [
        set bee-max-nectar 100
      ]
      ambient-temprature > 10 [
        set bee-max-nectar 35
        set xcor hive-x
        set ycor hive-y
      ][
        set xcor hive-x
        set ycor hive-y
      ]
    )
  ]
end 

to create-bee
  ;;; Setup for bee attributes like shape, color
  setxy random-xcor random-ycor
  set shape "bee"
  set curr-heading heading
  change-bee-color
end 

to change-bee-color
  ;;; Change bee color according to energy
  ifelse  energy >= 20 [set color yellow]
    [set color red]
end 

;;; Go Procedure starts here

to go
  activate-bees
  work-bees
  reduce-bee-energy
  reduce-flower-health
  regenerate-nectar
  regrow-flower
  spawn-bee

  tick
end 

to activate-bees
  ;;; Bees movement from hive changes according to the ambient temprature
  ;;; They tend to be active during summer when tempratrue is around 18 to 30
  ;;; Moderately active durin spring or autumn when temprature is aorund 10 to 18
  ;;; Inactive during winter when temprature is leesere than 10
  (
    ifelse ambient-temprature >= 18 [
      ask turtles [
        set is-active? true
      ]
    ]
    ambient-temprature > 10 [
      if (ticks mod energy-reduction-factor) = 0 [
        let active-turtles n-of (floor (number-of-bees * .15)) turtles
        ask active-turtles [
          set is-active? true
        ]
      ]
    ]

  )
end 

to work-bees
  ;;; Wroker bees go procedure, bees collect nectar only under 3 conditions
  ;;; 1. If it is a flower
  ;;; 2. If the flower has enough nectar [nectar]
  ;;; 3. If the bee has the carry capacity [nectar-carried]
  ;;; After the bees are full it goes straight the hive and drop them
  ;;; Bees also carry pollen from male flowers while picking nectar from male flower [pick-pollen] and
  ;;; while carrying nectar from female flowers they drop them, this causes fertilization [pollinate-flower]
  ask turtles with [is-active?][
    if [is-flower?] of patch-here[
      if nectar-carried < bee-max-nectar and [nectar] of patch-here > 0 [
        set nectar-carried nectar-carried + [nectar] of patch-here
        change-search-heading
        deplete-flower-nectar
      ]

      pick-pollen
      pollinate-flower
    ]

   (
      ifelse nectar-carried >= bee-max-nectar and patch-here = patch hive-x hive-y[
        set hive-nectar hive-nectar + nectar-carried
        set nectar-carried 0
        set pollen-carried? false
        if ambient-temprature < 18 [set is-active? false]
      ]
      nectar-carried >= bee-max-nectar [
        facexy hive-x hive-y
        fd 1
      ]
      [
        search-for-nectar
      ]
   )
  ]
end 

to search-for-nectar
  ;;; Bees search for the flowers to pick nectar.
  ;;; Bees follow a short distance in same direction before changing its direction.
  ;;; Controlled using [search-steps]
  ifelse curr-heading = heading and curr-step <= search-steps [
    set curr-step curr-step + 1
    fd 1

  ][
    change-search-heading
    set curr-step 1
    fd 1
  ]
end 

to change-search-heading
  ;;; Bees change the direction of search after few steps
  ;;; as explained in [search-for-nectar] go procedure.
  rt random 90
  set curr-heading heading
end 

to deplete-flower-nectar
  ;;; Each time the bee picks nectar it is depleated and is set for regenration in future
  ask patch-here [
    set nectar 0
    change-flower-color
    set time-to-nectar-regeneration nectar-regeneration-freq
  ]
end 

to pollinate-flower
  ;;; If Bee goes to a female flower and
  ;;; bee has pollen, it drops the pollen to polinate the female flower
  ;;; The no of seeds to drop by the female flower is controlled by [no-of-seeds-to-drop]
  ;;; seeds are dropped areound the female flower.
  if [is-female?] of patch-here and pollen-carried? = true [
    ask patch-here[
      let target-neigbhor n-of min(list no-of-seeds-to-drop (count neighbors)) neighbors
      ask target-neigbhor [
        if not (pxcor = hive-x and pycor = hive-y)[
          set is-pollinated? true
          set time-to-bloom bloom-factor
        ]
      ]
    ]
    set pollen-carried? false
  ]
end 

to pick-pollen
  ;;; If the bee reaches a male flower it picks pollen
  if [not is-female?] of patch-here [
    set pollen-carried? true
  ]
end 

to reduce-bee-energy
  ;;; Bees lose energy. The lifespan of bees are 30 days.
  ;;; [energ-reduction-factor] are calculated according to the ticks
  ;;; using [no-of-ticks-per-day].
  ask turtles [
    if (ticks mod energy-reduction-factor) = 0 [
    set energy energy - 1
    ]
    change-bee-color
    if energy <= 0 [
      die
    ]
  ]
end 

to reduce-flower-health
  ;;; Flowers lose health. The lifespan of flowers are 30 days.
  ;;; [energ-reduction-factor] are calculated according to the ticks
  ;;; using [no-of-ticks-per-day].
  ask patches with [is-flower?][
    if (ticks mod energy-reduction-factor) = 0 [
      set flower-health flower-health - 1
    ]
    if flower-health <= 0 [
      flower-death
    ]
  ]
end 

to flower-death
  ;;; Flowers are reset when they die, If the seeds are dropped in the place
  ;;; they are preserved and they are regrown.
  set pcolor ground-color
  set nectar 0
  set is-flower? false
  set is-female? false
end 

to regenerate-nectar
  ;;; Nectar regeneration happens after the nectar is depleated
  ;;; Controlled using [daily-nectar-regeneration] slider.
  ask patches with[is-flower?][
    set time-to-nectar-regeneration time-to-nectar-regeneration - 1
    if time-to-nectar-regeneration <= 0 [
      set nectar per-flower-nectar
      change-flower-color
    ]
  ]
end 

to regrow-flower
  ;;; FLowers are regrown from seeds. Flowers have bloom period.
  ;;; They are controlled by [bloom-days] slider.
  ask patches with [not is-flower? and is-pollinated?] [
    set time-to-bloom time-to-bloom - 1
    if time-to-bloom <= 0 [
      set is-pollinated? false
      set is-flower? true
      set flower-health 100
      set nectar per-flower-nectar
      flower-to-female
      change-flower-color
    ]
  ]
end 

to spawn-bee
  ;;; Bees are spawned from the hive everyday.
  ;;; Spawning count is controlled by [bees-to-spawn] slider.

  if (ticks mod spawn-factor) = 0 [
    create-turtles bees-to-spawn [
      setxy hive-x hive-y
      facexy random-xcor random-ycor
      set shape "bee"
      set curr-heading heading
      set energy 100
      set is-active? false
    ]
  ]
end 









There is only one version of this model, created about 11 hours ago by Raaja Selvanaathan Datchanamourthy.

Attached files

File Type Description Last updated
Bee Pollination on Lavender Flowers.png preview Preview for 'Bee Pollination on Lavender Flowers' about 11 hours ago, by Raaja Selvanaathan Datchanamourthy Download

This model does not have any ancestors.

This model does not have any descendants.