WIP: Struggling to slide through pipeline (I)

This commit is contained in:
Jean Sirmai 2021-12-14 19:45:35 +01:00
parent 5b1e27d670
commit f445d4d534
Signed by: jean
GPG Key ID: FB3115C340E057E3
4 changed files with 500 additions and 0 deletions

View File

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<gem-graph-model version="0.2.1">
<identity>
<name>Chrysalide</name>
<owner>Léontine qui patine</owner>
<owner_id>2</owner_id>
<date>1630000000</date>
<version>1.0</version>
<g_ref id="diff" date="1630000000" author="Léontine" lang="en">Qui ça ?'</g_ref>
</identity>
<parameters id="texte" date="0" author="Léontine qui trottine.">
<simulation>
<max_thread>0</max_thread>
<max_cycles>9</max_cycles>
</simulation>
<space-param>
<!-- loop_on_zero="true" anything moved before zero reenters at the end of space-->
<!-- loop_on_zero="false" anything moved before zero is lost-->
<!-- loop_on_max="true" anything moved beyond max reenters at the zero of space-->
<!-- loop_on_max="false" anything moved beyond max is lost-->
<dimension x="20"/>
<!-- Site_multiplicity = number of sites in a space unit. -->
<!-- Each site points towards a neighbouring space unit. -->
<!-- Several arrows can be stacked in the same site. -->
<site_multiplicity>3</site_multiplicity>
</space-param>
</parameters>
<!-- Model objects definition -->
<objects id="only dimers in this model" date="1630000000" author="inanimés,... âme ?">
<object id="a dimer" date="1630000000" author="Alphonse">
<arrow site="1" weight="1" x="0"/>
<arrow site="2" weight="1" x="1"/>
</object>
</objects>
<!-- Saved space description (initial space is sequence 0) -->
<states id="texte" date="1630000000" author="Here, states are spaces.">
<space id="initial" date="1630000000" author="Une souris verte,">
<arrow site="0" weight="6" x="0"/>
<arrow site="1" weight="1" x="0"/>
<arrow site="2" weight="7" x="1"/>
<arrow site="1" weight="3" x="6"/>
<arrow site="2" weight="1" x="7"/>
<arrow site="1" weight="4" x="14"/>
<arrow site="0" weight="8" x="14"/>
<arrow site="2" weight="5" x="15"/>
<arrow site="1" weight="2" x="17"/>
<arrow site="2" weight="7" x="18"/>
<arrow site="2" weight="9" x="20"/>
<arrow site="0" weight="4" x="20"/>
</space>
</states>
<!-- Model transitions definition (rules) -->
<!-- In this version : <xs:sequence minOccurs="0" maxOccurs="unbounded">-->
<!-- Transitions should be edited by hand and written in a 'human-readable' format -->
<conditions id="random walk of dimers" date="1630000000" author="Zazard le lézard !">
<condition site="1" weight="1" node_id="1" parent="0" x="0"/>
<condition site="2" weight="1" node_id="2" parent="1" x="1"/>
<!-- as soon as conditions 1 and 2 are satisfied, a dimer is identified at atation (0,1). -->
<condition site="1" weight="0" node_id="3" parent="2" x="2"/>
<!-- as soon as condition 3 is satisfied,
the neighbouring space unhit to East of the dimer is empty
and the dimer identified by conditions (1,2) can be moved to East. -->
<condition site="2" weight="0" node_id="4" parent="2" x="-1"/>
<!-- as soon as condition 4 is satisfied,
the neighbouring space unit to West of the dimer is empty
and the dimer identified by conditions (1,2) can be moved to West. -->
</conditions>
<transitions>
<transition id="move_a_dimer_to_east" date="1630000000" author="Pas moi..."
parent="3" probability="1">
<arrow site="1" weight="0" x="0"/>
<arrow site="2" weight="0" x="1"/>
<arrow site="1" weight="1" x="1"/>
<arrow site="2" weight="1" x="2"/>
</transition>
<transition id="move_a_dimer_to_west" date="1630000000" author="Ni moi !"
parent="4" probability="1">
<arrow site="1" weight="0" x="0"/>
<arrow site="2" weight="0" x="1"/>
<arrow site="2" weight="1" x="0"/>
<arrow site="1" weight="1" x="1"/>
</transition>
</transitions>
</gem-graph-model>

