renommages (savedstates, states / spaces, no axis "time")
This commit is contained in:
parent
de7f61e156
commit
0f436bd8d6
|
@ -2,9 +2,9 @@
|
||||||
<gem-graph-model version="0.2.1">
|
<gem-graph-model version="0.2.1">
|
||||||
|
|
||||||
<identity>
|
<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>
|
<owner_id>2</owner_id>
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@
|
||||||
|
|
||||||
<version>1.0</version>
|
<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>
|
</identity>
|
||||||
|
|
||||||
<parameters id="texte" date="0" author="Léontine Trottine.">
|
<parameters id="texte" date="0" author="Léontine qui trottine.">
|
||||||
<simulation>
|
<simulation>
|
||||||
<max_thread>0</max_thread>
|
<max_thread>0</max_thread>
|
||||||
<max_cycles>9</max_cycles>
|
<max_cycles>9</max_cycles>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<!-- Saved space description (initial space is sequence 0) -->
|
<!-- Saved space description (initial space is sequence 0) -->
|
||||||
|
|
||||||
<savedstates id="texte" date="1630000000" author="Qui courrait dans l'herbe'">
|
<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="1" weight="1" x="0"/>
|
||||||
<arrow site="2" weight="1" x="1"/>
|
<arrow site="2" weight="1" x="1"/>
|
||||||
<arrow site="1" weight="1" x="10"/>
|
<arrow site="1" weight="1" x="10"/>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<!-- Three dimers 1-1 are drawn in the global space
|
<!-- Three dimers 1-1 are drawn in the global space
|
||||||
at locations (0,1) (10,11) and (20,21) -->
|
at locations (0,1) (10,11) and (20,21) -->
|
||||||
|
|
||||||
</state>
|
</space>
|
||||||
|
|
||||||
</savedstates>
|
</savedstates>
|
||||||
|
|
||||||
|
|
|
@ -10,18 +10,21 @@
|
||||||
<xs:attribute name="owner" type="xs:string"/>
|
<xs:attribute name="owner" type="xs:string"/>
|
||||||
<xs:attribute name="owner_id" type="xs:integer"/>
|
<xs:attribute name="owner_id" type="xs:integer"/>
|
||||||
<xs:attribute name="author" type="xs:string"/>
|
<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="probability" type="xs:integer"/>
|
||||||
<xs:attribute name="site" type="xs:integer" default="0"/>
|
<xs:attribute name="site" type="xs:integer" default="0"/>
|
||||||
<xs:attribute name="weight" 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="u" type="xs:integer"/>
|
||||||
<xs:attribute name="v" type="xs:integer"/>
|
<xs:attribute name="v" type="xs:integer"/>
|
||||||
<xs:attribute name="w" type="xs:integer"/>
|
<xs:attribute name="w" type="xs:integer"/>
|
||||||
<xs:attribute name="x" type="xs:integer"/>
|
<xs:attribute name="x" type="xs:integer"/>
|
||||||
<xs:attribute name="y" type="xs:integer"/>
|
<xs:attribute name="y" type="xs:integer"/>
|
||||||
<xs:attribute name="z" type="xs:integer"/>
|
<xs:attribute name="z" type="xs:integer"/>
|
||||||
<xs:attribute name="t" type="xs:integer"/>
|
|
||||||
|
|
||||||
|
|
||||||
<xs:attributeGroup name="id_date_author">
|
<xs:attributeGroup name="id_date_author">
|
||||||
<xs:attribute ref="id"/>
|
<xs:attribute ref="id"/>
|
||||||
|
@ -50,7 +53,6 @@
|
||||||
<xs:attribute ref="x" use="optional"/>
|
<xs:attribute ref="x" use="optional"/>
|
||||||
<xs:attribute ref="y" use="optional"/>
|
<xs:attribute ref="y" use="optional"/>
|
||||||
<xs:attribute ref="z" use="optional"/>
|
<xs:attribute ref="z" use="optional"/>
|
||||||
<xs:attribute ref="t" use="optional"/>
|
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
|
@ -64,7 +66,6 @@
|
||||||
<xs:attribute ref="x" use="optional"/>
|
<xs:attribute ref="x" use="optional"/>
|
||||||
<xs:attribute ref="y" use="optional"/>
|
<xs:attribute ref="y" use="optional"/>
|
||||||
<xs:attribute ref="z" use="optional"/>
|
<xs:attribute ref="z" use="optional"/>
|
||||||
<xs:attribute ref="t" use="optional"/>
|
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
|
@ -80,11 +81,10 @@
|
||||||
<xs:attribute ref="x" use="optional"/>
|
<xs:attribute ref="x" use="optional"/>
|
||||||
<xs:attribute ref="y" use="optional"/>
|
<xs:attribute ref="y" use="optional"/>
|
||||||
<xs:attribute ref="z" use="optional"/>
|
<xs:attribute ref="z" use="optional"/>
|
||||||
<xs:attribute ref="t" use="optional"/>
|
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name="state">
|
<xs:element name="space">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||||
<xs:element ref="arrow"/>
|
<xs:element ref="arrow"/>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name="object" substitutionGroup="state"/>
|
<xs:element name="object" substitutionGroup="space"/>
|
||||||
|
|
||||||
<xs:element name="transition">
|
<xs:element name="transition">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
<xs:element name="savedstates">
|
<xs:element name="savedstates">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||||
<xs:element ref="state"/>
|
<xs:element ref="space"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attributeGroup ref="id_date_author"/>
|
<xs:attributeGroup ref="id_date_author"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
|
@ -32,4 +32,4 @@ builder = Gtk.Builder()
|
||||||
builder.add_from_file(glade_path)
|
builder.add_from_file(glade_path)
|
||||||
|
|
||||||
win = builder.get_object("Appwindow")
|
win = builder.get_object("Appwindow")
|
||||||
win.show_all()
|
win
|
||||||
|
|
14
src/model.py
14
src/model.py
|
@ -225,7 +225,7 @@ class Objects:
|
||||||
def get_object(self, i):
|
def get_object(self, i):
|
||||||
return self.__objects[i]
|
return self.__objects[i]
|
||||||
|
|
||||||
## Savestates
|
## Savedstates
|
||||||
|
|
||||||
|
|
||||||
class Space:
|
class Space:
|
||||||
|
@ -241,7 +241,7 @@ class Space:
|
||||||
return self.__arrows[i]
|
return self.__arrows[i]
|
||||||
|
|
||||||
|
|
||||||
class Savestates:
|
class Savedstates:
|
||||||
__space = []
|
__space = []
|
||||||
|
|
||||||
def __init__(self, node):
|
def __init__(self, node):
|
||||||
|
@ -379,8 +379,8 @@ class Model:
|
||||||
self.__parameters = child
|
self.__parameters = child
|
||||||
if(child.tag == "objects"):
|
if(child.tag == "objects"):
|
||||||
self.__objects = child
|
self.__objects = child
|
||||||
if(child.tag == "savestates"):
|
if(child.tag == "savedstates"):
|
||||||
self.__savestates = child
|
self.__savedstates = child
|
||||||
if(child.tag == "conditions"):
|
if(child.tag == "conditions"):
|
||||||
self.__conditions = child
|
self.__conditions = child
|
||||||
if(child.tag == "transition"):
|
if(child.tag == "transition"):
|
||||||
|
@ -395,8 +395,8 @@ class Model:
|
||||||
def get_objects(self):
|
def get_objects(self):
|
||||||
return Objects(self.__objects)
|
return Objects(self.__objects)
|
||||||
|
|
||||||
def get_savestates(self):
|
def get_savedstates(self):
|
||||||
return Savestates(self.__savestates)
|
return Savedstates(self.__savedstates)
|
||||||
|
|
||||||
def get_conditions(self):
|
def get_conditions(self):
|
||||||
return Conditions(self.__conditions)
|
return Conditions(self.__conditions)
|
||||||
|
@ -409,6 +409,6 @@ class Model:
|
||||||
|
|
||||||
|
|
||||||
modelPath = "../models/dimers random walk.xml"
|
modelPath = "../models/dimers random walk.xml"
|
||||||
schemaPath = "../schemas/models_0.2.xmls"
|
schemaPath = "../schemas/models_0.2.1.xmls"
|
||||||
|
|
||||||
testmodel = Model(modelPath, schemaPath)
|
testmodel = Model(modelPath, schemaPath)
|
||||||
|
|
Loading…
Reference in New Issue