File: UserTimeEvents.htm

package info (click to toggle)
cain 1.10+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 29,856 kB
  • sloc: cpp: 49,612; python: 14,988; xml: 11,654; ansic: 3,644; makefile: 133; sh: 2
file content (54 lines) | stat: -rw-r--r-- 1,427 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

<html>
<head>
<title>Time Events Editor</title>
</head>
<body>
<h1>Time Events Editor</h1>

<p align="center">
<img src="TimeEventsEditor.png">
</p>

<p>
The identifier and name for a time event are analogous to those for a
species. By default the name field is hidden.
The <tt>Times</tt> field is a list of times at which the event fires.
(One may enter a single number if the event fires only once.) One may use
Python expressions to generate the list of times. The following expressions 
are equivalent:
</p>
<pre>
[0, 1, 2, 3, 4]
range(5)
[i for i in range(5)]</pre>

<p>
Now for a more complicated example. Suppose you want to fire an event
every tenth of a second between times <i>t=3</i> and <i>t=4</i> inclusive.
The appropriate list follows.
</p>
<pre>
[3+0.1*i for i in range(11)]</pre>

<p>
The assignments for an event are a sequence of single assignments, 
separated by semicolons. The syntax for a single assignment is
<tt>identifier = expression</tt>. The identifier must be a species,
compartment, or parameter identifier. The assignment sets the amount
of the species, the size of the compartment, or the value of
the parameter, respectively. The right hand side is a Python
expression that may involve
species amounts, compartment sizes, parameter values, and time
(denoted with the variable <i>t</i>).
The following are valid assignments:
</p>

<pre>
x = 7
x = x+1
x = 2*x; y = 0.1*t
</pre>

</body>
</html>