View File

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<gem-graph-model version="0.2.1">
<identity>
<name>Chrysalide</name>
<owner>Léontine qui patine</owner>
<owner_id>2</owner_id>
<date>1630000000</date>
<version>1.0</version>
<g_ref id="diff" date="1630000000" author="Léontine" lang="en">Qui ça ?'</g_ref>
</identity>
<parameters id="texte" date="0" author="Léontine qui trottine.">
<simulation>
<max_thread>0</max_thread>
<max_cycles>9</max_cycles>
</simulation>
<space-param>
<!-- loop_on_zero="true" anything moved before zero reenters at the end of space-->
<!-- loop_on_zero="false" anything moved before zero is lost-->
<!-- loop_on_max="true" anything moved beyond max reenters at the zero of space-->
<!-- loop_on_max="false" anything moved beyond max is lost-->
<dimension x="20"/>
<!-- Site_multiplicity = number of sites in a space unit. -->
<!-- Each site points towards a neighbouring space unit. -->
<!-- Several arrows can be stacked in the same site. -->
<site_multiplicity>3</site_multiplicity>
</space-param>
</parameters>
<!-- Model objects definition -->
<objects id="only dimers in this model" date="1630000000" author="inanimés,... âme ?">
<object id="a dimer" date="1630000000" author="Alphonse">
<arrow site="1" weight="1" x="0"/>
<arrow site="2" weight="1" x="1"/>
</object>
</objects>
<!-- Saved space description (initial space is sequence 0) -->
<states id="texte" date="1630000000" author="Here, states are spaces.">
<space id="initial" date="1630000000" author="Une souris verte,">
<arrow site="0" weight="6" x="0"/>
<arrow site="1" weight="1" x="0"/>
<arrow site="2" weight="7" x="1"/>
<arrow site="1" weight="3" x="6"/>
<arrow site="2" weight="1" x="7"/>
<arrow site="1" weight="4" x="14"/>
<arrow site="0" weight="8" x="14"/>
<arrow site="2" weight="5" x="15"/>
<arrow site="1" weight="2" x="17"/>
<arrow site="2" weight="7" x="18"/>
<arrow site="2" weight="9" x="20"/>
<arrow site="0" weight="4" x="20"/>
</space>
</states>
<!-- Model transitions definition (rules) -->
<!-- In this version : <xs:sequence minOccurs="0" maxOccurs="unbounded">-->
<!-- Transitions should be edited by hand and written in a 'human-readable' format -->
<conditions id="random walk of dimers" date="1630000000" author="Zazard le lézard !">
<condition site="1" weight="1" node_id="1" parent="0" x="0"/>
<condition site="2" weight="1" node_id="2" parent="1" x="1"/>
<!-- as soon as conditions 1 and 2 are satisfied, a dimer is identified at atation (0,1). -->
<condition site="1" weight="0" node_id="3" parent="2" x="2"/>
<!-- as soon as condition 3 is satisfied,
the neighbouring space unhit to East of the dimer is empty
and the dimer identified by conditions (1,2) can be moved to East. -->
<condition site="2" weight="0" node_id="4" parent="2" x="-1"/>
<!-- as soon as condition 4 is satisfied,
the neighbouring space unit to West of the dimer is empty
and the dimer identified by conditions (1,2) can be moved to West. -->
</conditions>
<transitions>
<transition id="move_a_dimer_to_east" date="1630000000" author="Pas moi..."
parent="3" probability="1">
<arrow site="1" weight="0" x="0"/>
<arrow site="2" weight="0" x="1"/>
<arrow site="1" weight="1" x="1"/>
<arrow site="2" weight="1" x="2"/>
</transition>
<transition id="move_a_dimer_to_west" date="1630000000" author="Ni moi !"
parent="4" probability="1">
<arrow site="1" weight="0" x="0"/>
<arrow site="2" weight="0" x="1"/>
<arrow site="2" weight="1" x="0"/>
<arrow site="1" weight="1" x="1"/>
</transition>
</transitions>
</gem-graph-model>

64
models/user-model.py Normal file
View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<gem-graph-model version="0.2.1">
<identity>
<name>Chrysalide</name>
<owner>Léontine qui patine</owner>
<owner_id>2</owner_id>
<date>1630000000</date>
<version>1.0</version>
<g_ref id="diff" date="1630000000" author="Léontine" lang="en">Qui ça ?'</g_ref>
</identity>
<!-- Model transitions definition (rules) -->
<!-- In this version : <xs:sequence minOccurs="1" maxOccurs="unbounded">-->
<!-- Transitions should be edited by hand and written in a 'human-readable' format -->
<conditions id="random walk of dimers" date="1630000000" author="Zazard le lézard !">
<condition site="1" weight="1" node_id="1" parent="0" x="0"/>
<condition site="2" weight="1" node_id="2" parent="1" x="1"/>
<!-- as soon as conditions 1 and 2 are satisfied, a dimer is identified at location (0,1). -->
<condition site="1" weight="0" node_id="3" parent="2" x="2"/>
<!-- as soon as condition 3 is satisfied,
the neighbouring space unhit to East of the dimer is empty
and the dimer identified by conditions (1,2) can be moved to East. -->
<condition site="2" weight="0" node_id="4" parent="2" x="-1"/>
<!-- as soon as condition 4 is satisfied,
the neighbouring space unit to West of the dimer is empty
and the dimer identified by conditions (1,2) can be moved to West. -->
</conditions>
<transitions>
<transition id="move_a_dimer_to_east" date="1630000000" author="Pas moi..."
parent="3" probability="1">
<arrow site="1" weight="0" x="0"/>
<arrow site="2" weight="0" x="1"/>
<arrow site="1" weight="1" x="1"/>
<arrow site="2" weight="1" x="2"/>
</transition>
<transition id="move_a_dimer_to_west" date="1630000000" author="Ni moi !"
parent="4" probability="1">
<arrow site="1" weight="0" x="0"/>
<arrow site="2" weight="0" x="1"/>
<arrow site="2" weight="1" x="0"/>
<arrow site="1" weight="1" x="1"/>
</transition>
</transitions>
</gem-graph-model>

