|
@@ -326,14 +326,14 @@ class ModelverseInterface(AtomicDEVS):
|
|
|
self.state.init = False
|
|
|
while self.state.operations:
|
|
|
i = self.state.operations[0]
|
|
|
- if isinstance(i, int) and i not in self.memory:
|
|
|
+ if isinstance(i, int) and i not in self.state.memory:
|
|
|
break
|
|
|
self.state.operations.pop(0)
|
|
|
return self.state
|
|
|
|
|
|
def extTransition(self, inputs):
|
|
|
for inp in inputs[self.from_mvk]:
|
|
|
- if inp["value"] == "None" and isinstance(self.state.processing[0], int) and self.state.processing[0] not in self.memory:
|
|
|
+ if inp["value"] == "None" and isinstance(self.state.processing[0], int) and self.state.processing[0] not in self.state.memory:
|
|
|
self.state.memory[self.state.processing.pop(0)] = int(inp["id"])
|
|
|
else:
|
|
|
self.state.output.append(inp)
|
|
@@ -345,7 +345,7 @@ class ModelverseInterface(AtomicDEVS):
|
|
|
def timeAdvance(self):
|
|
|
if self.state.init:
|
|
|
return 0
|
|
|
- elif self.state.processing and (not isinstance(self.state.processing[0], int) or self.state.processing[0] in self.memory):
|
|
|
+ elif self.state.processing and (not isinstance(self.state.processing[0], int) or self.state.processing[0] in self.state.memory):
|
|
|
return 0
|
|
|
else:
|
|
|
return float("inf")
|