<?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 r; // resistance
int[-20,0] t; //temperature
chan o;</declaration>
	<template>
		<name>ResistanceChangeEmulator</name>
		<location id="id0" x="-229" y="-25">
			<name x="-239" y="-59">increase</name>
		</location>
		<location id="id1" x="-34" y="-25">
			<name x="-51" y="-68">decrease</name>
		</location>
		<location id="id2" x="-161" y="-195">
		</location>
		<init ref="id2"/>
		<transition>
			<source ref="id1"/>
			<target ref="id1"/>
			<label kind="guard" x="-16" y="-34">r&gt;600</label>
			<label kind="synchronisation" x="-16" y="-17">o!</label>
			<label kind="assignment" x="-16" y="0">r=r-10</label>
			<nail x="59" y="25"/>
			<nail x="59" y="-51"/>
		</transition>
		<transition>
			<source ref="id1"/>
			<target ref="id0"/>
			<label kind="guard" x="-170" y="34">r&lt;=600</label>
			<label kind="synchronisation" x="-109" y="-17">o!</label>
			<nail x="-127" y="25"/>
		</transition>
		<transition>
			<source ref="id0"/>
			<target ref="id1"/>
			<label kind="guard" x="-161" y="-76">r&gt;=900</label>
			<label kind="synchronisation" x="-211" y="-55">o!</label>
			<nail x="-136" y="-51"/>
		</transition>
		<transition>
			<source ref="id0"/>
			<target ref="id0"/>
			<label kind="guard" x="-434" y="-63">r&lt;900</label>
			<label kind="synchronisation" x="-356" y="-74">o!</label>
			<label kind="assignment" x="-348" y="-59">r=r+10</label>
			<nail x="-374" y="-89"/>
			<nail x="-383" y="38"/>
		</transition>
		<transition>
			<source ref="id2"/>
			<target ref="id0"/>
			<label kind="synchronisation" x="-211" y="-127">o!</label>
			<label kind="assignment" x="-211" y="-110">r=800</label>
		</transition>
	</template>
	<template>
		<name x="5" y="5">CPS</name>
		<declaration>// Place local declarations here.</declaration>
		<location id="id3" x="333" y="93">
			<name x="323" y="110">minus_0</name>
		</location>
		<location id="id4" x="144" y="110">
			<name x="134" y="76">minus_10</name>
		</location>
		<location id="id5" x="-51" y="93">
			<name x="-119" y="110">minus_20</name>
		</location>
		<location id="id6" x="127" y="-93">
		</location>
		<init ref="id6"/>
		<transition>
			<source ref="id3"/>
			<target ref="id3"/>
			<label kind="guard" x="374" y="68">r&gt;761</label>
			<label kind="synchronisation" x="399" y="85">o?</label>
			<nail x="433" y="119"/>
			<nail x="408" y="25"/>
		</transition>
		<transition>
			<source ref="id4"/>
			<target ref="id4"/>
			<label kind="guard" x="127" y="238">r&gt;=698 and r&lt;802</label>
			<label kind="synchronisation" x="170" y="255">o?</label>
			<nail x="110" y="229"/>
			<nail x="195" y="238"/>
		</transition>
		<transition>
			<source ref="id5"/>
			<target ref="id5"/>
			<label kind="guard" x="-152" y="64">r&lt;=733</label>
			<label kind="synchronisation" x="-160" y="89">o?</label>
			<nail x="-144" y="17"/>
			<nail x="-178" y="119"/>
		</transition>
		<transition>
			<source ref="id6"/>
			<target ref="id3"/>
			<label kind="guard" x="238" y="-25">r&gt;=802</label>
			<label kind="synchronisation" x="238" y="110">o?</label>
			<label kind="assignment" x="255" y="0">t=0</label>
		</transition>
		<transition>
			<source ref="id6"/>
			<target ref="id4"/>
			<label kind="guard" x="68" y="17">r&gt;733 and r&lt;802</label>
			<label kind="synchronisation" x="135" y="-9">o?</label>
			<label kind="assignment" x="144" y="34">t=-10</label>
		</transition>
		<transition>
			<source ref="id4"/>
			<target ref="id5"/>
			<label kind="guard" x="8" y="187">r&lt;698</label>
			<label kind="synchronisation" x="8" y="221">o?</label>
			<label kind="assignment" x="8" y="204">t=-20</label>
			<nail x="51" y="170"/>
		</transition>
		<transition>
			<source ref="id3"/>
			<target ref="id4"/>
			<label kind="guard" x="238" y="187">r&lt;761</label>
			<label kind="synchronisation" x="255" y="161">o?</label>
			<label kind="assignment" x="238" y="204">t=-10</label>
			<nail x="255" y="161"/>
		</transition>
		<transition>
			<source ref="id4"/>
			<target ref="id3"/>
			<label kind="guard" x="229" y="76">r&gt;802</label>
			<label kind="synchronisation" x="272" y="25">o?</label>
			<label kind="assignment" x="238" y="93">t=0</label>
			<nail x="245" y="64"/>
		</transition>
		<transition>
			<source ref="id5"/>
			<target ref="id4"/>
			<label kind="guard" x="34" y="68">r&gt;733</label>
			<label kind="synchronisation" x="34" y="93">o?</label>
			<label kind="assignment" x="34" y="85">t=-10</label>
			<nail x="51" y="59"/>
		</transition>
		<transition>
			<source ref="id6"/>
			<target ref="id5"/>
			<label kind="guard" x="-33" y="-34">r&lt;=733</label>
			<label kind="synchronisation" x="-33" y="-17">o?</label>
			<label kind="assignment" x="-33" y="0">t=-20</label>
		</transition>
	</template>
	<system>// Place template instantiations here.
REmulator1 = ResistanceChangeEmulator();
CPS1 = CPS();
// List one or more processes to be composed into a system.
system REmulator1,CPS1;
    </system>
	<queries>
	</queries>
</nta>
