Advertisement
Guest User

GoToUniversity

a guest
Nov 11th, 2018
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.41 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE nta PUBLIC '-//Uppaal Team//DTD Flat System 1.1//EN' 'http://www.it.uu.se/research/group/darts/uppaal/flat-1_2.dtd'>
  3. <nta>
  4.     <declaration>// Place global declarations here.
  5.  
  6. broadcast chan train, car;
  7.  
  8. bool arrived = false;
  9. bool tooLate = false;
  10.  
  11. clock time;
  12. </declaration>
  13.     <template>
  14.         <name x="5" y="5">Person</name>
  15.         <declaration>// Place local declarations here.</declaration>
  16.         <location id="id0" x="-93" y="59">
  17.         </location>
  18.         <location id="id1" x="-93" y="-76">
  19.         </location>
  20.         <location id="id2" x="0" y="-17">
  21.             <name x="-10" y="-51">University</name>
  22.         </location>
  23.         <location id="id3" x="-195" y="59">
  24.             <name x="-229" y="76">GoWithCar</name>
  25.         </location>
  26.         <location id="id4" x="-195" y="-76">
  27.             <name x="-238" y="-110">GoWithTrain</name>
  28.         </location>
  29.         <location id="id5" x="-348" y="-17">
  30.             <name x="-374" y="-51">Rijssen</name>
  31.         </location>
  32.         <branchpoint id="id6" x="-289" y="-17">
  33.         </branchpoint>
  34.         <init ref="id5"/>
  35.         <transition>
  36.             <source ref="id0"/>
  37.             <target ref="id2"/>
  38.             <label kind="guard" x="-59" y="25">arrived == true</label>
  39.         </transition>
  40.         <transition>
  41.             <source ref="id3"/>
  42.             <target ref="id0"/>
  43.             <label kind="synchronisation" x="-161" y="42">car!</label>
  44.         </transition>
  45.         <transition>
  46.             <source ref="id1"/>
  47.             <target ref="id2"/>
  48.             <label kind="guard" x="-59" y="-76">arrived == true</label>
  49.         </transition>
  50.         <transition>
  51.             <source ref="id4"/>
  52.             <target ref="id1"/>
  53.             <label kind="synchronisation" x="-161" y="-93">train!</label>
  54.         </transition>
  55.         <transition>
  56.             <source ref="id6"/>
  57.             <target ref="id3"/>
  58.             <label kind="probability" x="-272" y="17">1</label>
  59.         </transition>
  60.         <transition>
  61.             <source ref="id6"/>
  62.             <target ref="id4"/>
  63.             <label kind="probability" x="-272" y="-59">4</label>
  64.         </transition>
  65.         <transition>
  66.             <source ref="id5"/>
  67.             <target ref="id6"/>
  68.         </transition>
  69.     </template>
  70.     <template>
  71.         <name>Car</name>
  72.         <location id="id7" x="-484" y="102">
  73.             <name x="-494" y="68">NoDelay</name>
  74.         </location>
  75.         <location id="id8" x="-484" y="-68">
  76.             <name x="-494" y="-102">TrafficJam</name>
  77.             <label kind="invariant" x="-494" y="-51">time &lt;= 85</label>
  78.         </location>
  79.         <location id="id9" x="-663" y="8">
  80.             <name x="-739" y="0">GetInCar</name>
  81.         </location>
  82.         <branchpoint id="id10" x="-578" y="8">
  83.         </branchpoint>
  84.         <init ref="id9"/>
  85.         <transition>
  86.             <source ref="id7"/>
  87.             <target ref="id9"/>
  88.             <label kind="assignment" x="-646" y="102">arrived = true</label>
  89.             <nail x="-663" y="102"/>
  90.         </transition>
  91.         <transition>
  92.             <source ref="id8"/>
  93.             <target ref="id9"/>
  94.             <label kind="guard" x="-645" y="-102">time &gt;= 50</label>
  95.             <label kind="assignment" x="-646" y="-136">tooLate = true,
  96. arrived = true</label>
  97.             <nail x="-663" y="-68"/>
  98.         </transition>
  99.         <transition>
  100.             <source ref="id10"/>
  101.             <target ref="id7"/>
  102.             <label kind="probability" x="-561" y="42">19</label>
  103.         </transition>
  104.         <transition>
  105.             <source ref="id10"/>
  106.             <target ref="id8"/>
  107.             <label kind="probability" x="-561" y="-34">1</label>
  108.         </transition>
  109.         <transition>
  110.             <source ref="id9"/>
  111.             <target ref="id10"/>
  112.             <label kind="guard" x="-645" y="-26">time &gt;= 40</label>
  113.             <label kind="synchronisation" x="-645" y="-9">car?</label>
  114.         </transition>
  115.     </template>
  116.     <template>
  117.         <name>Train</name>
  118.         <location id="id11" x="-323" y="119">
  119.             <name x="-333" y="85">NoDelay</name>
  120.         </location>
  121.         <location id="id12" x="-323" y="-8">
  122.             <name x="-323" y="-42">TrainHasDelay</name>
  123.             <label kind="invariant" x="-333" y="9">time &lt;= 75</label>
  124.         </location>
  125.         <location id="id13" x="-323" y="-127">
  126.             <name x="-333" y="-161">TrainDoesNotDrive</name>
  127.         </location>
  128.         <location id="id14" x="-561" y="-8">
  129.             <name x="-637" y="-34">GetInTrain</name>
  130.         </location>
  131.         <branchpoint id="id15" x="-476" y="-8">
  132.         </branchpoint>
  133.         <init ref="id14"/>
  134.         <transition>
  135.             <source ref="id11"/>
  136.             <target ref="id14"/>
  137.             <label kind="assignment" x="-501" y="119">arrived = true</label>
  138.             <nail x="-561" y="119"/>
  139.         </transition>
  140.         <transition>
  141.             <source ref="id12"/>
  142.             <target ref="id14"/>
  143.             <label kind="guard" x="-493" y="-323">time &gt;= 50</label>
  144.             <label kind="assignment" x="-493" y="-306">tooLate = true,
  145. arrived = true</label>
  146.             <nail x="-127" y="-8"/>
  147.             <nail x="-127" y="-238"/>
  148.             <nail x="-722" y="-238"/>
  149.             <nail x="-722" y="-8"/>
  150.         </transition>
  151.         <transition>
  152.             <source ref="id13"/>
  153.             <target ref="id14"/>
  154.             <label kind="assignment" x="-510" y="-153">arrived = false</label>
  155.             <nail x="-561" y="-127"/>
  156.         </transition>
  157.         <transition>
  158.             <source ref="id15"/>
  159.             <target ref="id11"/>
  160.             <label kind="probability" x="-416" y="59">89</label>
  161.         </transition>
  162.         <transition>
  163.             <source ref="id15"/>
  164.             <target ref="id12"/>
  165.             <label kind="probability" x="-416" y="-8">10</label>
  166.         </transition>
  167.         <transition>
  168.             <source ref="id15"/>
  169.             <target ref="id13"/>
  170.             <label kind="probability" x="-416" y="-85">1</label>
  171.         </transition>
  172.         <transition>
  173.             <source ref="id14"/>
  174.             <target ref="id15"/>
  175.             <label kind="guard" x="-543" y="-42">time &gt;= 45</label>
  176.             <label kind="synchronisation" x="-543" y="-25">train?</label>
  177.         </transition>
  178.     </template>
  179.     <system>system Person, Car, Train;
  180.     </system>
  181.     <queries>
  182.         <query>
  183.             <formula>simulate 100 [&lt;=500] { time }
  184.             </formula>
  185.             <comment>
  186.             </comment>
  187.         </query>
  188.     </queries>
  189. </nta>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement