Leaving Zone 0

This model simulates the beginning of an idealized salmon smolt migration. In the Spring of each year, salmon egss hatch in the streams and hatcheries of tributaries of rivers leading to the ocean. These very large populations of salmon grow into a juvenile stage in which they are known as smolts, but any further development will need to occur in the oceans themselves. Thus, nearly simultaneously they begin a migration to the ocean.

Mortality is very high -- even independent of human involvement -- but the migration occurs relatively rapidly. This model simulates the initial phase of this migration, when the very large population of smolts begin their migration from zone 0, representing
the streams and hatcheries where they were spawned, and move though various zones -- the various lakes and other identifiable segments of a river -- toward the ocean.

powered by NetLogo

view/download model file: LeavingZone0.nlogo

 

HOW IT WORKS

The Setup command initializes the system and the plots by creating "Initial-Population" numbers of smolts in zone 0. In this simulation, the initial population consists of thousands of smolts, whereas actual populations often involve millions of them. The Go command starts the random migration out of zone 0, and each smolt randomly moves about zone 0 until it encounters the channel exiting the zone. Once in the channel, it is highly unlikely that the smolt will backtrack into zone0 itself. The degree to which each smolt in zone 0 is controled by the flow of the zone toward the channel can be adjusted using the "Relative-flow-in-lake" slider.


HOW TO USE IT

Adjust the Initial-Population, ticks-per-unit-time, and Relative-Flow-In-Lake sliders to desired settings. Press Setup and then Go (press Step for one tick of the model at a time). Press setup and then go. To "smooth out" the measurements of Emigration and the percentage migration rate, the number of ticks per unit time can be varied up to 20 ticks per unit time. There is also a flow in the lake (i.e., large "box" ) toward the channel, and the "Relative-Flow-In-Lake" slider adjusts this from no influence at 0 to flow-controlled at 1.


THINGS TO NOTICE

The population and emigration E change significantly during the simulation, but after an initial vascillation, the relative rate m is nearly constant (at least for low Relative-Flow-In-Lake ). This means that when the smolts are randomly moving about the lake, the population N(t) of zone 0 satisfies a differential equation of the form

dN/dt = - m N

Also, notice that the value of m is relatively independent of the initial population -- an indication of the "memoryless" property of the exponential.

However, as the Relative-Flow-In-Lake parameter is increased, the accuracy of this model decreases as m is not nearly as close to being constant during the migration.


THINGS TO TRY

Try varying the Initial-Population. Also, try changing the relative rate of flow of the smolts (relative to the flow of the lake, that is). Changing this slider during the migration also may lead to some interesting results, especially if the initial population is quite large.


RELATED MODELS

This model created by Dr. Jeff Knisley as part of the Symbiosis project module on migratory models in differential calculus. It is one of the simulations located at http://math.etsu.edu/symbiosis/migrations.


PROCEDURES

globals [ from0to1 MaxDist Current-Time Previous-Time AllTime N0P N1P zonewidth m0 m1 Departures-per-tick 
          m1raw EMI ]

patches-own [ iswater? inlake? pzone flow-heading flow-strength ] ; flow-strength is 0 to 1, percentage of main-channel flow speed
turtles-own [ zone ]

to setup
  clear-all
  
  set from0to1 0 
  set Previous-Time 0
  set Current-Time 0
  set zonewidth 28
  
  setup-patches
  set m1raw  [  ]
  set Departures-per-tick 0
  
  
  CreateSmolts

  set AllTime [ 0 ]
  set N0P [  ]
  set N0P lput Initial-Population N0P 
  set N1P [ 0 ]
  
  set-current-plot "N(t)"   
  plotxy 0 Initial-Population
  set-current-plot "E = Emigration Rate"
  
end


to CreateSmolts
  
  set-default-shape turtles  "fish"
  
  create-turtles Initial-Population   
    [   
       set color green
       move-to one-of patches with [ pzone = 0 ]
                 
       set heading random 360 
       set zone 0
       
    ]
        
  
end  

to setup-patches 
  ;set source info and zone transition points
  ask patches 
  [ 
      ifelse ( pxcor > min-pxcor and pycor > -4 and pycor < 4 ) 
       [ set pcolor blue
         set iswater? true 
         set inlake? false
         set pzone -1
         set flow-heading 90   
         set flow-strength 1     
       ]
       [ set pzone -1 
         set iswater? false
         set inlake? false 
       ]
   ]
  make-compartment   min-pxcor    max-pxcor 0
   
    
end
      
to make-compartment [ L R zn ]
  let U max-pycor
  let B min-pycor 
  set MaxDist sqrt ( ( R - 4 - L ) ^ 2 + U ^ 2 )
  ask patches [ 
    if ( pxcor > min-pxcor and pxcor > L and pxcor < ( R - 4 ) and pycor < U and pycor > B ) 
       [ set pcolor blue
         set iswater? true
         set inlake? true 
         set pzone zn
         set flow-heading towardsxy ( R - 4 ) 0   
         set flow-strength 1 - sqrt ( ( pxcor - R ) ^ 2 +  pycor ^ 2) / MaxDist      ]  
    if ( pxcor <= R  and pxcor >= ( R - 4 ) and pxcor <= max-pxcor and pycor > -4 and pycor < 4 ) 
       [ set pcolor blue
         set iswater? true 
         set inlake? false
         set pzone -1
         set flow-heading 90   
         set flow-strength 1     ]
  ]
  
end 



to go 
   if( not any? turtles  ) [ stop ]
   
   ask turtles [
      if ( random-float 1 < 1 / ticks-per-unit-time ) 
        [ smoltMove
          smoltLearn
        ]
   ]
   smoltCount 
end 

to smoltMove 
   rt random 90
   lt random 90
   let p [ flow-strength ] of patch-here
   if( [ pzone ] of patch-here >= 0 ) [ set p p * Relative-Flow-In-Lake ] 
   ifelse ( heading <  270 ) 
     [ set heading ( ( 1 - p ) * heading + p * ( [ flow-heading ] of patch-here )  ) ]
     [ set heading ( ( 1 - p ) * heading + p * ( [ flow-heading ] of patch-here + 360 ) ) ]
   if not ( member?  patch-ahead 1  neighbors with [ iswater? ] ) 
     [  set heading towards one-of neighbors with [ iswater? ]  ]
   fd 1
   
   set zone [pzone] of patch-here

   if ( xcor >= max-pxcor ) 
     [  die  ]
   
end



to smoltCount 
  tick
  
  set Current-time ticks / ticks-per-unit-time  
  set N0P lput count turtles with [ zone = 0 ] N0P
  set N1P lput count turtles with [ zone = 1 ] N1P
    
  if( Current-Time < Previous-Time ) 
    [ clear-all-plots 
      reset-ticks  
      set Current-Time 0
    ]
  
  set-current-plot "N(t)"   
  plotxy Current-Time last N0P
   
  if( last N0P > 0 and Current-Time > 0 ) 
     [ set m0 precision ( ln ( first N0P /  last N0P ) / ( Current-Time   ) ) 5
       set EMI precision ( m0 * last N0P ) 5
       set-current-plot "E = Emigration Rate" 
       plotxy Current-Time EMI 
       set-current-plot "m, where E(t) = m N(t)"
       plotxy Current-Time m0
     ]
     
  
  if( length m1raw > ticks-per-unit-time ) 
     [  set m1raw remove-item 1 m1raw ]
      
  set Previous-Time Current-Time 
  
end

to smoltLearn
   ; Zone number, simple flow concept means no going to earlier zone 
   
end