Ver código fonte

actually fixed selector for DCP implementation

Snej69420 7 meses atrás
pai
commit
2cb252faa6

+ 4 - 1
pythonpdevs2.4.2/src/pypdevs/DEVS.py

@@ -728,7 +728,7 @@ class RootDEVS(BaseDEVS):
         """
         Basic constructor.
 
-        :param components: the atomic DEVS models that are the cildren, only those that are ran locally should be mentioned
+        :param components: the atomic DEVS models that are the children, only those that are ran locally should be mentioned
         :param models: all models that have to be passed to the scheduler, thus all models, even non-local ones
         :param scheduler_type: type of scheduler to use (string representation)
         """
@@ -765,15 +765,18 @@ class RootDEVS(BaseDEVS):
 
         # Rebuild the routes for the affected ports
         if self.routing_mode == "memoised":
+            # print("Using 100% of the BRAIN")
             for p in unique_worklist:
                 p.cached_routes = None
             for p in unique_worklist:
                 directConnectPortMem(p, self.listeners)
 
         elif self.routing_mode == "old":
+            # print("OLD AF")
             for p in unique_worklist:
                 directConnectPortOLD(p, self.listeners)
         else:
+            # print("Kankerzooi")
             for p in unique_worklist:
                 directConnectPort(p, self.listeners)
 

+ 2 - 2
pythonpdevs2.4.2/src/pypdevs/basesimulator.py

@@ -1029,8 +1029,8 @@ class BaseSimulator(Solver):
         self.memoization = memoization
 
         self.routing_mode = routing_mode
-        if hasattr(self, 'root_model') and self.root_model is not None:
-            self.root_model.routing_mode = routing_mode
+        if hasattr(self, 'model') and self.model is not None:
+            self.model.routing_mode = routing_mode
 
     def processMessage(self, clock):
         """