Explorar o código

Fixed processing of commands when no commands to send ([]) vs. end of phase (None)

Yentl Van Tendeloo %!s(int64=9) %!d(string=hai) anos
pai
achega
ae5d2f8a4e
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      model/model.py

+ 3 - 3
model/model.py

@@ -268,7 +268,7 @@ class ModelverseKernel(AtomicDEVS):
         return {}
 
     def timeAdvance(self):
-        if self.state.commands:
+        if self.state.commands is not None:
             return 0
         elif self.state.waiting:
             return float("inf")
@@ -498,6 +498,6 @@ args = {
 
 model = System(**args)
 sim = Simulator(model)
-sim.setTerminationTime(10000)
-#sim.setVerbose()
+sim.setTerminationTime(20000)
+sim.setVerbose()
 sim.simulate()