Skip to content
Snippets Groups Projects
Select Git revision
  • ab759f53f3c2bcb546a5d3c34d7cea6a7ce90244
  • master default protected
2 results

cobot1.xml

Blame
  • CS's avatar
    Christoph Schröter authored
    a87d8246
    History
    cobot1.xml 5.33 KiB
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE nta PUBLIC '-//Uppaal Team//DTD Flat System 1.1//EN' 'http://www.it.uu.se/research/group/darts/uppaal/flat-1_2.dtd'>
    <nta>
    	<declaration>// Place global declarations here.
    int retry_count = 0;
    int init_retry_count = 0;
    chan pressed;
    chan pickup_fail, pickup_success, move_fail, move_success;</declaration>
    	<template>
    		<name>press</name>
    		<location id="id0" x="-3153" y="-3026">
    		</location>
    		<location id="id1" x="-3017" y="-2983">
    		</location>
    		<init ref="id0"/>
    		<transition>
    			<source ref="id0"/>
    			<target ref="id1"/>
    			<label kind="synchronisation" x="-3119" y="-3034">pressed!</label>
    		</transition>
    	</template>
    	<template>
    		<name>move</name>
    		<location id="id2" x="-612" y="-68">
    		</location>
    		<init ref="id2"/>
    		<transition>
    			<source ref="id2"/>
    			<target ref="id2"/>
    			<label kind="synchronisation" x="-646" y="51">move_fail!</label>
    			<nail x="-663" y="42"/>
    			<nail x="-535" y="59"/>
    		</transition>
    		<transition>
    			<source ref="id2"/>
    			<target ref="id2"/>
    			<label kind="synchronisation" x="-653" y="-237">move_success!</label>
    			<nail x="-671" y="-229"/>
    			<nail x="-501" y="-212"/>
    		</transition>
    	</template>
    	<template>
    		<name>pickup</name>
    		<location id="id3" x="0" y="0">
    		</location>
    		<init ref="id3"/>
    		<transition>
    			<source ref="id3"/>
    			<target ref="id3"/>
    			<label kind="synchronisation" x="-34" y="102">pickup_fail!</label>
    			<nail x="-76" y="93"/>
    			<nail x="110" y="76"/>
    		</transition>
    		<transition>
    			<source ref="id3"/>
    			<target ref="id3"/>
    			<label kind="synchronisation" x="-109" y="-93">pickup_success!</label>
    			<nail x="-127" y="-153"/>
    			<nail x="136" y="-102"/>
    		</transition>
    	</template>
    	<template>
    		<name x="5" y="5">Cobot</name>
    		<declaration>// Place local declarations here.</declaration>
    		<location id="id4" x="-102" y="42">
    			<name x="-112" y="8">waiting</name>
    		</location>
    		<location id="id5" x="204" y="68">
    			<name x="170" y="85">pick_bottle</name>
    		</location>
    		<location id="id6" x="595" y="42">
    			<name x="544" y="59">move_to_glass</name>
    		</location>
    		<location id="id7" x="1020" y="59">
    			<name x="926" y="68">start_pour</name>
    		</location>
    		<location id="id8" x="442" y="-119">
    			<name x="399" y="-153">shut_down</name>
    		</location>
    		<location id="id9" x="918" y="289">
    			<name x="867" y="314">stop_pour</name>
    		</location>
    		<location id="id10" x="442" y="289">
    			<name x="399" y="314">place_bottle</name>
    		</location>
    		<init ref="id4"/>
    		<transition>
    			<source ref="id9"/>
    			<target ref="id10"/>
    			<label kind="synchronisation" x="595" y="263">move_success?</label>
    		</transition>
    		<transition>
    			<source ref="id9"/>
    			<target ref="id8"/>
    			<label kind="guard" x="1181" y="0">retry_count == 1</label>
    			<label kind="synchronisation" x="1232" y="-25">pickup_fail?</label>
    			<nail x="1436" y="-93"/>
    		</transition>
    		<transition>
    			<source ref="id9"/>
    			<target ref="id9"/>
    			<label kind="guard" x="1071" y="323">retry_count &gt; 1</label>
    			<label kind="synchronisation" x="1079" y="306">move_fail?</label>
    			<label kind="assignment" x="1062" y="340">retry_count--</label>
    			<nail x="1096" y="246"/>
    			<nail x="1037" y="382"/>
    		</transition>
    		<transition>
    			<source ref="id7"/>
    			<target ref="id9"/>
    			<label kind="synchronisation" x="884" y="102">move_success?</label>
    			<label kind="assignment" x="765" y="119">retry_count = init_retry_count</label>
    		</transition>
    		<transition>
    			<source ref="id7"/>
    			<target ref="id7"/>
    			<label kind="synchronisation" x="969" y="-42">move_fail?</label>
    			<nail x="918" y="-25"/>
    			<nail x="1139" y="-25"/>
    		</transition>
    		<transition>
    			<source ref="id6"/>
    			<target ref="id7"/>
    			<label kind="synchronisation" x="714" y="25">move_success?</label>
    		</transition>
    		<transition>
    			<source ref="id6"/>
    			<target ref="id6"/>
    			<label kind="synchronisation" x="544" y="-51">move_fail?</label>
    			<nail x="518" y="-8"/>
    			<nail x="637" y="-25"/>
    		</transition>
    		<transition>
    			<source ref="id5"/>
    			<target ref="id8"/>
    			<label kind="guard" x="280" y="-102">retry_count == 1</label>
    			<label kind="synchronisation" x="306" y="-119">pickup_fail?</label>
    		</transition>
    		<transition>
    			<source ref="id5"/>
    			<target ref="id6"/>
    			<label kind="synchronisation" x="365" y="25">pickup_success?</label>
    		</transition>
    		<transition>
    			<source ref="id5"/>
    			<target ref="id5"/>
    			<label kind="guard" x="110" y="-102">retry_count &gt; 1</label>
    			<label kind="synchronisation" x="110" y="-85">pickup_fail?</label>
    			<label kind="assignment" x="110" y="-68">retry_count--</label>
    			<nail x="127" y="-25"/>
    			<nail x="289" y="-42"/>
    		</transition>
    		<transition>
    			<source ref="id4"/>
    			<target ref="id5"/>
    			<label kind="select" x="-85" y="68">i : int[1,5]</label>
    			<label kind="synchronisation" x="-85" y="102">pressed?</label>
    			<label kind="assignment" x="-85" y="119">init_retry_count = i, retry_count = init_retry_count</label>
    		</transition>
    	</template>
    	<system>// Place template instantiations here.
    // List one or more processes to be composed into a system.
    system Cobot, press, move, pickup;
        </system>
    	<queries>
    		<query>
    			<formula></formula>
    			<comment></comment>
    		</query>
    	</queries>
    </nta>