View File

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- https://www.freeformatter.com/xml-validator-xsd.html -->
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="node_id" type="xs:integer"/>
<xs:attribute name="parent" type="xs:integer"/>
<xs:attribute name="date" type="xs:integer"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="lang" type="xs:string"/>
<xs:attribute name="owner" type="xs:string"/>
<xs:attribute name="owner_id" type="xs:integer"/>
<xs:attribute name="author" type="xs:string"/>
<xs:attribute name="version" type="xs:string"/>
<xs:attribute name="probability" type="xs:integer"/>
<xs:attribute name="site" type="xs:integer" default="0"/>
<xs:attribute name="weight" type="xs:integer" default="0"/>
<!-- As it may be understand as 'time',
name "t" should not be used as an axis name :
in space phases models, time cannot be an axis -->
<xs:attribute name="u" type="xs:integer"/>
<xs:attribute name="v" type="xs:integer"/>
<xs:attribute name="w" type="xs:integer"/>
<xs:attribute name="x" type="xs:integer"/>
<xs:attribute name="y" type="xs:integer"/>
<xs:attribute name="z" type="xs:integer"/>
<xs:attributeGroup name="id_date_author">
<xs:attribute ref="id"/>
<xs:attribute ref="date"/>
<xs:attribute ref="author"/>
</xs:attributeGroup>
<xs:element name="g_ref">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attributeGroup ref="id_date_author"/>
<xs:attribute ref="lang" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="quote" substitutionGroup="g_ref"/>
<xs:element name="dimension">
<xs:complexType>
<xs:attribute ref="u" use="optional"/>
<xs:attribute ref="v" use="optional"/>
<xs:attribute ref="w" use="optional"/>
<xs:attribute ref="x" use="optional"/>
<xs:attribute ref="y" use="optional"/>
<xs:attribute ref="z" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="arrow">
<xs:complexType>
<xs:attribute ref="site" use="required"/>
<xs:attribute ref="weight" use="required"/>
<xs:attribute ref="u" use="optional"/>
<xs:attribute ref="v" use="optional"/>
<xs:attribute ref="w" use="optional"/>
<xs:attribute ref="x" use="optional"/>
<xs:attribute ref="y" use="optional"/>
<xs:attribute ref="z" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="condition">
<xs:complexType>
<xs:attribute ref="site" use="required"/>
<xs:attribute ref="weight" use="required"/>
<xs:attribute ref="node_id" use="required"/>
<xs:attribute ref="parent" use="required"/>
<xs:attribute ref="u" use="optional"/>
<xs:attribute ref="v" use="optional"/>
<xs:attribute ref="w" use="optional"/>
<xs:attribute ref="x" use="optional"/>
<xs:attribute ref="y" use="optional"/>
<xs:attribute ref="z" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="space">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element ref="arrow"/>
</xs:sequence>
<xs:attributeGroup ref="id_date_author"/>
</xs:complexType>
</xs:element>
<xs:element name="object" substitutionGroup="space"/>
<xs:element name="transition">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element minOccurs="0" ref="quote"/>
<xs:element ref="arrow"/>
</xs:sequence>
<xs:attributeGroup ref="id_date_author"/>
<xs:attribute ref="parent" use="required"/>
<xs:attribute ref="probability" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="gem-graph-model">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="identity">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="name" type="xs:string"/>
<xs:element name="owner" type="xs:string"/>
<xs:element name="owner_id" type="xs:integer"/>
<xs:element name="date" type="xs:integer"/>
<xs:element name="version" type="xs:float"/>
<xs:element ref="g_ref" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="parameters">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="simulation">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="max_thread" type="xs:integer"/>
<xs:element name="max_cycles" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="space-param">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element ref="dimension"/>
<xs:element name="site_multiplicity" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="id_date_author"/>
</xs:complexType>
</xs:element>
<xs:element name="objects">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element ref="object"/>
</xs:sequence>
<xs:attributeGroup ref="id_date_author"/>
</xs:complexType>
</xs:element>
<xs:element name="states">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="space"/>
</xs:sequence>
<xs:attributeGroup ref="id_date_author"/>
</xs:complexType>
</xs:element>
<xs:element name="conditions">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element minOccurs="0" ref="quote"/>
<xs:element ref="condition"/>
</xs:sequence>
<xs:attributeGroup ref="id_date_author"/>
</xs:complexType>
</xs:element>
<xs:element name="transitions">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="transition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute ref="version" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>