Simulistics - Single-species population dynamics
//www.simulistics.com/modeltags/single-species-population-dynamics
enSkeleton cohort model
//www.simulistics.com/examples/catalogue/skeleton-cohort-model
<div class="field field-name-field-model field-type-text field-label-above"><div class="field-label">ModelId: </div><div class="field-items"><div class="field-item even">cohort1</div></div></div><div class="field field-name-field-simileversion field-type-text field-label-above"><div class="field-label">SimileVersion: </div><div class="field-items"><div class="field-item even">5.97</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p> This example shows how to implement a basic cohort model in Simile.</p>
<p>A cohort model is one way of modelling a population. The individuals are grouped into cohorts, typically on the basis that they were born at the same time. Each cohort has as a minimum a variable representing the number of individuals in that cohort, along with possibly other cohort-specific attributes, such as the average size of the individuals in the cohort.</p>
<p>Thus, the objects in the model are not the individuals themselves, but the cohorts. We therefore use the Simile 'population submodel' to represent the cohorts.</p>
<p>A cohort comes into existence at some point in time - typically, one new cohort is created each time unit. A cohort ceases to exist when the value for the number of individuals in it becomes zero.</p>
<p>In the simplest case, there is no interaction between cohorts. However, there often is some form of interaction - for example, a cohort model of the trees in a forest might need to include the fact that the larger trees reduce the growth of smaller trees, by shading. This requires that we represent an association between cohorts, so that we can work out the total impact (in the case of tress, from shading) of all the trees in the cohorts which are bigger than a particular cohort.</p>
<p>The skeleton model shown here captures these concepts, and consists of two submodels. This is a discrete-time model, with a time step equal to 1 time unit (say, year).</p>
<h2>Diagram</h2>
<p>Here is the model diagram for the simple cohort model:</p>
<p><img alt="cohort1 model diagram" src="/files/models/cohort1/cohort1_model_diagram.png" /></p>
<p> The submodel 'Cohort' is a Simile 'population submodel'. The 'create_new_cohort' symbol is a Simile 'immigration' symbol, and has a value of 1 - this means that 1 new cohort is created each time step. The number of individuals in the cohort is represented by the compartment 'n', and is set initially to zero. The outflow reduces the number by 5 each time step. The size of the average individual in the cohort is represented by the compartment 'size', and increases at an initial rate 'gr' up to an asymptote given by 'size_max'. At any point in time, the 'cohort_total_size' is the size of each individual multiplied by the number of individuals.</p>
<p>The submodel 'Bigger' represents an association (relationship) which exists between a pair of cohorts, when one of them is bigger than the other (in terms of the 'size' compartment). This submodel is used to transfer values for the 'cohort_total_size' from the bigger to the smaller cohort.</p>
<p>For each cohort, all the total-size values for the cohorts which are bigger than it is are summed up in the variable 'total_size_of_all_bigger_cohorts'. To make the functioning of the model clearer, this value is *not* used in this skeleton model to reduce the growth rate of the cohort. However, it is easy to do this - just take an influence to 'growth' and put in some inverse relationship.</p>
</div></div></div><div class="field field-name-field-equations field-type-text-long field-label-above"><div class="field-label">Equations: </div><div class="field-items"><div class="field-item even"><p> Variable: n_total = sum({n}) </p>
<p>Where: {n} = Cohort/n</p>
<p>Variable: population_total_size = sum({cohort_total_size})<br />
Where: {cohort_total_size} = Cohort/cohort_total_size</p>
<p>--------------------------------------------------------------<br />
Submodel Bigger </p>
<p>Submodel "Bigger" is an association submodel between "Cohort" and itself with roles "other" and "me".</p>
<p>Condition: condition = other_size>me_size<br />
Where:<br />
me_size = Value(s) of ../Cohort/size from submodel "Cohort" in role "me"<br />
other_size = Value(s) of ../Cohort/size from submodel "Cohort" in role "other"</p>
<p>Variable: total_size_of_bigger_cohort = other_cohort_total_size<br />
Where:<br />
me_cohort_total_size = Value(s) of ../Cohort/cohort_total_size from submodel "Cohort" in role "me"<br />
other_cohort_total_size = Value(s) of ../Cohort/cohort_total_size from submodel "Cohort" in role "other"</p>
<p>-------------------------------------------------------------------------<br />
Submodel Cohort </p>
<p>Submodel "Cohort" is a population submodel.</p>
<p>Compartment: n<br />
Initial value = 100<br />
Rate of change = - loss</p>
<p>Compartment: size<br />
Initial value = 0<br />
Rate of change = + growth</p>
<p>Flow: growth = gr*(1-size/max_size) </p>
<p>Flow: loss = 5 </p>
<p>Immigration: create_new_cohort = 1 </p>
<p>Loss: remove_cohort = n<=0 </p>
<p>Variable: cohort_total_size = n*size </p>
<p>Variable: gr = 1.5 </p>
<p>Variable: max_size = 10 </p>
<p>Variable: total_size_of_all_bigger_cohorts = sum({cohort_total_size_of_bigger_me})<br />
Where:<br />
{cohort_total_size_of_bigger_me} = ../Bigger/total_size_of_bigger_cohort for submodel "Cohort" in role "me"</p>
<p> </p>
<p> </p>
</div></div></div><div class="field field-name-field-results field-type-text-long field-label-above"><div class="field-label">Results: </div><div class="field-items"><div class="field-item even"><p> The results shown here illustrate the basic functioning of this model.</p>
<p>The following figure shows a set of panels, each one showing the values for a specified variable at time 10. These were made using Simile's 'snapshot' tool, and enable us to trace the values as they are processed in the model.</p>
<p> </p>
<p> <img alt="cohort1 model results" src="/files/models/cohort1/Screenshot - snapshots.png" /></p>
<p> </p>
<p>The first 3 panels on the top row show, for each of the 10 cohorts created up to this time, the number of tress (n) and the size of the average tree (size) in the cohort, along with the total size (n x size). You can see that the number of tress declines in a cohort declines by 5 each time step, and that the average tree in a cohort grows at a reducing rate as the cohort gets older.</p>
<p>The bottom window shows the total_size values for the individual cohorts that are bigger than the specified cohort. Thus, cohort 2 only has one value (since there is only one bigger than it is), while cohort 3 has 2 values, and so on.</p>
<p>The top-right window shows 'total_size_of_all_bigger_cohorts' - the sum (along a row) for al the total_size values of bigger cohorts for a particular cohort. This is the key value which enables the impact of bigger cohorts on the growth of a cohort to be modelled.</p>
<p>The graph below shows how the 'total_size_of_all_bigger_cohorts' changes over time, for each cohort. The lowest curve is for the second cohort (since the first cohort has nothing bigger than it. Each successive cohort starts off at a higher value (since the total size of cohorts above it is increasing), until we get to the point where each newly-created cohort starts off with the same total_size above it, which decreases as that cohort in turn increases in size.</p>
<p><img alt="Cohort1model results chart" src="/files/models/cohort1/cohort1_results1.png" /></p>
<p> </p>
</div></div></div><div class="field field-name-upload field-type-file field-label-hidden"><div class="field-items"><div class="field-item even"><table class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><span class="file"><img class="file-icon" alt="Binary Data" title="application/octet-stream" src="/modules/file/icons/application-octet-stream.png" /> <a href="//www.simulistics.com/files/skeleton_cohort.sml" type="application/octet-stream; length=195374" title="skeleton_cohort.sml">Skeleton cohort model file</a></span></td><td>190.79 KB</td> </tr>
<tr class="even"><td><span class="file"><img class="file-icon" alt="Binary Data" title="application/octet-stream" src="/modules/file/icons/application-octet-stream.png" /> <a href="//www.simulistics.com/files/skeleton_cohort.shf" type="application/octet-stream; length=2892" title="skeleton_cohort.shf">Skeleton cohort visualization tool layout</a></span></td><td>2.82 KB</td> </tr>
</tbody>
</table>
</div></div></div><div class="field field-name-taxonomy-vocabulary-5 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Model tags: </div><div class="field-items"><div class="field-item even"><a href="/modeltags/association-submodel">Association submodel</a></div><div class="field-item odd"><a href="/modeltags/population-dynamics">Population dynamics</a></div><div class="field-item even"><a href="/modeltags/technique">Technique</a></div><div class="field-item odd"><a href="/modeltags/single-species-population-dynamics">Single-species population dynamics</a></div><div class="field-item even"><a href="/modeltags/population-submodel">Population submodel</a></div><div class="field-item odd"><a href="/modeltags/cohort-modelling">Cohort modelling</a></div><div class="field-item even"><a href="/modeltags/disaggregated-population">Disaggregated population</a></div></div></div>Thu, 23 Aug 2012 09:22:32 +0000jonathanm4129 at //www.simulistics.com//www.simulistics.com/examples/catalogue/skeleton-cohort-model#commentsPopulation dynamics: single species: chaotic
//www.simulistics.com/examples/catalogue/population-dynamics-single-species-chaotic
<div class="field field-name-field-model field-type-text field-label-above"><div class="field-label">ModelId: </div><div class="field-items"><div class="field-item even">chaos</div></div></div><div class="field field-name-field-simileversion field-type-text field-label-above"><div class="field-label">SimileVersion: </div><div class="field-items"><div class="field-item even">5.x</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p> <span>This version differs from the standard population model in two respects:</span></p>
<ol><li>the growth rate depends on the current population by a quadratic relation. This will cause the population to approach the point of zero growth; and</li>
<li>we consider time as being discrete rather than continuous. Rather than using a very small time increment between model states it is set equal to the time unit.</li>
</ol><p>The behaviour of this model approximates that of a population where new individuals arrive all at once at a certain time of year, and most deaths also occur within a short period each year.</p>
<p class="rteleft">X(t+1) = g X(t) (1 - X(t)/100)<br /><i>where:</i></p>
<p class="rteleft"><span>X(t) = population size (number of individuals, or number of individuals per unit area) at time t g = growth rate (number of new individuals for each existing one with no resource constraints)</span></p>
<p class="rteleft"><img alt=" " src="/files/models/chaos/model.gif" /></p>
<p> </p>
</div></div></div><div class="field field-name-field-equations field-type-text-long field-label-above"><div class="field-label">Equations: </div><div class="field-items"><div class="field-item even"><p> <span>Compartment level</span></p>
<p> Initial value = rand_const(50,50.000001)<br />
Rate of change = + change</p>
<p>Flow change<br />
change = gain*level*(1-level/100) </p>
<p> </p>
<p><a id="fck_paste_padding"></a></p>
<p> </p>
</div></div></div><div class="field field-name-field-results field-type-text-long field-label-above"><div class="field-label">Results: </div><div class="field-items"><div class="field-item even"><p> <span>This graph shows the results of four consecutive runs with gain set to 1.4, 1.9, 2.3 and 2.7 respectively. On the first two runs the level approaches equilibrium; on the third it oscillates around the equilibrium, and on the final run it shows chaotic behaviour. Other behaviours such as period doubling will be shown for other values of gain.</span></p>
<p><img alt="Chart showing level for different values of gain" src="/files/models/chaos/result.gif" /></p>
<p>This graph illustrates the unpredictability of chaotic behaviour. The model includes a very small random variation in the initial value of level, but the values for three consecutive runs, all with gain set to 2.7, diverge after about 60 time units. Until this time, the plot for the last run (green) exactly overwrites the other two.</p>
<p> </p>
</div></div></div><div class="field field-name-upload field-type-file field-label-hidden"><div class="field-items"><div class="field-item even"><table class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><span class="file"><img class="file-icon" alt="Binary Data" title="application/octet-stream" src="/modules/file/icons/application-octet-stream.png" /> <a href="//www.simulistics.com/files/modelentry/chaos_sml_14187.sml" type="application/octet-stream; length=147730" title="chaos.sml">chaos.sml</a></span></td><td>144.27 KB</td> </tr>
<tr class="even"><td><span class="file"><img class="file-icon" alt="Binary Data" title="application/octet-stream" src="/modules/file/icons/application-octet-stream.png" /> <a href="//www.simulistics.com/files/modelentry/chaos_shf_19873.shf" type="application/octet-stream; length=2211" title="chaos.shf">chaos.shf</a></span></td><td>2.16 KB</td> </tr>
</tbody>
</table>
</div></div></div><div class="field field-name-taxonomy-vocabulary-5 field-type-taxonomy-term-reference field-label-above"><div class="field-label">Model tags: </div><div class="field-items"><div class="field-item even"><a href="/modeltags/population-dynamics">Population dynamics</a></div><div class="field-item odd"><a href="/modeltags/single-species-population-dynamics">Single-species population dynamics</a></div><div class="field-item even"><a href="/modeltags/chaotic-behaviour">Chaotic behaviour</a></div></div></div>Wed, 14 Mar 2012 21:08:08 +0000jonathanm4113 at //www.simulistics.com//www.simulistics.com/examples/catalogue/population-dynamics-single-species-chaotic#comments