PetriMetaSens: Example.mdl

File Example.mdl, 1.4 KB (added by soldatov, 12 years ago)

ProMoT model

Line 
1(define-module :class "Example" :super-classes ("module")
2  :variables
3  (("u"
4        :is-a "variable"
5        :system-theoretic "real-parameter"
6        :value "1.0")
7   ("p1"
8        :is-a "variable"
9        :system-theoretic "real-parameter"
10        :value "1.0")
11   ("p2"
12        :is-a "variable"
13        :system-theoretic "real-parameter"
14        :value "3.0")
15   ("p3"
16        :is-a "variable"
17        :system-theoretic "real-parameter"
18        :value "5.0")
19    ("x1"
20        :is-a "variable"
21        :system-theoretic "state"
22        :report "distributed"
23        :value "0.0"
24    )
25    ("x2"
26        :is-a "variable"
27        :system-theoretic "state"
28        :report "distributed"
29        :value "0.0"
30   ))
31  ;;==================================================================
32  :places
33  (("state_v"
34    :is-a "place"
35    :initial-mark "no")
36   ("state_l"
37    :is-a "place"
38    :initial-mark "yes"))
39  ;;==================================================================
40  :transitions
41  (("from_v_to_l"
42    :is-a "transition"
43    :phi-function "x2+p3+p2*x1"
44    :direction "unidirectional"
45    :from ("state_v")
46    :to ("state_l"))
47   ("from_l_to_v"
48    :is-a "transition"
49    :phi-function "-(x2-p1+p2*x1)"
50    :direction "unidirectional"
51    :from ("state_l")
52    :to ("state_v")))
53  ;;==================================================================
54  :equations
55  (("x1_eq"
56    :is-a "equation"
57    :relation ":diff<t>x1==x2")
58   ("x2_eq"
59    :is-a "equation"
60    :relation ":diff<t>x2==:cond(state_l, u, -u)")))