From c684bab6e37dba76a6efe4e82527a9d5e1606c8e Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 8 Dec 2021 23:14:36 +0100 Subject: [PATCH] WIP : erratic --- --- models/dimers random walk.xml | 12 ++++++------ schemas/models_0.2.1.xmls | 2 +- src/model.py | 18 +++++++++++------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/models/dimers random walk.xml b/models/dimers random walk.xml index fc65c86..dd1a838 100644 --- a/models/dimers random walk.xml +++ b/models/dimers random walk.xml @@ -12,7 +12,7 @@ 1.0 - C'est qui ?' + Qui ça ?' @@ -53,8 +53,8 @@ - - + + @@ -65,9 +65,9 @@ - + - + @@ -81,7 +81,7 @@ diff --git a/schemas/models_0.2.1.xmls b/schemas/models_0.2.1.xmls index a7b3ef5..669244b 100644 --- a/schemas/models_0.2.1.xmls +++ b/schemas/models_0.2.1.xmls @@ -159,7 +159,7 @@ - + diff --git a/src/model.py b/src/model.py index d2a27d4..e291e26 100644 --- a/src/model.py +++ b/src/model.py @@ -37,7 +37,7 @@ class G_ref: self.node.attrib["lang"] = lang def get_text(self): - return self.node.text + return self.node.textdimension().get_axis def set_text(self, text): self.node.text = text @@ -225,7 +225,7 @@ class Objects: def get_object(self, i): return self.__objects[i] -## Savedstates +## States class Space: @@ -241,7 +241,7 @@ class Space: return self.__arrows[i] -class Savedstates: +class States: __space = [] def __init__(self, node): @@ -379,8 +379,8 @@ class Model: self.__parameters = child if(child.tag == "objects"): self.__objects = child - if(child.tag == "savedstates"): - self.__savedstates = child + if(child.tag == "states"): + self.__states = 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_savedstates(self): - return Savedstates(self.__savedstates) + def get_states(self): + return States(self.__states) def get_conditions(self): return Conditions(self.__conditions) @@ -412,3 +412,7 @@ modelPath = "../models/dimers random walk.xml" schemaPath = "../schemas/models_0.2.1.xmls" testmodel = Model(modelPath, schemaPath) + +state_size = testmodel.get_parameters().spaceparam.get_dimension()#.get_axis(0).get_size() + +print(state_size)