The Higher Education and Research forge

Home My Page Projects Code Snippets Project Openings EMULSION public releases
Summary Activity Surveys SCM Listes Sympa

SCM Repository

2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
6   <head>
7     <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
8     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9     <title>Modelling language (advanced) &#8212; EMULSION (Epidemiological Multi-Level Simulation framework)</title>
10     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
11     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
12     <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
13     <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
14     <script type="text/javascript" src="../_static/jquery.js"></script>
15     <script type="text/javascript" src="../_static/underscore.js"></script>
16     <script type="text/javascript" src="../_static/doctools.js"></script>
17     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
18     <link rel="shortcut icon" href="../_static/STEMAH-favicon.png"/>
19     <link rel="index" title="Index" href="../genindex.html" />
20     <link rel="search" title="Search" href="../search.html" />
21     <link rel="next" title="Feature examples" href="Feature_examples.html" />
22     <link rel="prev" title="Modelling language (basics)" href="Modelling_language_basics.html" />
23    
24   <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
25   
26   
27   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
29   </head><body>
30   
32     <div class="document">
33       <div class="documentwrapper">
34         <div class="bodywrapper">
35           <div class="body" role="main">
36             
37   <div class="section" id="modelling-language-advanced">
38 <h1>Modelling language (advanced)<a class="headerlink" href="#modelling-language-advanced" title="Permalink to this headline">¶</a></h1>
39 <p>EMULSION modelling language allows model designers to specify complex
40 assumptions in a readable way, to foster interactions with other
41 scientists and facilitate model revision throughout the design process
42 without having to dive into the simulation code.</p>
43 <p>Most language features documented below are associated with example
44 files, located in the <code class="docutils literal notranslate"><span class="pre">models/features</span></code> directory.</p>
45 <div class="section" id="compartments-ibm-or-hybrid-models">
46 <h2>Compartments, IBM or hybrid models?<a class="headerlink" href="#compartments-ibm-or-hybrid-models" title="Permalink to this headline">¶</a></h2>
47 <p>EMULSION helps to transform compartment-based models into
48 invidual-based models (or vice-versa, assuming the individual-based
49 model can get rid of individual specificities). An intermediate
50 approach is the hybrid model, which preserves individual
51 characteristics but drives system evolution through compartment-like
52 groupings (see: <a class="reference internal" href="Modelling_principles.html#individuals-populations-metapopulations"><span class="std std-ref">Individuals, populations, metapopulations</span></a>).</p>
53 <p>The table below summarises the main differences between each kind of
54 models, regarding the sections and keywords to modify in an EMULSION
55 model file.</p>
56 <table border="1" class="docutils">
57 <colgroup>
58 <col width="26%" />
59 <col width="24%" />
60 <col width="18%" />
61 <col width="13%" />
62 <col width="19%" />
63 </colgroup>
64 <thead valign="bottom">
65 <tr class="row-odd"><th class="head" rowspan="2">EMULSION section</th>
66 <th class="head" rowspan="2">section keyword</th>
67 <th class="head" colspan="3">Modelling paradigm</th>
68 </tr>
69 <tr class="row-even"><th class="head">compartment</th>
70 <th class="head">hybrid</th>
71 <th class="head">IBM</th>
72 </tr>
73 </thead>
74 <tbody valign="top">
75 <tr class="row-odd"><td rowspan="2"><code class="docutils literal notranslate"><span class="pre">levels</span></code></td>
76 <td><code class="docutils literal notranslate"><span class="pre">aggregation_type</span></code></td>
77 <td><code class="docutils literal notranslate"><span class="pre">compartment</span></code></td>
78 <td><code class="docutils literal notranslate"><span class="pre">hybrid</span></code></td>
79 <td><code class="docutils literal notranslate"><span class="pre">IBM</span></code></td>
80 </tr>
81 <tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">contains</span></code></td>
82 <td><em>not used</em></td>
83 <td colspan="2"><em>sublevels</em></td>
84 </tr>
85 <tr class="row-odd"><td rowspan="2"><code class="docutils literal notranslate"><span class="pre">grouping</span></code></td>
86 <td><code class="docutils literal notranslate"><span class="pre">key_variables</span></code></td>
87 <td colspan="2"><em>list of variables</em></td>
88 <td rowspan="2"><em>not used</em></td>
89 </tr>
90 <tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">state_machine</span></code></td>
91 <td colspan="2"><em>machine name</em> (optional)</td>
92 </tr>
93 <tr class="row-odd"><td rowspan="2"><code class="docutils literal notranslate"><span class="pre">processes</span></code></td>
94 <td><em>level</em></td>
95 <td colspan="2"><em>population</em></td>
96 <td><em>individuals</em></td>
97 </tr>
98 <tr class="row-even"><td><em>list of processes</em></td>
99 <td colspan="2"><em>names of groupings</em></td>
100 <td><em>machine name</em></td>
101 </tr>
102 <tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">state_machines</span></code></td>
103 <td><code class="docutils literal notranslate"><span class="pre">productions</span></code></td>
104 <td>&#160;</td>
105 <td colspan="2"><em>based on prototypes</em></td>
106 </tr>
107 <tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">prototypes</span></code></td>
108 <td>&#160;</td>
109 <td><em>not used</em></td>
110 <td colspan="2"><em>for individuals/populations</em></td>
111 </tr>
112 <tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">initial_conditions</span></code></td>
113 <td>&#160;</td>
114 <td><em>per state</em></td>
115 <td colspan="2"><em>based on prototypes</em></td>
116 </tr>
117 </tbody>
118 </table>
119 <div class="admonition seealso">
120 <p class="first admonition-title">See also</p>
121 <p>Also, in <code class="docutils literal notranslate"><span class="pre">model/features</span></code>, many examples are provided with the
122 three modelling paradigms when possible, especially the simplest
123 SIR model (<code class="docutils literal notranslate"><span class="pre">compart_SIR.yaml</span></code>, <code class="docutils literal notranslate"><span class="pre">hybrid_SIR.yaml</span></code>,
124 <code class="docutils literal notranslate"><span class="pre">IBM_SIR.yaml</span></code>) and the corresponding version with demographic
125 processes (<code class="docutils literal notranslate"><span class="pre">compart_SIR_demo.yaml</span></code>, <code class="docutils literal notranslate"><span class="pre">hybrid_SIR_demo.yaml</span></code>,
126 <code class="docutils literal notranslate"><span class="pre">IBM_SIR_demo.yaml</span></code>).</p>
127 <p class="last">See <a class="reference internal" href="Feature_examples.html#sir-model"><span class="std std-ref">SIR model</span></a>, <a class="reference internal" href="Feature_examples.html#seirs-model"><span class="std std-ref">SEIRS model</span></a>, <a class="reference internal" href="Feature_examples.html#sir-model-with-basic-demography-births-deaths"><span class="std std-ref">SIR model with basic demography (births/deaths)</span></a> and many others in <a class="reference internal" href="Feature_examples.html#feature-examples"><span class="std std-ref">Feature examples</span></a>.</p>
128 </div>
129 </div>
130 <div class="section" id="master-state-machines">
131 <h2>Master state machines<a class="headerlink" href="#master-state-machines" title="Permalink to this headline">¶</a></h2>
132 <div class="section" id="set-states-attributes">
133 <h3>Set states attributes<a class="headerlink" href="#set-states-attributes" title="Permalink to this headline">¶</a></h3>
134 <p>States can be endowed with <em>attributes</em>. For instance, <code class="docutils literal notranslate"><span class="pre">fillcolor</span></code>
135 defines the color of the boxes on state machine diagrams, which is the
136 same than the color of plots in outputs.</p>
137 <p>A state can define three main properties:</p>
138 <dl class="docutils">
139 <dt><code class="docutils literal notranslate"><span class="pre">autoremove:</span> <span class="pre">yes</span></code></dt>
140 <dd><p class="first">Autoremove states are intended as “sink”, so that all individuals
141 that reach such a state are removed from the system. This is a
142 very convenient way to represent deaths or outgoing commercial
143 movements.</p>
144 <div class="last admonition seealso">
145 <p class="first admonition-title">See also</p>
146 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-basic-demography-births-deaths"><span class="std std-ref">SIR model with basic demography (births/deaths)</span></a></p>
147 </div>
148 </dd>
149 <dt><code class="docutils literal notranslate"><span class="pre">default:</span> <span class="pre">yes</span></code></dt>
150 <dd><p class="first">A state can be labelled as “default state”. Default state plays
151 the same role but the way to use them differs in compartment-based
152 models and in others:</p>
153 <ul class="last">
154 <li><p class="first">in compartment-based models, when no indication is provided in
155 initial conditions or production links regarding new
156 individuals, they will be put in the default state for each of
157 their state machines</p>
158 </li>
159 <li><p class="first">in IBM/hybrid models and metapopulations, <code class="docutils literal notranslate"><span class="pre">default</span></code> is a valid
160 value for prototypes definition. For instance, writing
161 <code class="docutils literal notranslate"><span class="pre">health_state:</span> <span class="pre">default</span></code> in a prototype will set the health
162 state to the default state of the <code class="docutils literal notranslate"><span class="pre">health_state</span></code> state machine</p>
163 <div class="admonition seealso">
164 <p class="first admonition-title">See also</p>
165 <p class="last"><span class="xref std std-ref">Default state</span>, <a class="reference internal" href="Feature_examples.html#sir-model-with-age-groups"><span class="std std-ref">SIR model with age groups</span></a></p>
166 </div>
167 </li>
168 </ul>
169 </dd>
170 <dt><code class="docutils literal notranslate"><span class="pre">duration</span></code> (valid for <strong>IBM</strong>/<strong>hybrid</strong> models)</dt>
171 <dd><p class="first">This keyword allows to assign a specific duration to a
172 state. Durations can be constant values or arbitrary expressions,
173 including a random distribution. When an individual enters the
174 state, it receives a value calculated from this expression
175 (possibly involving a random sample) and cannot leave this state
176 until the duration is over (with the exception of <a class="reference internal" href="#escape-conditions"><span class="std std-ref">escape
177 conditions</span></a>).</p>
178 <div class="last admonition seealso">
179 <p class="first admonition-title">See also</p>
180 <p class="last"><a class="reference internal" href="Feature_examples.html#custom-state-durations"><span class="std std-ref">Custom state durations</span></a></p>
181 </div>
182 </dd>
183 <dt><code class="docutils literal notranslate"><span class="pre">on_enter</span></code>, <code class="docutils literal notranslate"><span class="pre">on_stay</span></code>, <code class="docutils literal notranslate"><span class="pre">on_exit</span></code> (valid for <strong>IBM</strong>/<strong>hybrid</strong> models)</dt>
184 <dd><p class="first">These keywords are used to specify lists of <strong>actions</strong> that
185 individuals have to perform when, respectively, entering, staying
186 in, or leaving the state.</p>
187 <p>Actions can be either built-in actions (listed <a class="reference internal" href="#built-in-actions"><span class="std std-ref">there</span></a>) or the name of a function provided in a code
188 add-on (e.g. <code class="docutils literal notranslate"><span class="pre">action:</span> <span class="pre">my_custom_function</span></code>).</p>
189 <div class="last admonition seealso">
190 <p class="first admonition-title">See also</p>
191 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-individual-actions-and-variable-aggregation"><span class="std std-ref">SIR model with individual actions and variable aggregation</span></a></p>
192 </div>
193 </dd>
194 </dl>
195 </div>
196 <div class="section" id="customize-transitions">
197 <h3>Customize transitions<a class="headerlink" href="#customize-transitions" title="Permalink to this headline">¶</a></h3>
198 <p>In state machines, transitions are composed of at least three items:</p>
199 <ul class="simple" id="quantifiers">
200 <li><code class="docutils literal notranslate"><span class="pre">from</span></code> followed by the origin state</li>
201 <li><code class="docutils literal notranslate"><span class="pre">to</span></code> followed by the destination state</li>
202 <li>a <strong>quantifier</strong> to indicate the flow from origin to destination
203 state, which can be:<ul>
204 <li><code class="docutils literal notranslate"><span class="pre">rate</span></code> with a transition rate per individual i.e. a number per
205 time unit. In stochastic models , rates are automatically
206 converted into probabilities, assuming that durations in the
207 origin state follow an exponential distribution</li>
208 <li><code class="docutils literal notranslate"><span class="pre">proba</span></code> with the probabiliy that, during <em>one time unit</em>, an
209 individual moves from origin to destination state</li>
210 <li><code class="docutils literal notranslate"><span class="pre">amount</span></code> which indicates an absolute number of individuals,
211 (bounded by the number of individuals actually in origin state)</li>
212 <li><code class="docutils literal notranslate"><span class="pre">amount-all-but</span></code> which indicates an absolute number of
213 individuals which have to <em>stay</em> in origin state while the others
214 move to destination state. Hence, writing <code class="docutils literal notranslate"><span class="pre">amount-all-but:</span> <span class="pre">0</span></code>
215 means “all individuals in origin state”</li>
216 </ul>
217 </li>
218 </ul>
219 <div class="admonition warning">
220 <p class="first admonition-title">Warning</p>
221 <p class="last">In a state machine, all quantifiers may be used. However, from a
222 given origin state, all transitions that can be used simultaneously
223 must have the same quantifiers (i.e. only <code class="docutils literal notranslate"><span class="pre">rate</span></code>, or only
224 <code class="docutils literal notranslate"><span class="pre">proba</span></code>, or only <code class="docutils literal notranslate"><span class="pre">amount</span></code>/<code class="docutils literal notranslate"><span class="pre">amount-all-but</span></code>).</p>
225 </div>
226 <p>Transitions can also incorporate additional elements:</p>
227 <ul class="simple" id="escape-conditions">
228 <li><code class="docutils literal notranslate"><span class="pre">cond</span></code> followed with a expression (logical or numeric, non-zero
229 values being considered true) specifies which individuals are
230 allowed to cross the transition</li>
231 <li><code class="docutils literal notranslate"><span class="pre">escape</span></code> is a special condition for origin states endowed with a
232 specific duration, which allows individuals that fulfil the
233 expression to exit their state <em>before</em> the normal term. For
234 instance, a gestating state has a duration before which individuals should
235 not be able to leave the state, but if abortions are possible, the
236 corresponding condition can be used as escape condition to permit a
237 premature exit of gestation.</li>
238 <li><code class="docutils literal notranslate"><span class="pre">when</span></code> is a special condition which refers to <em>events</em> from a
239 <a class="reference internal" href="#regulate-time"><span class="std std-ref">calendar</span></a> (useful to handle seasonality)</li>
240 <li><code class="docutils literal notranslate"><span class="pre">on_cross</span></code> is used to specify a list of actions that indivuals
241 moving from origin state to destination state through this
242 transition have to perform</li>
243 </ul>
244 </div>
245 <div class="section" id="produce-new-individuals">
246 <h3>Produce new individuals<a class="headerlink" href="#produce-new-individuals" title="Permalink to this headline">¶</a></h3>
247 <ul>
248 <li><p class="first">Section <code class="docutils literal notranslate"><span class="pre">productions</span></code> in state machines allow to define how some
249 states can produce new individuals. Production links are very
250 similar to transitions in their syntax, except that:</p>
251 <ul class="simple">
252 <li><code class="docutils literal notranslate"><span class="pre">escape</span></code> conditions and <code class="docutils literal notranslate"><span class="pre">amount-all-but</span></code> quantifier are not allowed</li>
253 <li>in IBM/hybrid models, a <code class="docutils literal notranslate"><span class="pre">prototype</span></code> must be specified for the new
254 individuals</li>
255 </ul>
256 <p>Besides, the computation of actual flows uses sampling in Poisson
257 distribution rather than binomial/multinomial sampling.</p>
258 <div class="admonition seealso">
259 <p class="first admonition-title">See also</p>
260 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-basic-demography-births-deaths"><span class="std std-ref">SIR model with basic demography (births/deaths)</span></a>, <a class="reference internal" href="Feature_examples.html#sir-model-with-age-groups"><span class="std std-ref">SIR model with age groups</span></a></p>
261 </div>
262 </li>
263 <li><p class="first">Another way to produce new individuals is using an action: <code class="docutils literal notranslate"><span class="pre">clone</span></code>
264 (aka <code class="docutils literal notranslate"><span class="pre">produce_offspring</span></code>) associated with a transition or
265 with a state (see <a class="reference internal" href="#set-states-attributes"><span class="std std-ref">Set states attributes</span></a> and <a class="reference internal" href="#built-in-actions"><span class="std std-ref">Built-in actions</span></a>).</p>
266 <div class="admonition seealso">
267 <p class="first admonition-title">See also</p>
268 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-explicit-gestation"><span class="std std-ref">SIR model with explicit gestation</span></a></p>
269 </div>
270 </li>
271 </ul>
272 </div>
273 <div class="section" id="remove-transitions">
274 <h3>Remove transitions<a class="headerlink" href="#remove-transitions" title="Permalink to this headline">¶</a></h3>
275 <p>State machines can also be used only for states, e.g. to differentiate
276 male/female individuals. In that case, the state machine does not
277 require any transition at all.</p>
278 <div class="admonition seealso">
279 <p class="first admonition-title">See also</p>
280 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-explicit-gestation"><span class="std std-ref">SIR model with explicit gestation</span></a></p>
281 </div>
282 </div>
283 </div>
284 <div class="section" id="regulate-time">
285 <h2>Regulate time<a class="headerlink" href="#regulate-time" title="Permalink to this headline">¶</a></h2>
286 <ul>
287 <li><p class="first">The simulation time step can be changed either in the model file
288 (section <code class="docutils literal notranslate"><span class="pre">time_info</span></code>), or at runtime with option <code class="docutils literal notranslate"><span class="pre">-p</span>
289 <span class="pre">delta_t=value</span></code></p>
290 </li>
291 <li><p class="first">Section <code class="docutils literal notranslate"><span class="pre">time_info</span></code> allows the definition of calendars with
292 events, for instance a pasture period:</p>
293 <div class="admonition-example admonition">
294 <p class="first admonition-title">Example</p>
295 <blockquote>
296 <div><div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">calendars</span><span class="p p-Indicator">:</span>
297   <span class="l l-Scalar l-Scalar-Plain">pasture</span><span class="p p-Indicator">:</span>
298     <span class="l l-Scalar l-Scalar-Plain">period</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">{</span><span class="nv">days</span><span class="p p-Indicator">:</span> <span class="nv">365</span><span class="p p-Indicator">}</span>
299   <span class="l l-Scalar l-Scalar-Plain">events</span><span class="p p-Indicator">:</span>
300     <span class="l l-Scalar l-Scalar-Plain">pasture_period</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">{</span><span class="nv">begin</span><span class="p p-Indicator">:</span> <span class="s">&#39;April</span><span class="nv"> </span><span class="s">1&#39;</span><span class="p p-Indicator">,</span> <span class="nv">end</span><span class="p p-Indicator">:</span> <span class="s">&#39;October</span><span class="nv"> </span><span class="s">1&#39;</span><span class="p p-Indicator">}</span>
301     <span class="l l-Scalar l-Scalar-Plain">open_days</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">{</span><span class="nv">date</span><span class="p p-Indicator">:</span> <span class="s">&#39;May</span><span class="nv"> </span><span class="s">1&#39;</span><span class="p p-Indicator">}</span>
302 </pre></div>
303 </div>
304 </div></blockquote>
305 <p>A calendar can be periodic or not, and define events that span from
306 a <code class="docutils literal notranslate"><span class="pre">begin</span></code> date to and <code class="docutils literal notranslate"><span class="pre">end</span></code> date, or that take place at a
307 specific <code class="docutils literal notranslate"><span class="pre">date</span></code>. Each event (here <code class="docutils literal notranslate"><span class="pre">pasture_period</span></code> and
308 <code class="docutils literal notranslate"><span class="pre">open_days</span></code>) can be used in conditions, especially in the
309 <code class="docutils literal notranslate"><span class="pre">when</span></code> clause of transition or productions. A transition with
310 e.g. <code class="docutils literal notranslate"><span class="pre">Not(pasture_period)</span></code> will not be considered at all when the
311 condition is not fulfilled.</p>
312 <p>Besides, events with a begin and an end date automatically generate
313 two other events, here for instance <code class="docutils literal notranslate"><span class="pre">begin_pasture_period</span></code> and
314 <code class="docutils literal notranslate"><span class="pre">end_pasture_period</span></code>.</p>
315 <div class="last admonition seealso">
316 <p class="first admonition-title">See also</p>
317 <p class="last">model <a class="reference internal" href="Install.html#test-your-installation"><span class="std std-ref">Quickstart</span></a> provided to test
318 EMULSION installation</p>
319 </div>
320 </div>
321 </li>
322 </ul>
323 </div>
324 <div class="section" id="complexify-grouping">
325 <h2>Complexify grouping<a class="headerlink" href="#complexify-grouping" title="Permalink to this headline">¶</a></h2>
326 <p>Grouping can be based on several variables, especially when the
327 dynamics of one process is affected by another one. For instance, if
328 infection is driven by age groups, the grouping section should be
329 rewritten as follows:</p>
330 <div class="admonition-example admonition">
331 <p class="first admonition-title">Example</p>
332 <div class="last highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">grouping</span><span class="p p-Indicator">:</span>
333   <span class="l l-Scalar l-Scalar-Plain">herd</span><span class="p p-Indicator">:</span>
334     <span class="l l-Scalar l-Scalar-Plain">infection</span><span class="p p-Indicator">:</span>
335       <span class="l l-Scalar l-Scalar-Plain">state_machine</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">health_state</span>
336       <span class="l l-Scalar l-Scalar-Plain">key_variables</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">[</span><span class="nv">health_state</span><span class="p p-Indicator">,</span> <span class="nv">age_group</span><span class="p p-Indicator">]</span>
337     <span class="l l-Scalar l-Scalar-Plain">age_group</span><span class="p p-Indicator">:</span>
338       <span class="l l-Scalar l-Scalar-Plain">state_machine</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">age_group</span>
339       <span class="l l-Scalar l-Scalar-Plain">key_variables</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">[</span><span class="nv">age_group</span><span class="p p-Indicator">]</span>
340 </pre></div>
341 </div>
342 </div>
343 <div class="admonition seealso">
344 <p class="first admonition-title">See also</p>
345 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-structured-population"><span class="std std-ref">SIR model with structured population</span></a></p>
346 </div>
347 <p>Grouping are especially useful in hybrid models, either to accelerate
348 simulation time, or to benefit from <a class="reference internal" href="#automatic-variables"><span class="std std-ref">automatic variables</span></a>.</p>
349 <p>A grouping can also be designed just to have access to specific
350 subgroups in the population, and thus indicate no state machine, nor
351 rely on variables related to state machines.</p>
352 <div class="admonition warning">
353 <p class="first admonition-title">Warning</p>
354 <p class="last">In any case, the name of the grouping must appear in the list of
355 processes: otherwise the grouping is not updated at each time step
356 (individuals are not distributed in the proper groups).</p>
357 </div>
358 </div>
359 <div class="section" id="aggregate-variables">
360 <h2>Aggregate variables<a class="headerlink" href="#aggregate-variables" title="Permalink to this headline">¶</a></h2>
361 <p>When defining levels, variables that aggregate other variables from a
362 sublevel can be defined, for instance:</p>
363 <div class="admonition-example admonition">
364 <p class="first admonition-title">Example</p>
365 <div class="last highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">levels</span><span class="p p-Indicator">:</span>
366   <span class="l l-Scalar l-Scalar-Plain">herd</span><span class="p p-Indicator">:</span>
367     <span class="l l-Scalar l-Scalar-Plain">...</span>
368     <span class="l l-Scalar l-Scalar-Plain">aggregate_vars</span><span class="p p-Indicator">:</span>
369       <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">name</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">pop_affected_over_time</span>
370         <span class="l l-Scalar l-Scalar-Plain">collect</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">nb_episodes</span>
371         <span class="l l-Scalar l-Scalar-Plain">operator</span><span class="p p-Indicator">:</span> <span class="s">&#39;sum&#39;</span>
372       <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">name</span><span class="p p-Indicator">:</span> <span class="s">&#39;avg_inf_duration&#39;</span>
373         <span class="l l-Scalar l-Scalar-Plain">collect</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">duration_infected</span>
374         <span class="l l-Scalar l-Scalar-Plain">operator</span><span class="p p-Indicator">:</span> <span class="s">&#39;mean&#39;</span>
375 </pre></div>
376 </div>
377 </div>
378 <p>Aggregated variables (here, <code class="docutils literal notranslate"><span class="pre">pop_affected_over_time</span></code> and
379 <code class="docutils literal notranslate"><span class="pre">avg_inf_duration</span></code>) defined by a level (here, <code class="docutils literal notranslate"><span class="pre">herd</span></code>) consist in
380 collecting the values of other variables (<code class="docutils literal notranslate"><span class="pre">nb_episodes</span></code>,
381 <code class="docutils literal notranslate"><span class="pre">duration_infected</span></code>) in the sublevels (<code class="docutils literal notranslate"><span class="pre">individuals</span></code>) and applying
382 an operator (<code class="docutils literal notranslate"><span class="pre">sum</span></code>, <code class="docutils literal notranslate"><span class="pre">mean</span></code>) to compute the resulting value.</p>
383 <p>Operators can be any classical usual operation operating on lists:
384 sum, prod, min, max, mean, var, std, median, all, any. Shortcuts have
385 been defined so that e.g. <code class="docutils literal notranslate"><span class="pre">percentile20</span></code> computes the 20th
386 percentile.</p>
387 <div class="admonition seealso">
388 <p class="first admonition-title">See also</p>
389 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-individual-actions-and-variable-aggregation"><span class="std std-ref">SIR model with individual actions and variable aggregation</span></a></p>
390 </div>
391 </div>
392 <div class="section" id="automatic-variables">
393 <h2>Automatic variables<a class="headerlink" href="#automatic-variables" title="Permalink to this headline">¶</a></h2>
394 <p>EMULSION automatically provides variables in relation to model
395 components.</p>
396 <ul class="simple">
397 <li><code class="docutils literal notranslate"><span class="pre">step</span></code> represents the current time step, <code class="docutils literal notranslate"><span class="pre">delta_t</span></code> the duration
398 of one time step (in time units), and <code class="docutils literal notranslate"><span class="pre">time</span></code> the time elapsed
399 since the beginning of simulation (in time units)</li>
400 <li>When defining a level, e.g. <code class="docutils literal notranslate"><span class="pre">herd</span></code>: <code class="docutils literal notranslate"><span class="pre">total_herd</span></code> gives the total
401 population of this level.</li>
402 <li>When defining a state machine, e.g. <code class="docutils literal notranslate"><span class="pre">health_state</span></code>, and its
403 states, e.g. <code class="docutils literal notranslate"><span class="pre">S</span></code>:<ul>
404 <li><code class="docutils literal notranslate"><span class="pre">is_S</span></code> tests whether or not an individual is in state <code class="docutils literal notranslate"><span class="pre">S</span></code></li>
405 <li><code class="docutils literal notranslate"><span class="pre">duration_in_health_state</span></code> contains the duration elapsed since
406 the individual entered the current state of state machine
407 <code class="docutils literal notranslate"><span class="pre">health_state</span></code></li>
408 <li><code class="docutils literal notranslate"><span class="pre">total_S</span></code> is the number of individuals in state <code class="docutils literal notranslate"><span class="pre">S</span></code></li>
409 </ul>
410 </li>
411 <li>When defining complex groupings, e.g. <code class="docutils literal notranslate"><span class="pre">[age_group,</span> <span class="pre">health_state]</span></code>:<ul>
412 <li><code class="docutils literal notranslate"><span class="pre">total_J_I</span></code> is the number of individuals in age group <code class="docutils literal notranslate"><span class="pre">J</span></code> and
413 in health state <code class="docutils literal notranslate"><span class="pre">I</span></code></li>
414 <li>if aggregated variables (e.g. <code class="docutils literal notranslate"><span class="pre">mean_age</span></code>) were also defined,
415 their counterpart is automatically defined for the grouping
416 (e.g. <code class="docutils literal notranslate"><span class="pre">mean_age_J_I</span></code> etc.)</li>
417 </ul>
418 </li>
419 </ul>
420 <div class="admonition seealso">
421 <p class="first admonition-title">See also</p>
422 <p class="last"><a class="reference internal" href="Feature_examples.html#sirs-model-with-periodic-external-risk"><span class="std std-ref">SIRS model with periodic external risk</span></a>,
423 <a class="reference internal" href="Feature_examples.html#sir-model-with-structured-population"><span class="std std-ref">SIR model with structured population</span></a></p>
424 </div>
425 </div>
426 <div class="section" id="built-in-functions">
427 <h2>Built-in functions<a class="headerlink" href="#built-in-functions" title="Permalink to this headline">¶</a></h2>
428 <p>Expressions used in EMULSION models can refer to classical Python
429 mathematical operators (<code class="docutils literal notranslate"><span class="pre">+</span></code>, <code class="docutils literal notranslate"><span class="pre">-</span></code>, <code class="docutils literal notranslate"><span class="pre">*</span></code>, <code class="docutils literal notranslate"><span class="pre">/</span></code>, <code class="docutils literal notranslate"><span class="pre">**</span></code> for
430 exponentiation, etc. ) and functions (e.g. <code class="docutils literal notranslate"><span class="pre">sqrt</span></code>, <code class="docutils literal notranslate"><span class="pre">cos</span></code>, <code class="docutils literal notranslate"><span class="pre">sin</span></code>,
431 <code class="docutils literal notranslate"><span class="pre">exp</span></code>, <code class="docutils literal notranslate"><span class="pre">log</span></code>, <code class="docutils literal notranslate"><span class="pre">log10</span></code>, etc.).</p>
432 <p>The following functions are also available:</p>
433 <dl class="docutils">
434 <dt><code class="docutils literal notranslate"><span class="pre">AND(cond1,</span> <span class="pre">cond2)</span></code></dt>
435 <dd>Logical conjunction: return true (1) if <code class="docutils literal notranslate"><span class="pre">cond1</span></code> and <code class="docutils literal notranslate"><span class="pre">cond2</span></code> are
436 both true, false (0) otherwise</dd>
437 <dt><code class="docutils literal notranslate"><span class="pre">OR(cond1,</span> <span class="pre">cond2)</span></code></dt>
438 <dd>Logical disjunction: return true (1) if <code class="docutils literal notranslate"><span class="pre">cond1</span></code> is true or
439 <code class="docutils literal notranslate"><span class="pre">cond2</span></code> is true, false (0) otherwise</dd>
440 <dt><code class="docutils literal notranslate"><span class="pre">Not(cond)</span></code></dt>
441 <dd>Logical negation: return true (1) if <code class="docutils literal notranslate"><span class="pre">cond1</span></code> and <code class="docutils literal notranslate"><span class="pre">cond2</span></code> are
442 both true, false (0) otherwise</dd>
443 <dt><code class="docutils literal notranslate"><span class="pre">IfThenElse(condition,</span> <span class="pre">val_if_true,</span> <span class="pre">val_if_false)</span></code></dt>
444 <dd>Ternary conditional function: return either <code class="docutils literal notranslate"><span class="pre">val_if_true</span></code> or
445 <code class="docutils literal notranslate"><span class="pre">val_if_false</span></code> depending on <code class="docutils literal notranslate"><span class="pre">condition</span></code>.</dd>
446 <dt><code class="docutils literal notranslate"><span class="pre">random_bool(proba_success)</span></code></dt>
447 <dd>Return a random boolean value (0 or 1) depending on
448 <code class="docutils literal notranslate"><span class="pre">proba_success</span></code></dd>
449 </dl>
450 <p>Shortcuts to distributions from package <code class="docutils literal notranslate"><span class="pre">numpy.random</span></code> are also
451 available:</p>
452 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">random_uniform</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
453 <span class="n">random_integers</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
454 <span class="n">random_exponential</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
455 <span class="n">random_poisson</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
456 <span class="n">random_beta</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
457 <span class="n">random_normal</span><span class="p">(</span><span class="n">m</span><span class="p">,</span> <span class="n">sd</span><span class="p">)</span>
458 <span class="n">random_gamma</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">gamma</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
459 </pre></div>
460 </div>
461 <div class="admonition seealso">
462 <p class="first admonition-title">See also</p>
463 <p class="last"><a class="reference internal" href="Feature_examples.html#custom-state-durations"><span class="std std-ref">Custom state durations</span></a>,
464 <a class="reference internal" href="Feature_examples.html#sirs-model-with-periodic-external-risk"><span class="std std-ref">SIRS model with periodic external risk</span></a></p>
465 </div>
466 </div>
467 <div class="section" id="built-in-actions">
468 <h2>Built-in actions<a class="headerlink" href="#built-in-actions" title="Permalink to this headline">¶</a></h2>
469 <dl class="docutils">
470 <dt><code class="docutils literal notranslate"><span class="pre">{action:</span> <span class="pre">action_name,</span> <span class="pre">d_params:</span> <span class="pre">dict_of_parameters}</span></code></dt>
471 <dd><p class="first">The generic keyword to call an external actions, requires Python code.</p>
472 <ul>
473 <li><p class="first"><code class="docutils literal notranslate"><span class="pre">action_name</span></code> has to be described (<code class="docutils literal notranslate"><span class="pre">desc:</span> <span class="pre">...</span></code>) explicitly in
474 main section <code class="docutils literal notranslate"><span class="pre">actions</span></code></p>
475 </li>
476 <li><p class="first"><code class="docutils literal notranslate"><span class="pre">action_name</span></code> must be provided in a separate Python file, as a
477 <em>method</em> in a class associated with the level at which the action
478 will be performed. This method will look as (assuming that
479 <code class="docutils literal notranslate"><span class="pre">d_params</span></code> contains two keys, <code class="docutils literal notranslate"><span class="pre">param1</span></code> and <code class="docutils literal notranslate"><span class="pre">param2</span></code>):</p>
480 <div class="admonition-example admonition">
481 <p class="first admonition-title">Example</p>
482 <div class="last highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">action_name</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">param1</span><span class="p">,</span> <span class="n">param2</span><span class="p">):</span>
483     <span class="sd">&quot;&quot;&quot;Do somethin with *param1* and *param2* as specified in</span>
484 <span class="sd">    section ``actions``&quot;&quot;&quot;</span>
485     <span class="c1"># here the Python code for the action</span>
486 </pre></div>
487 </div>
488 </div>
489 </li>
490 </ul>
491 <p class="last">Whenever possible, prefer other built-in actions described below.</p>
492 </dd>
493 <dt><code class="docutils literal notranslate"><span class="pre">{message:</span> <span class="pre">'Some</span> <span class="pre">important</span> <span class="pre">information'}</span></code></dt>
494 <dd>Print the specified character string on the standard output while
495 running the model, preceded by the time step and the identifier of
496 the individual.</dd>
497 <dt><code class="docutils literal notranslate"><span class="pre">{set_var:</span> <span class="pre">varname,</span> <span class="pre">value:</span> <span class="pre">expression}</span></code></dt>
498 <dd><p class="first">Change the value of <code class="docutils literal notranslate"><span class="pre">varname</span></code> according to what is calculated in
499 <code class="docutils literal notranslate"><span class="pre">expression</span></code>.</p>
500 <div class="last admonition seealso">
501 <p class="first admonition-title">See also</p>
502 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-individual-actions-and-variable-aggregation"><span class="std std-ref">SIR model with individual actions and variable aggregation</span></a></p>
503 </div>
504 </dd>
505 </dl>
506 <dl class="docutils" id="clone-action">
507 <dt><code class="docutils literal notranslate"><span class="pre">{clone:</span> <span class="pre">a_prototype_or_list,</span> <span class="pre">amount:</span> <span class="pre">value,</span> <span class="pre">proba:</span> <span class="pre">value_or_list}</span></code></dt>
508 <dd><p class="first">Clone the individual into new ones. The newly produced individuals
509 follow the specified prototypes, according the given amount and
510 probabilities.</p>
511 <ul class="simple">
512 <li>default amount is 1</li>
513 <li>if no probabilities are given, prototypes are considered
514 equiprobable</li>
515 <li>a single prototype can be given as a single value instead of a
516 list</li>
517 <li>the list or probabilites must be of same size of prototypes
518 list, only the last value may be omitted to ensure that the sum
519 of probabilities is 1. When N prototypes are associated with N
520 probability values which sum to S &lt; 1, then there is a
521 probability 1-S to produce no offspring. Once probabilies are
522 actualized, a multinomial sampling is performed to determine the
523 number of new individuals in each category</li>
524 </ul>
525 <div class="admonition-example admonition">
526 <p class="first admonition-title">Example</p>
527 <p>A model with explicit gestation states and possibly vertical disease
528 transmission:</p>
529 <div class="last highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">from</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">G</span>
530   <span class="l l-Scalar l-Scalar-Plain">to</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">NG</span>
531   <span class="l l-Scalar l-Scalar-Plain">proba</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">1</span>
532   <span class="l l-Scalar l-Scalar-Plain">on_cross</span><span class="p p-Indicator">:</span>
533     <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">clone</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">[</span><span class="nv">infected</span><span class="p p-Indicator">,</span> <span class="nv">healthy</span><span class="p p-Indicator">]</span>
534       <span class="l l-Scalar l-Scalar-Plain">amount</span><span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">1</span>
535       <span class="l l-Scalar l-Scalar-Plain">proba</span><span class="p p-Indicator">:</span> <span class="p p-Indicator">[</span><span class="nv">proba_vertical_transmission</span><span class="p p-Indicator">]</span>
536       <span class="c1"># prototype &#39;healthy&#39; has proba: 1-proba_vertical_transmission</span>
537 </pre></div>
538 </div>
539 </div>
540 <p>..seealso:</p>
541 <div class="last highlight-default notranslate"><div class="highlight"><pre><span></span>:ref:`SIR model with explicit gestation`
542 </pre></div>
543 </div>
544 </dd>
545 <dt><code class="docutils literal notranslate"><span class="pre">{produce_offspring:</span> <span class="pre">a_prototype_or_list,</span> <span class="pre">amount:</span> <span class="pre">value,</span> <span class="pre">proba:</span> <span class="pre">value_or_list}</span></code></dt>
546 <dd>Synonym of <code class="docutils literal notranslate"><span class="pre">clone</span></code>.</dd>
547 <dt><code class="docutils literal notranslate"><span class="pre">{become:</span> <span class="pre">a_prototype}</span></code></dt>
548 <dd>Force the individual to adopt the specified prototype. Useful to
549 couple states from distinct state machines.</dd>
550 </dl>
551 </div>
552 <div class="section" id="changing-scale-metapopulations">
553 <h2>Changing scale: metapopulations<a class="headerlink" href="#changing-scale-metapopulations" title="Permalink to this headline">¶</a></h2>
554 <p>In EMULSION, <code class="docutils literal notranslate"><span class="pre">metapopulation</span></code> is an aggregation type which allows to
555 handle multiple populations without regard to how this population is
556 built (compartment-based/hybrid/IBM).</p>
557 <p>It consists in defining a new level and completing initial conditions
558 through new population prototypes.</p>
559 <p>It may be also necessary to transform within-population parameters
560 into variables to allow for heterogeneous populations.</p>
561 <div class="admonition seealso">
562 <p class="first admonition-title">See also</p>
563 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-metapopulation"><span class="std std-ref">SIR model with metapopulation</span></a></p>
564 </div>
565 </div>
566 <div class="section" id="connecting-to-python-code-add-ons">
567 <h2>Connecting to Python code add-ons<a class="headerlink" href="#connecting-to-python-code-add-ons" title="Permalink to this headline">¶</a></h2>
568 <p>EMULSION is aimed at providing <em>generic</em> features required for
569 designing epidemiological models. Thus, some very specific operations
570 are not available in the generic engine. In such cases, a small code
571 add-on is required to provide additional functionalities.</p>
572 <p>Code add-ons are mainly used for specific requirements regarding:</p>
573 <ul class="simple">
574 <li>variables which are complicated to change through expressions and
575 actions</li>
576 <li>actions which are not realizable through built-in ones</li>
577 <li>processes which are not realizable through state machines</li>
578 <li>complex intial conditions</li>
579 <li>data loading</li>
580 </ul>
581 <p>To link a level with a code add-on, two elements are required:</p>
582 <ul class="simple">
583 <li><code class="docutils literal notranslate"><span class="pre">file:</span> <span class="pre">my_code_add_on.py</span></code> which specified the Python source code to use</li>
584 <li><code class="docutils literal notranslate"><span class="pre">class_name:</span> <span class="pre">AClassName</span></code> which defines the name of the Python
585 class associated with the level</li>
586 </ul>
587 <p>EMULSION provides an (experimental) code generator (<code class="docutils literal notranslate"><span class="pre">emulsion</span>
588 <span class="pre">generate</span> <span class="pre">MODEL.yaml</span></code>) which builds a code skeletton for files and
589 classes mentioned in the level definition. All actions and variables
590 listed respectively in <code class="docutils literal notranslate"><span class="pre">actions</span></code> and <code class="docutils literal notranslate"><span class="pre">statevars</span></code> sections, as well
591 as processes not associated with state machines or groupings, are
592 assumed to be defined in the Python file. All you need then is to fill
593 the relevant methods with the corresponding code, or remove
594 unnecessary parts.</p>
595 <div class="admonition seealso">
596 <p class="first admonition-title">See also</p>
597 <p class="last"><a class="reference internal" href="Feature_examples.html#sir-model-with-metapopulation-and-data-driven-movements"><span class="std std-ref">SIR model with metapopulation and data-driven movements</span></a></p>
598 </div>
599 </div>
600 </div>
603           </div>
604         </div>
605       </div>
606       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
607         <div class="sphinxsidebarwrapper">
608 <h1 class="logo"><a href="../index.html">EMULSION</a></h1>
612 <p class="blurb">Epidemiological Multi-Level Simulation Framework</p>
619 <h3>Navigation</h3>
620 <ul class="current">
621 <li class="toctree-l1"><a class="reference internal" href="Install.html">Installation</a></li>
622 <li class="toctree-l1"><a class="reference internal" href="Getting_started.html">Getting started with EMULSION</a></li>
623 <li class="toctree-l1"><a class="reference internal" href="Modelling_principles.html">Modelling principles</a></li>
624 <li class="toctree-l1"><a class="reference internal" href="Modelling_language_basics.html">Modelling language (basics)</a></li>
625 <li class="toctree-l1 current"><a class="current reference internal" href="#">Modelling language (advanced)</a><ul>
626 <li class="toctree-l2"><a class="reference internal" href="#compartments-ibm-or-hybrid-models">Compartments, IBM or hybrid models?</a></li>
627 <li class="toctree-l2"><a class="reference internal" href="#master-state-machines">Master state machines</a><ul>
628 <li class="toctree-l3"><a class="reference internal" href="#set-states-attributes">Set states attributes</a></li>
629 <li class="toctree-l3"><a class="reference internal" href="#customize-transitions">Customize transitions</a></li>
630 <li class="toctree-l3"><a class="reference internal" href="#produce-new-individuals">Produce new individuals</a></li>
631 <li class="toctree-l3"><a class="reference internal" href="#remove-transitions">Remove transitions</a></li>
632 </ul>
633 </li>
634 <li class="toctree-l2"><a class="reference internal" href="#regulate-time">Regulate time</a></li>
635 <li class="toctree-l2"><a class="reference internal" href="#complexify-grouping">Complexify grouping</a></li>
636 <li class="toctree-l2"><a class="reference internal" href="#aggregate-variables">Aggregate variables</a></li>
637 <li class="toctree-l2"><a class="reference internal" href="#automatic-variables">Automatic variables</a></li>
638 <li class="toctree-l2"><a class="reference internal" href="#built-in-functions">Built-in functions</a></li>
639 <li class="toctree-l2"><a class="reference internal" href="#built-in-actions">Built-in actions</a></li>
640 <li class="toctree-l2"><a class="reference internal" href="#changing-scale-metapopulations">Changing scale: metapopulations</a></li>
641 <li class="toctree-l2"><a class="reference internal" href="#connecting-to-python-code-add-ons">Connecting to Python code add-ons</a></li>
642 </ul>
643 </li>
644 <li class="toctree-l1"><a class="reference internal" href="Feature_examples.html">Feature examples</a></li>
645 <li class="toctree-l1"><a class="reference internal" href="Information.html">Information</a></li>
646 <li class="toctree-l1"><a class="reference internal" href="License.html">License</a></li>
647 <li class="toctree-l1"><a class="reference internal" href="../emulsion_for_modellers.html">High-level functions for model designers</a></li>
648 <li class="toctree-l1"><a class="reference internal" href="../emulsion.html">emulsion package</a></li>
649 </ul>
651 <div class="relations">
652 <h3>Related Topics</h3>
653 <ul>
654   <li><a href="../index.html">Documentation overview</a><ul>
655       <li>Previous: <a href="Modelling_language_basics.html" title="previous chapter">Modelling language (basics)</a></li>
656       <li>Next: <a href="Feature_examples.html" title="next chapter">Feature examples</a></li>
657   </ul></li>
658 </ul>
659 </div>
660 <div id="searchbox" style="display: none" role="search">
661   <h3>Quick search</h3>
662     <div class="searchformwrapper">
663     <form class="search" action="../search.html" method="get">
664       <input type="text" name="q" />
665       <input type="submit" value="Go" />
666       <input type="hidden" name="check_keywords" value="yes" />
667       <input type="hidden" name="area" value="default" />
668     </form>
669     </div>
670 </div>
671 <script type="text/javascript">$('#searchbox').show(0);</script>
672         </div>
673       </div>
674       <div class="clearer"></div>
675     </div>
676     <div class="footer">
677       &copy;2016, INRA and Univ. Lille.
678       
679       |
680       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.7.5</a>
681       &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
682       
683       |
684       <a href="../_sources/pages/Modelling_language_advanced.rst.txt"
685           rel="nofollow">Page source</a>
686     </div>
688     
690     
691   </body>
692 </html>