${var_name} = BLOC (condition=" '${var_name}' in set(SELECTION) ",
${var_name}_data = FACT(statut = "o",
Scheduler = SIMP(statut = "f", typ = "TXM"),
+ Info = SIMP(statut = "f", typ = "TXM"),
NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("pyscript", "userfile")),
PythonScript = BLOC (condition = " NodeType == 'pyscript' ",
Value = SIMP(statut = "o", typ = "TXM")
for name, size in zip(OutputVariablesNames, OutputVariablesSizes):
assim_study.setOutputVariable(name, size)
+if has_observers:
+ # Adding observers to the study
+ for observer_name in observers.keys():
+ scheduler = ""
+ info = ""
+ if "scheduler" in observers[observer_name].keys():
+ scheduler = observers[observer_name]["scheduler"]
+ if "info" in observers[observer_name].keys():
+ scheduler = observers[observer_name]["info"]
+ assim_study.addObserver(observer_name, scheduler, info)
Study = assim_study
]]>
scheduler_key_name = observer_eficas_name + "Scheduler"
if scheduler_key_name in self.dictMCVal.keys():
observers[observer]["scheduler"] = self.dictMCVal[scheduler_key_name]
+ # Info
+ info_key_name = observer_eficas_name + "Info"
+ if info_key_name in self.dictMCVal.keys():
+ observers[observer]["info"] = self.dictMCVal[info_key_name]
self.OutputVariables = {}
self.InputVariablesOrder = []
self.OutputVariablesOrder = []
+ self.observers_dict = {}
self.debug = debug
if self.debug:
elif self.ObservationOperatorType[Name] == "Function":
self.FunctionObservationOperator[Name] = ObservationOperator
+ def addObserver(self, name, scheduler, info):
+ observers_dict[name] = {}
+ observers_dict[name]["scheduler"] = scheduler
+ observers_dict[name]["info"] = info
+
+ def getObservers(self):
+ return self.observers_dict