gem-graph-server/debian/var/models/example_II.xml

103 lines
3.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- TODO DTD or XML Schema-->
<gem-graph-model version="0.1">
<!-- Model identity informations -->
<identity>
<name>Model created for testing purposes</name>
<name value="(Three dimers)"/>
<owner>Jean Sirmai</owner>
<owner_id>2</owner_id>
<date>1629830000</date> <!--Warning: it's an arbitrary unchecked date...-->
<version>1.0</version>
</identity>
<!-- Model parameters -->
<parameters id="test" date="1629830000" author="Jean Sirmai">
<modelization>
<max_thread value="0"/> <!--Why "0" ?-->
<max_cycles value="13"/>
</modelization>
<space_param>
<dimension value="1"/>
<size x="39" y="0" z="0"/>
<site_multiplicity value="2"/> <!-- Indicates that there are two sites per cell-->
<boundaries/> <!-- TODO -->
</space_param>
</parameters>
<!-- Model objects definition -->
<objects>
<object id="dimer" date="1629830000" author="Jean Sirmai">
<!-- A dimer is made of two linked adjacent particles.-->
<!-- Site 1 of particle 0 points at east to next particle.-->
<!-- Site 0 of particle 1 points at west to previous particle.-->
<arrow x="0" y="0" z="0" site="0" weight="0"/>
<arrow x="0" y="0" z="0" site="1" weight="1"/>
<arrow x="1" y="0" z="0" site="0" weight="1"/>
<arrow x="1" y="0" z="0" site="1" weight="0"/>
</object>
</objects>
<!-- Space description (initial state) -->
<space id="test" date="1629830000" author="Jean Sirmai">
<arrow x="0" y="0" z="0" site="1" weight="1"/>
<arrow x="1" y="0" z="0" site="0" weight="1"/>
<arrow x="10" y="0" z="0" site="1" weight="1"/>
<arrow x="11" y="0" z="0" site="0" weight="1"/>
<arrow x="20" y="0" z="0" site="1" weight="1"/>
<arrow x="21" y="0" z="0" site="0" weight="1"/>
<!-- three dimers have been defined-->
</space>
<!-- Saved space description (saved states) -->
<savestates id="test" date="1629830000" author="Jean Sirmai">
<space id="test" date="1629830000" author="Jean Sirmai">
</space>
</savestates>
<!-- Model transitions definition (rules) -->
<transitions id="test" date="1629830000" author="Jean Sirmai">
<transition id="0" date="1629830000" author="Jean Sirmai" probability="1"> <!-- moves a dimer to east-->
<if>
<arrow x="0" y="0" z="0" site="1" weight="1"/>
<arrow x="1" y="0" z="0" site="0" weight="1"/> <!-- a dimer is identified-->
<!-- the local space origin is its "west" particule-->
<arrow x="2" y="0" z="0" site="1" weight="0"/> <!-- the east location next this dimer is empty-->
<arrow x="3" y="0" z="0" site="0" weight="0"/> <!-- In this very simple model, I do not need to check this condition-->
</if>
<then> <!-- Therefore I can (and I want to) move it to its next east location-->
<arrow x="0" y="0" z="0" site="1" weight="0"/>
<arrow x="1" y="0" z="0" site="0" weight="0"/> <!-- The identified dimer no more exists ( :-(( -->
<arrow x="1" y="0" z="0" site="1" weight="1"/>
<arrow x="2" y="0" z="0" site="0" weight="1"/> <!-- Happily, it is now rebuilt at its east location ( ;-))-->
</then>
</transition>
</transitions>
<!-- Non context-specific tags -->
<ref id="Best reference!" date="1629830000" author="Jean Sirmai" lang="fr">
https://www.a-lec.org
</ref>
<quote>This is a quote.</quote>
</gem-graph-model>