renommages (savedstates, states / spaces, no axis "time")

This commit is contained in:
Jean Sirmai 2021-12-08 19:57:49 +01:00
parent de7f61e156
commit 0f436bd8d6
Signed by: jean
GPG Key ID: FB3115C340E057E3
4 changed files with 23 additions and 23 deletions

View File

@ -2,9 +2,9 @@
<gem-graph-model version="0.2.1">
<identity>
<name>Modèle de test</name>
<name>Chrysalide</name>
<owner>Léontine Patinette</owner>
<owner>Léontine qui patine</owner>
<owner_id>2</owner_id>
@ -12,10 +12,10 @@
<version>1.0</version>
<g_ref id="Cause" date="1630000000" author="toujours" lang="en">Ref</g_ref>
<g_ref id="mééée..." date="1630000000" author="Léontine" lang="en">C'est qui ?'</g_ref>
</identity>
<parameters id="texte" date="0" author="Léontine Trottine.">
<parameters id="texte" date="0" author="Léontine qui trottine.">
<simulation>
<max_thread>0</max_thread>
<max_cycles>9</max_cycles>
@ -54,7 +54,7 @@
<!-- Saved space description (initial space is sequence 0) -->
<savedstates id="texte" date="1630000000" author="Qui courrait dans l'herbe'">
<state id="initial" date="1630000000" author="Une souris verte">
<space id="initial" date="1630000000" author="Une souris verte">
<arrow site="1" weight="1" x="0"/>
<arrow site="2" weight="1" x="1"/>
<arrow site="1" weight="1" x="10"/>
@ -65,7 +65,7 @@
<!-- Three dimers 1-1 are drawn in the global space
at locations (0,1) (10,11) and (20,21) -->
</state>
</space>
</savedstates>

View File

@ -10,18 +10,21 @@
<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:float"/>
<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:attribute name="t" type="xs:integer"/>
<xs:attributeGroup name="id_date_author">
<xs:attribute ref="id"/>
@ -50,7 +53,6 @@
<xs:attribute ref="x" use="optional"/>
<xs:attribute ref="y" use="optional"/>
<xs:attribute ref="z" use="optional"/>
<xs:attribute ref="t" use="optional"/>
</xs:complexType>
</xs:element>
@ -64,7 +66,6 @@
<xs:attribute ref="x" use="optional"/>
<xs:attribute ref="y" use="optional"/>
<xs:attribute ref="z" use="optional"/>
<xs:attribute ref="t" use="optional"/>
</xs:complexType>
</xs:element>
@ -80,11 +81,10 @@
<xs:attribute ref="x" use="optional"/>
<xs:attribute ref="y" use="optional"/>
<xs:attribute ref="z" use="optional"/>
<xs:attribute ref="t" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="state">
<xs:element name="space">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element ref="arrow"/>
@ -93,7 +93,7 @@
</xs:complexType>
</xs:element>
<xs:element name="object" substitutionGroup="state"/>
<xs:element name="object" substitutionGroup="space"/>
<xs:element name="transition">
<xs:complexType>
@ -162,7 +162,7 @@
<xs:element name="savedstates">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="state"/>
<xs:element ref="space"/>
</xs:sequence>
<xs:attributeGroup ref="id_date_author"/>
</xs:complexType>

View File

@ -32,4 +32,4 @@ builder = Gtk.Builder()
builder.add_from_file(glade_path)
win = builder.get_object("Appwindow")
win.show_all()
win

View File

@ -225,7 +225,7 @@ class Objects:
def get_object(self, i):
return self.__objects[i]
## Savestates
## Savedstates
class Space:
@ -241,7 +241,7 @@ class Space:
return self.__arrows[i]
class Savestates:
class Savedstates:
__space = []
def __init__(self, node):
@ -379,8 +379,8 @@ class Model:
self.__parameters = child
if(child.tag == "objects"):
self.__objects = child
if(child.tag == "savestates"):
self.__savestates = child
if(child.tag == "savedstates"):
self.__savedstates = child
if(child.tag == "conditions"):
self.__conditions = child
if(child.tag == "transition"):
@ -395,8 +395,8 @@ class Model:
def get_objects(self):
return Objects(self.__objects)
def get_savestates(self):
return Savestates(self.__savestates)
def get_savedstates(self):
return Savedstates(self.__savedstates)
def get_conditions(self):
return Conditions(self.__conditions)
@ -409,6 +409,6 @@ class Model:
modelPath = "../models/dimers random walk.xml"
schemaPath = "../schemas/models_0.2.xmls"
schemaPath = "../schemas/models_0.2.1.xmls"
testmodel = Model(modelPath, schemaPath)