Jelajahi Sumber

Added inheritance to PyDEVS + (requiers more testing)

sampieters 1 tahun lalu
induk
melakukan
2c026f2d20
52 mengubah file dengan 62126 tambahan dan 321499 penghapusan
  1. 1 0
      README.md
  2. 91 0
      TraceComparison/Tester.py
  3. 26 0
      TraceComparison/TraceChecker.py
  4. 1 1
      TraceComparison/new_process_tests.py
  5. 0 187
      TraceComparison/process_tests.py
  6. 4 0
      TraceComparison/test.txt
  7. 4917 0
      examples/BouncingBalls/PyDEVS/trace.txt
  8. 54573 320394
      examples/BouncingBalls/Python/trace.txt
  9. 258 9
      examples/BouncingBallsCollision/PyDEVS/target.py
  10. 0 1
      examples/BouncingBallsCollision/Python/target.py
  11. 15 12
      examples/ElevatorBalls/PyDEVS/target.py
  12. 12 0
      examples/Inheritance/PyDEVS/runner.py
  13. 159 0
      examples/Inheritance/PyDEVS/target.py
  14. 160 0
      examples/Inheritance/PyDEVS/the_target.py
  15. 8 0
      examples/Inheritance/Python/runner.py
  16. 128 0
      examples/Inheritance/Python/target.py
  17. 42 0
      examples/Inheritance/sccd.xml
  18. 1 1
      examples/TimerEventloop/PyDEVS/runner.py
  19. 3 4
      examples/TimerEventloop/PyDEVS/target.py
  20. 3 4
      examples/TimerEventloop/Python/target.py
  21. 2 37
      examples/TimerThread/PyDEVS/runner.py
  22. 9 3
      examples/TimerThread/PyDEVS/target.py
  23. 13 6
      sccd/compiler/DEVS_generator.py
  24. 33 2
      sccd/runtime/DEVS_statecharts_core.py
  25. 124 0
      test_output.txt
  26. 2 0
      tests/InputTest/PyDEVS/faulty_log.txt
  27. 124 0
      tests/InputTest/PyDEVS/log.txt
  28. 110 0
      tests/InputTest/PyDEVS/target.py
  29. 1 0
      tests/InputTest/input.txt
  30. 21 0
      tests/InputTest/sccd.xml
  31. 59 22
      tests/Test1/PyDEVS/log.txt
  32. 51 33
      tests/Test10/PyDEVS/log.txt
  33. 39 30
      tests/Test12/PyDEVS/log.txt
  34. 51 42
      tests/Test13/PyDEVS/log.txt
  35. 72 43
      tests/Test14/PyDEVS/log.txt
  36. 72 43
      tests/Test15/PyDEVS/log.txt
  37. 0 1
      tests/Test2/PyDEVS/faulty_log.txt
  38. 50 24
      tests/Test2/PyDEVS/log.txt
  39. 67 41
      tests/Test22/PyDEVS/log.txt
  40. 0 5
      tests/Test3/PyDEVS/faulty_log.txt
  41. 120 39
      tests/Test3/PyDEVS/log.txt
  42. 14 0
      tests/Test3/PyDEVS/runner.py
  43. 0 1
      tests/Test4/PyDEVS/faulty_log.txt
  44. 60 23
      tests/Test4/PyDEVS/log.txt
  45. 0 1
      tests/Test5/PyDEVS/faulty_log.txt
  46. 60 23
      tests/Test5/PyDEVS/log.txt
  47. 0 1
      tests/Test6/PyDEVS/faulty_log.txt
  48. 96 64
      tests/Test6/PyDEVS/log.txt
  49. 0 3
      tests/Test7/PyDEVS/faulty_log.txt
  50. 137 94
      tests/Test7/PyDEVS/log.txt
  51. 78 147
      tests/Test8/PyDEVS/log.txt
  52. 259 158
      tests/Test9/PyDEVS/log.txt

+ 1 - 0
README.md

@@ -99,3 +99,4 @@ python3 runner.py
 ## TODO
 1) How to do in_ui??
 2) Problem with getInstances --> with dissacociate it thinks that it still exists
+3) Nieuwe atomicDEVS tester en coupelen met een coupledDEVS to the new atomicDEVS

+ 91 - 0
TraceComparison/Tester.py

@@ -0,0 +1,91 @@
+import re
+from pypdevs.DEVS import *
+from pypdevs.simulator import Simulator
+from sccd.runtime.DEVS_statecharts_core import Event
+from pypdevs.infinity import INFINITY
+
+import tests.Test3.PyDEVS.target as target
+
+def parse_event(line):
+    # Regular expression to match the desired parts of the line
+    pattern = re.compile(r'\(event name: (.*?); port: (.*?); parameters: (.*?)\)$')
+    match = pattern.match(line)
+    if match:
+        event_name = match.group(1)
+        port = match.group(2)
+        parameters = match.group(3)
+        return event_name, port, parameters
+    else:
+        raise ValueError(f"Line format is incorrect: {line}")
+
+class TesterUnit(AtomicDEVS):
+    def __init__(self, name, inputfile=None):
+        AtomicDEVS.__init__(self, name)
+
+        self.events = []
+        if inputfile is not None:
+            with open(inputfile, 'r') as file:
+                lines = file.readlines()
+            self.events = [line.strip() for line in lines]
+
+        self.total_time = 0
+        self.next_event_time = 0
+
+        self.to_send = []
+
+
+        self.first = True
+    
+    def extTransition(self, inputs):
+        pass
+
+    def intTransition(self):
+        self.total_time += self.next_event_time
+
+        self.to_send = []
+        if self.events:
+            event = self.events[0]
+
+            space_pos = event.find(' ')
+            if space_pos == -1:
+                raise ValueError("Line format is incorrect. No space found to split time and event.")
+            
+            # Extract the time and event parts
+            self.next_event_time = float(event[:space_pos]) - self.total_time
+            event_part = event[space_pos + 1:].strip()  # Strip to remove any leading/trailing whitespace
+
+            name, port, parameters = parse_event(event_part)
+            actual_event = Event(name, port, parameters)
+            self.to_send.append(actual_event)
+
+            self.events = self.events[1:]
+        else:
+            self.next_event_time = INFINITY
+
+    def outputFnc(self):
+        to_output = {}
+        for event in self.to_send:
+            for port in self.OPorts:
+                if event.port == port.name:
+                    #to_output[port] = event
+                    if port in to_output:
+                        to_output[port].append(event)
+                    else:
+                        to_output[port] = [event]
+        return to_output
+
+    def timeAdvance(self):
+        return self.next_event_time
+    
+
+class Tester(CoupledDEVS):
+    def __init__(self, model, inputfile=None):
+        CoupledDEVS.__init__(self, "Tester")
+
+        self.model = self.addSubModel(model)
+        self.tester = self.addSubModel(TesterUnit("Tester", inputfile))
+
+        # Connect to global ports
+        for model_input_ports in self.model.IPorts:
+            an_output = self.tester.addOutPort(name=model_input_ports.name)
+            self.connectPorts(an_output, model_input_ports)

+ 26 - 0
TraceComparison/TraceChecker.py

@@ -3,6 +3,7 @@ import subprocess
 import importlib.util
 import re
 from sccd.runtime.DEVS_loop import DEVSSimulator
+import Tester
 
 def import_target_module(module_name, file_path):
     spec = importlib.util.spec_from_file_location(module_name, file_path)
@@ -165,6 +166,7 @@ class PydevsSCCDTraceChecker(SCCDTraceChecker):
         return result.returncode
 
     def run(self, directory):
+        '''
         pydevs_target = os.path.join(directory, "PyDEVS", "target.py")
         # Dynamically import the target module
         target = import_target_module("target", pydevs_target)
@@ -180,6 +182,30 @@ class PydevsSCCDTraceChecker(SCCDTraceChecker):
         sim.setVerbose(log_file_path)
 
         sim.simulate()
+        '''
+        # Dynamically import the target module
+        pydevs_target = os.path.join(directory, "PyDEVS", "target.py")
+        target = import_target_module("target", pydevs_target)
+
+        # Check if there is an input file
+        input_file = os.path.join(directory, "input.txt")
+        if not os.path.exists(input_file):
+            input_file = None
+
+        test_model = target.Controller("Controller")
+        tester = Tester.Tester(test_model, input_file)
+
+        sim = DEVSSimulator(tester)
+        sim.setRealTime(False)
+        
+        # Create the full path for the log file
+        log_file_path = os.path.join(directory, "PyDEVS", "log.txt")
+
+        # Set verbose to the log file path
+        sim.setVerbose(log_file_path)
+
+        #sim.setClassicDEVS()
+        sim.simulate()
 
     def extract_output_events(self, log_file_path):
         output_events = []

+ 1 - 1
TraceComparison/new_process_tests.py

@@ -31,7 +31,7 @@ if __name__ == '__main__':
     sorted_dirs = sort_directories(tests_directory)
 
     checkers = {
-        "Python": TraceChecker.PythonSCCDTraceChecker(),
+        #"Python": TraceChecker.PythonSCCDTraceChecker(),
         "Pydevs": TraceChecker.PydevsSCCDTraceChecker()
     }
 

+ 0 - 187
TraceComparison/process_tests.py

@@ -1,187 +0,0 @@
-import os
-import re
-import subprocess
-import importlib.util
-from sccd.runtime.DEVS_loop import DEVSSimulator
-
-
-def import_target_module(module_name, file_path):
-    spec = importlib.util.spec_from_file_location(module_name, file_path)
-    module = importlib.util.module_from_spec(spec)
-    spec.loader.exec_module(module)
-    return module
-
-def compile_to_target(test_path, target_dir, tool_name):
-    """
-    Convert sccd.xml to target.py for the specified tool.
-    """
-    sccd_file = os.path.join(test_path, 'sccd.xml')
-    output_file = os.path.join(test_path, target_dir, 'target.py')
-
-    os.makedirs(os.path.join(test_path, target_dir), exist_ok=True)
-
-    command = []
-    if tool_name == "python":
-        command = [
-            "python", 
-            os.path.join("sccd", "compiler", "sccdc.py"), 
-            "-o", output_file, 
-            "-p", "threads", 
-            "-l", tool_name, 
-            sccd_file
-        ]
-    elif tool_name == "pypDEVS":
-        command = [
-            "python", 
-            os.path.join("sccd", "compiler", "sccdc.py"), 
-            "-o", output_file, 
-            "-p", tool_name, 
-            sccd_file
-        ]
-
-    env = os.environ.copy()
-    result = subprocess.run(command, env=env, capture_output=True, text=True)
-    if result.returncode != 0:
-        print(f"Error converting {sccd_file} for {tool_name}: {result.stderr}")
-    return result.returncode
-
-def run_python_sccd(full_directory):
-    python_target = os.path.join(full_directory, "Python", "target.py")
-
-    # Dynamically import the target module
-    target = import_target_module("target", python_target)
-
-    controller = target.Controller()
-    controller.keep_running = False
-
-    # Create the full path for the log file
-    log_file_path = os.path.join(full_directory, "Python", "log.txt")
-
-    # Set verbose to the log file path
-    controller.setVerbose(log_file_path)
-
-    controller.start()
-
-    controller.tracers.stopTracers()
-
-def run_pydevs_sccd(full_directory):
-    pydevs_target = os.path.join(full_directory, "PyDEVS", "target.py")
-    # Dynamically import the target module
-    target = import_target_module("target", pydevs_target)
-    model = target.Controller(name="controller")
-    refs = {"ui": model.in_ui}
-    sim = DEVSSimulator(model, refs)
-    sim.setRealTime(False)
-
-	# Create the full path for the log file
-    log_file_path = os.path.join(full_directory, "PyDEVS", "log.txt")
-
-	# Set verbose to the log file path
-    sim.setVerbose(log_file_path)
-
-    sim.simulate()
-
-def natural_sort_key(s):
-    # Split the string into a list of strings and numbers
-    return [int(text) if text.isdigit() else text.lower() for text in re.split(r'(\d+)', s)]
-
-def extract_pattern(log_file_path, pattern):
-    """
-    Extract lines from a log file that match a given pattern.
-
-    Args:
-        log_file_path (str): Path to the log file.
-        pattern (str): Regular expression pattern to match lines.
-
-    Returns:
-        list: List of matched lines.
-    """
-    with open(log_file_path, 'r') as log_file:
-        lines = log_file.readlines()
-
-    matched_lines = [line.strip() for line in lines if re.search(pattern, line)]
-    return matched_lines
-
-def extract_devs_output_events(log_file_path):
-    pattern = r'^\s*\(event name:.*\)$'
-    return extract_pattern(log_file_path, pattern)
-
-def extract_python_output_events(log_file_path):
-    pattern = r'^\s*\\Event: \(event name:.*\)$'
-    events = extract_pattern(log_file_path, pattern)
-    # Remove everything before '(' in each string
-    return [event[event.index('('):] for event in events]
-
-def check_traces(full_directory):
-    pydevs_log = os.path.join(full_directory, "PyDEVS", "log.txt")
-    python_log = os.path.join(full_directory, "Python", "log.txt")
-
-    pydevs_output_events = extract_devs_output_events(pydevs_log)
-    python_output_events = extract_python_output_events(python_log)
-
-
-    if len(pydevs_output_events) != len(python_output_events):
-        return 0
-
-    if len(pydevs_output_events) == 0 and len(python_output_events) == 0:
-        return 2
-
-    differences_found = False
-    for index, (item1, item2) in enumerate(zip(pydevs_output_events, python_output_events)):
-        if item1 != item2:
-            print(f"Difference at index {index}:")
-            print(f"   List 1 ({len(pydevs_output_events)} elements): {item1}")
-            print(f"   List 2 ({len(python_output_events)} elements): {item2}")
-            differences_found = True
-
-    if differences_found:
-        return 0
-    else:
-        return 1
-
-if __name__ == '__main__':
-    # ANSI color escape codes
-    RED = '\033[91m'    # Red color
-    GREEN = '\033[92m'  # Green color
-    YELLOW = '\033[93m' # Yellow color
-    ENDC = '\033[0m'    # Reset color to default
-
-    tests_directory = "./tests"
-
-    with os.scandir(tests_directory) as entries:
-        sorted_entries = sorted(entries, key=lambda entry: entry.name)
-        sorted_items = [entry.name for entry in sorted_entries]
-    
-    # Read directory names
-    all_test_dirs = [d for d in os.listdir(tests_directory) if os.path.isdir(os.path.join(tests_directory, d))]
-    # Sort the list of directories using natural sort
-    sorted_dirs = sorted(all_test_dirs, key=natural_sort_key)
-    
-    results = []
-    for directory_name in sorted_dirs:
-        full_directory = os.path.join(tests_directory, directory_name)
-        if os.path.isdir(full_directory):
-            print(f"Processing {directory_name}...")
-            if compile_to_target(full_directory, 'Python', 'python') != 0:
-                raise RuntimeError("Could not compile to python model")
-            if compile_to_target(full_directory, 'PyDEVS', 'pypDEVS') != 0:
-                raise RuntimeError("Could not compile to pyDEVS model")
-            run_python_sccd(full_directory)
-            run_pydevs_sccd(full_directory)
-
-            result = check_traces(full_directory)
-            results.append(result)
-
-            if result == 0:
-                print(RED + "Failed" + ENDC)
-            elif result == 1:
-                print(GREEN + "Passed" + ENDC)
-            else:
-                print(YELLOW + "Check deeper" + ENDC)
-
-    # Print summary
-    print("\nTest Summary:")
-    print(f"Passed: {GREEN}{results.count(1)}{ENDC}")
-    print(f"Failed: {RED}{results.count(0)}{ENDC}")
-    print(f"Check deeper: {YELLOW}{results.count(2)}{ENDC}")
-

+ 4 - 0
TraceComparison/test.txt

@@ -0,0 +1,4 @@
+0.00 (event name: new_event; port: ui; parameters: [])
+1.00 (event name: test_event; port: ui; parameters: ['1', '1.00'])
+1.00 (event name: test_event; port: ui; parameters: ['2', '1.00'])
+2.00 (event name: test_event; port: ui; parameters: ['3', '1.00'])

File diff ditekan karena terlalu besar
+ 4917 - 0
examples/BouncingBalls/PyDEVS/trace.txt


File diff ditekan karena terlalu besar
+ 54573 - 320394
examples/BouncingBalls/Python/trace.txt


+ 258 - 9
examples/BouncingBallsCollision/PyDEVS/target.py

@@ -10,6 +10,7 @@ Tkinter frame with bouncing balls in it.
 from sccd.runtime.DEVS_statecharts_core import *
 from sccd.runtime.libs import ui_v2 as ui
 import random
+import numpy as np
 
 CANVAS_DIMS = (800, 550)
 
@@ -214,6 +215,7 @@ class FieldInstance(RuntimeClassBase):
         self.associations = {}
         self.associations["balls"] = Association("Ball", 0, -1)
         self.associations["buttons"] = Association("Button", 0, -1)
+        self.associations["collisions"] = Association("CollisionPhysics", 0, -1)
         self.associations["parent"] = Association("MainApp", 1, 1)
         
         self.semantics.big_step_maximality = StatechartSemantics.TakeMany
@@ -239,12 +241,28 @@ class FieldInstance(RuntimeClassBase):
         self.inports["field_ui"] = port_name
     
     def user_defined_constructor(self):
-        pass
+        self.balls = {}
+        self.collisions = []
     
     def user_defined_destructor(self):
         pass
     
     
+    # user defined method
+    def distance(self, point1, point2):
+        return ((point1['x'] - point2['x']) ** 2 + (point1['y'] - point2['y']) ** 2) ** 0.5
+    
+    
+    # user defined method
+    def check_collision(self, ball1, ball2):
+        # Calculate the distance between the centers of the two balls
+        dist = self.distance(ball1['pos'], ball2['pos'])
+        # Calculate the sum of the radii
+        radii_sum = ball1['r'] + ball2['r']
+        # Check if they are colliding
+        return dist <= radii_sum
+    
+    
     # builds Statechart structure
     def build_statechart_structure(self):
         
@@ -362,16 +380,41 @@ class FieldInstance(RuntimeClassBase):
         self.states["/root/running/main_behaviour/running"].addTransition(_root_running_main_behaviour_running_0)
         
         # transition /root/running/main_behaviour/creating_ball
-        _root_running_main_behaviour_creating_ball_0 = Transition(self, self.states["/root/running/main_behaviour/creating_ball"], [self.states["/root/running/main_behaviour/running"]])
+        _root_running_main_behaviour_creating_ball_0 = Transition(self, self.states["/root/running/main_behaviour/creating_ball"], [self.states["/root/running/main_behaviour/creating_ball"]])
         _root_running_main_behaviour_creating_ball_0.setAction(self._root_running_main_behaviour_creating_ball_0_exec)
         _root_running_main_behaviour_creating_ball_0.setTrigger(Event("instance_created", None))
         self.states["/root/running/main_behaviour/creating_ball"].addTransition(_root_running_main_behaviour_creating_ball_0)
+        _root_running_main_behaviour_creating_ball_1 = Transition(self, self.states["/root/running/main_behaviour/creating_ball"], [self.states["/root/running/main_behaviour/running"]])
+        _root_running_main_behaviour_creating_ball_1.setAction(self._root_running_main_behaviour_creating_ball_1_exec)
+        _root_running_main_behaviour_creating_ball_1.setTrigger(Event("init_params", None))
+        self.states["/root/running/main_behaviour/creating_ball"].addTransition(_root_running_main_behaviour_creating_ball_1)
         
         # transition /root/running/deleting_behaviour/running
         _root_running_deleting_behaviour_running_0 = Transition(self, self.states["/root/running/deleting_behaviour/running"], [self.states["/root/running/deleting_behaviour/running"]])
         _root_running_deleting_behaviour_running_0.setAction(self._root_running_deleting_behaviour_running_0_exec)
         _root_running_deleting_behaviour_running_0.setTrigger(Event("delete_ball", None))
         self.states["/root/running/deleting_behaviour/running"].addTransition(_root_running_deleting_behaviour_running_0)
+        _root_running_deleting_behaviour_running_1 = Transition(self, self.states["/root/running/deleting_behaviour/running"], [self.states["/root/running/deleting_behaviour/running"]])
+        _root_running_deleting_behaviour_running_1.setAction(self._root_running_deleting_behaviour_running_1_exec)
+        _root_running_deleting_behaviour_running_1.setTrigger(Event("move_ball", None))
+        self.states["/root/running/deleting_behaviour/running"].addTransition(_root_running_deleting_behaviour_running_1)
+        _root_running_deleting_behaviour_running_2 = Transition(self, self.states["/root/running/deleting_behaviour/running"], [self.states["/root/running/deleting_behaviour/running"]])
+        _root_running_deleting_behaviour_running_2.setAction(self._root_running_deleting_behaviour_running_2_exec)
+        _root_running_deleting_behaviour_running_2.setTrigger(None)
+        _root_running_deleting_behaviour_running_2.setGuard(self._root_running_deleting_behaviour_running_2_guard)
+        self.states["/root/running/deleting_behaviour/running"].addTransition(_root_running_deleting_behaviour_running_2)
+        _root_running_deleting_behaviour_running_3 = Transition(self, self.states["/root/running/deleting_behaviour/running"], [self.states["/root/running/deleting_behaviour/running"]])
+        _root_running_deleting_behaviour_running_3.setAction(self._root_running_deleting_behaviour_running_3_exec)
+        _root_running_deleting_behaviour_running_3.setTrigger(Event("instance_created", None))
+        self.states["/root/running/deleting_behaviour/running"].addTransition(_root_running_deleting_behaviour_running_3)
+        _root_running_deleting_behaviour_running_4 = Transition(self, self.states["/root/running/deleting_behaviour/running"], [self.states["/root/running/deleting_behaviour/running"]])
+        _root_running_deleting_behaviour_running_4.setAction(self._root_running_deleting_behaviour_running_4_exec)
+        _root_running_deleting_behaviour_running_4.setTrigger(Event("update_vel", None))
+        self.states["/root/running/deleting_behaviour/running"].addTransition(_root_running_deleting_behaviour_running_4)
+        _root_running_deleting_behaviour_running_5 = Transition(self, self.states["/root/running/deleting_behaviour/running"], [self.states["/root/running/deleting_behaviour/running"]])
+        _root_running_deleting_behaviour_running_5.setAction(self._root_running_deleting_behaviour_running_5_exec)
+        _root_running_deleting_behaviour_running_5.setTrigger(Event("delete_physics", None))
+        self.states["/root/running/deleting_behaviour/running"].addTransition(_root_running_deleting_behaviour_running_5)
         
         # transition /root/running/child_behaviour/listening
         _root_running_child_behaviour_listening_0 = Transition(self, self.states["/root/running/child_behaviour/listening"], [self.states["/root/running/child_behaviour/listening"]])
@@ -441,12 +484,58 @@ class FieldInstance(RuntimeClassBase):
     def _root_running_main_behaviour_creating_ball_0_exec(self, parameters):
         association_name = parameters[0]
         self.big_step.outputEventOM(Event("start_instance", None, [self, association_name]))
-        self.big_step.outputEventOM(Event("narrow_cast", None, [self, association_name, Event("set_association_name", None, [association_name])]))
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, association_name, Event("get_init_params", None, [association_name])]))
+    
+    def _root_running_main_behaviour_creating_ball_1_exec(self, parameters):
+        link_id = parameters[0]
+        ball_r = parameters[1]
+        ball_vel = parameters[2]
+        ball_pos = parameters[3]
+        self.balls[link_id] = {'r': ball_r, 'vel': ball_vel, 'pos': ball_pos}
     
     def _root_running_deleting_behaviour_running_0_exec(self, parameters):
         association_name = parameters[0]
         self.big_step.outputEventOM(Event("delete_instance", None, [self, association_name]))
     
+    def _root_running_deleting_behaviour_running_1_exec(self, parameters):
+        link_id = parameters[0]
+        ball_pos = parameters[1]
+        ball_vel = parameters[2]
+        # Update the position and velocity
+        self.balls[link_id]['pos'] = ball_pos
+        self.balls[link_id]['vel'] = ball_vel
+        
+        # Check for collisions
+        collisions = []
+        for other_id, other_ball in self.balls.items():
+            if other_id != link_id:  # Don't check collision with itself
+                if self.check_collision(self.balls[link_id], other_ball):
+                    self.collisions.append((link_id, other_id))
+    
+    def _root_running_deleting_behaviour_running_2_exec(self, parameters):
+        self.big_step.outputEventOM(Event("create_instance", None, [self, "collisions", "CollisionPhysics", self.collisions[-1][0], self.collisions[-1][1], self.balls[self.collisions[-1][0]], self.balls[self.collisions[-1][1]]]))
+        self.collisions = self.collisions[:-1]
+    
+    def _root_running_deleting_behaviour_running_2_guard(self, parameters):
+        return self.collisions
+    
+    def _root_running_deleting_behaviour_running_3_exec(self, parameters):
+        association_name = parameters[0]
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, association_name, Event("set_association_name", None, [association_name])]))
+        self.big_step.outputEventOM(Event("start_instance", None, [self, association_name]))
+    
+    def _root_running_deleting_behaviour_running_4_exec(self, parameters):
+        ball1_id = parameters[0]
+        ball2_id = parameters[1]
+        new_vel1 = parameters[2]
+        new_vel2 = parameters[3]
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, ball1_id, Event("update_ball_vel", None, [new_vel1])]))
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, ball2_id, Event("update_ball_vel", None, [new_vel2])]))
+    
+    def _root_running_deleting_behaviour_running_5_exec(self, parameters):
+        association_id = parameters[0]
+        self.big_step.outputEventOM(Event("delete_instance", None, [self, association_id]))
+    
     def _root_running_child_behaviour_listening_0_exec(self, parameters):
         event_name = parameters[0]
         self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("button_pressed", None, [event_name])]))
@@ -475,6 +564,7 @@ class Field(ObjectManagerBase):
         self.output = self.addOutPort("ui")
         self.outputs["balls"] = self.addOutPort("balls")
         self.outputs["buttons"] = self.addOutPort("buttons")
+        self.outputs["collisions"] = self.addOutPort("collisions")
         self.outputs["parent"] = self.addOutPort("parent")
         self.field_ui = self.addInPort("field_ui")
     
@@ -672,7 +762,7 @@ class BallInstance(RuntimeClassBase):
         # transition /main_behaviour/initializing
         _main_behaviour_initializing_0 = Transition(self, self.states["/main_behaviour/initializing"], [self.states["/main_behaviour/creating_circle"]])
         _main_behaviour_initializing_0.setAction(self._main_behaviour_initializing_0_exec)
-        _main_behaviour_initializing_0.setTrigger(Event("set_association_name", None))
+        _main_behaviour_initializing_0.setTrigger(Event("get_init_params", None))
         self.states["/main_behaviour/initializing"].addTransition(_main_behaviour_initializing_0)
         
         # transition /main_behaviour/creating_circle
@@ -686,11 +776,15 @@ class BallInstance(RuntimeClassBase):
         _main_behaviour_bouncing_0.setAction(self._main_behaviour_bouncing_0_exec)
         _main_behaviour_bouncing_0.setTrigger(Event("_0after"))
         self.states["/main_behaviour/bouncing"].addTransition(_main_behaviour_bouncing_0)
-        _main_behaviour_bouncing_1 = Transition(self, self.states["/main_behaviour/bouncing"], [self.states["/main_behaviour/selected"]])
+        _main_behaviour_bouncing_1 = Transition(self, self.states["/main_behaviour/bouncing"], [self.states["/main_behaviour/bouncing"]])
         _main_behaviour_bouncing_1.setAction(self._main_behaviour_bouncing_1_exec)
-        _main_behaviour_bouncing_1.setTrigger(Event("mouse_press", self.getInPortName("ball_ui")))
-        _main_behaviour_bouncing_1.setGuard(self._main_behaviour_bouncing_1_guard)
+        _main_behaviour_bouncing_1.setTrigger(Event("update_ball_vel", None))
         self.states["/main_behaviour/bouncing"].addTransition(_main_behaviour_bouncing_1)
+        _main_behaviour_bouncing_2 = Transition(self, self.states["/main_behaviour/bouncing"], [self.states["/main_behaviour/selected"]])
+        _main_behaviour_bouncing_2.setAction(self._main_behaviour_bouncing_2_exec)
+        _main_behaviour_bouncing_2.setTrigger(Event("mouse_press", self.getInPortName("ball_ui")))
+        _main_behaviour_bouncing_2.setGuard(self._main_behaviour_bouncing_2_guard)
+        self.states["/main_behaviour/bouncing"].addTransition(_main_behaviour_bouncing_2)
         
         # transition /main_behaviour/dragging
         _main_behaviour_dragging_0 = Transition(self, self.states["/main_behaviour/dragging"], [self.states["/main_behaviour/dragging"]])
@@ -725,6 +819,7 @@ class BallInstance(RuntimeClassBase):
     def _main_behaviour_initializing_0_exec(self, parameters):
         association_name = parameters[0]
         self.association_name = association_name
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("init_params", None, [self.association_name, self.r, self.vel, self.pos])]))
     
     def _main_behaviour_creating_circle_0_exec(self, parameters):
         canvas_id = parameters[0]
@@ -741,16 +836,21 @@ class BallInstance(RuntimeClassBase):
         if self.pos['y']-self.r <= 0 or self.pos['y']+self.r >= CANVAS_DIMS[1]:
             self.vel['y'] = -self.vel['y'];
         self.big_step.outputEvent(Event("move_element", self.getOutPortName("ui"), [self.canvas_id, self.circle_id, self.vel['x'], self.vel['y']]))
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("move_ball", None, [self.association_name, self.pos, self.vel])]))
         self.pos['x'] += self.vel['x']
         self.pos['y'] += self.vel['y']
     
     def _main_behaviour_bouncing_1_exec(self, parameters):
+        new_vel = parameters[0]
+        self.vel = new_vel
+    
+    def _main_behaviour_bouncing_2_exec(self, parameters):
         x = parameters[0]
         y = parameters[1]
         button = parameters[2]
         self.big_step.outputEvent(Event("set_element_color", self.getOutPortName("ui"), [self.canvas_id, self.circle_id, '#ff0']))
     
-    def _main_behaviour_bouncing_1_guard(self, parameters):
+    def _main_behaviour_bouncing_2_guard(self, parameters):
         x = parameters[0]
         y = parameters[1]
         button = parameters[2]
@@ -813,6 +913,148 @@ class Ball(ObjectManagerBase):
         new_instance = BallInstance(self, parameters[2], parameters[3], parameters[4])
         return new_instance
 
+class CollisionPhysicsInstance(RuntimeClassBase):
+    def __init__(self, atomdevs, ball1_id, ball2_id, ball1_info, ball2_info):
+        RuntimeClassBase.__init__(self, atomdevs)
+        self.associations = {}
+        self.associations["parent"] = Association("Field", 1, 1)
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # user defined attributes
+        self.ball2_info = None
+        
+        # call user defined constructor
+        CollisionPhysicsInstance.user_defined_constructor(self, ball1_id, ball2_id, ball1_info, ball2_info)
+        port_name = Ports.addInputPort("<narrow_cast>", self)
+        atomdevs.addInPort(port_name)
+        port_name = Ports.addInputPort("physics_ui", self)
+        atomdevs.addInPort(port_name)
+        atomdevs.port_mappings[port_name] = atomdevs.next_instance
+        self.inports["physics_ui"] = port_name
+    
+    def user_defined_constructor(self, ball1_id, ball2_id, ball1_info, ball2_info):
+        self.ball1_id = ball1_id
+        self.ball2_id = ball2_id
+        self.ball1_info = ball1_info
+        self.ball2_info = ball2_info
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # user defined method
+    def resolve_velocity(self, vel, normal):
+        # Resolve the velocity into normal and tangential components.
+        normal_velocity = np.dot(vel, normal) * normal
+        tangential_velocity = vel - normal_velocity
+        return normal_velocity, tangential_velocity
+    
+    
+    # user defined method
+    def handle_collision(self):
+        pos1 = np.array([self.ball1_info['pos']['x'], self.ball1_info['pos']['y']])
+        vel1 = np.array([self.ball1_info['vel']['x'], self.ball1_info['vel']['y']])
+        r1 = self.ball1_info['r']
+        
+        pos2 = np.array([self.ball2_info['pos']['x'], self.ball2_info['pos']['y']])
+        vel2 = np.array([self.ball2_info['vel']['x'], self.ball2_info['vel']['y']])
+        r2 = self.ball2_info['r']
+        
+        # Calculate the normal vector from the center of ball1 to the center of ball2
+        normal = pos2 - pos1
+        normal = normal / np.linalg.norm(normal)  # Normalize the normal vector
+        
+        # Calculate the relative velocity
+        relative_velocity = vel1 - vel2
+        
+        # Calculate the velocities in the normal direction
+        vel1_normal, vel1_tangential = self.resolve_velocity(vel1, normal)
+        vel2_normal, vel2_tangential = self.resolve_velocity(vel2, normal)
+        
+        # Calculate new normal velocities after collision (1D elastic collision formula)
+        vel1_normal_new = ((r1 - r2) * vel1_normal + 2 * r2 * vel2_normal) / (r1 + r2)
+        vel2_normal_new = ((r2 - r1) * vel2_normal + 2 * r1 * vel1_normal) / (r1 + r2)
+        
+        # Combine the new normal and original tangential components
+        vel1_new = vel1_normal_new + vel1_tangential
+        vel2_new = vel2_normal_new + vel2_tangential
+        
+        # Update the velocities in the balls
+        self.ball1_info['vel'] = {'x': vel1_new[0], 'y': vel1_new[1]}
+        self.ball2_info['vel'] = {'x': vel2_new[0], 'y': vel2_new[1]}
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /creating
+        self.states["/creating"] = State(1, "/creating", self)
+        self.states["/creating"].setEnter(self._creating_enter)
+        
+        # state /running
+        self.states["/running"] = State(2, "/running", self)
+        
+        # state /delete
+        self.states["/delete"] = State(3, "/delete", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/creating"])
+        self.states[""].addChild(self.states["/running"])
+        self.states[""].addChild(self.states["/delete"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/creating"]
+        
+        # transition /creating
+        _creating_0 = Transition(self, self.states["/creating"], [self.states["/running"]])
+        _creating_0.setAction(self._creating_0_exec)
+        _creating_0.setTrigger(Event("set_association_name", None))
+        self.states["/creating"].addTransition(_creating_0)
+        
+        # transition /running
+        _running_0 = Transition(self, self.states["/running"], [self.states["/delete"]])
+        _running_0.setAction(self._running_0_exec)
+        _running_0.setTrigger(None)
+        self.states["/running"].addTransition(_running_0)
+    
+    def _creating_enter(self):
+        self.handle_collision()
+    
+    def _creating_0_exec(self, parameters):
+        association_name = parameters[0]
+        self.association_name = association_name
+    
+    def _running_0_exec(self, parameters):
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("update_vel", None, [self.ball1_id, self.ball2_id, self.ball1_info['vel'], self.ball2_info['vel']])]))
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("delete_physics", None, [self.association_name])]))
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/creating"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class CollisionPhysics(ObjectManagerBase):
+    def __init__(self, name):
+        ObjectManagerBase.__init__(self, name)
+        self.input = self.addInPort("input")
+        self.output = self.addOutPort("ui")
+        self.outputs["parent"] = self.addOutPort("parent")
+        self.physics_ui = self.addInPort("physics_ui")
+    
+    def constructObject(self, parameters):
+        new_instance = CollisionPhysicsInstance(self, parameters[2], parameters[3], parameters[4], parameters[5])
+        return new_instance
+
 class ObjectManagerState:
     def __init__(self):
         self.to_send = [("MainApp", "MainApp", Event("start_instance", None, ["MainApp[0]"], 0))]
@@ -826,6 +1068,7 @@ class ObjectManager(TheObjectManager):
         self.output["Field"] = self.addOutPort()
         self.output["Button"] = self.addOutPort()
         self.output["Ball"] = self.addOutPort()
+        self.output["CollisionPhysics"] = self.addOutPort()
 
 class Controller(CoupledDEVS):
     def __init__(self, name):
@@ -839,6 +1082,7 @@ class Controller(CoupledDEVS):
         self.atomic1 = self.addSubModel(Field("Field"))
         self.atomic2 = self.addSubModel(Button("Button"))
         self.atomic3 = self.addSubModel(Ball("Ball"))
+        self.atomic4 = self.addSubModel(CollisionPhysics("CollisionPhysics"))
         self.connectPorts(self.atomic0.obj_manager_out, self.objectmanager.input)
         self.connectPorts(self.objectmanager.output["MainApp"], self.atomic0.obj_manager_in)
         self.connectPorts(self.atomic0.outputs["fields"], self.atomic1.input)
@@ -846,6 +1090,7 @@ class Controller(CoupledDEVS):
         self.connectPorts(self.objectmanager.output["Field"], self.atomic1.obj_manager_in)
         self.connectPorts(self.atomic1.outputs["balls"], self.atomic3.input)
         self.connectPorts(self.atomic1.outputs["buttons"], self.atomic2.input)
+        self.connectPorts(self.atomic1.outputs["collisions"], self.atomic4.input)
         self.connectPorts(self.atomic1.outputs["parent"], self.atomic0.input)
         self.connectPorts(self.atomic2.obj_manager_out, self.objectmanager.input)
         self.connectPorts(self.objectmanager.output["Button"], self.atomic2.obj_manager_in)
@@ -853,7 +1098,11 @@ class Controller(CoupledDEVS):
         self.connectPorts(self.atomic3.obj_manager_out, self.objectmanager.input)
         self.connectPorts(self.objectmanager.output["Ball"], self.atomic3.obj_manager_in)
         self.connectPorts(self.atomic3.outputs["parent"], self.atomic1.input)
+        self.connectPorts(self.atomic4.obj_manager_out, self.objectmanager.input)
+        self.connectPorts(self.objectmanager.output["CollisionPhysics"], self.atomic4.obj_manager_in)
+        self.connectPorts(self.atomic4.outputs["parent"], self.atomic1.input)
         self.connectPorts(self.atomic0.output, self.out_ui)
         self.connectPorts(self.atomic1.output, self.out_ui)
         self.connectPorts(self.atomic2.output, self.out_ui)
-        self.connectPorts(self.atomic3.output, self.out_ui)
+        self.connectPorts(self.atomic3.output, self.out_ui)
+        self.connectPorts(self.atomic4.output, self.out_ui)

+ 0 - 1
examples/BouncingBallsCollision/Python/target.py

@@ -489,7 +489,6 @@ class Field(RuntimeClassBase):
     
     def _root_running_deleting_behaviour_running_2_exec(self, parameters):
         self.big_step.outputEventOM(Event("create_instance", None, [self, "collisions", "CollisionPhysics", self.collisions[-1][0], self.collisions[-1][1], self.balls[self.collisions[-1][0]], self.balls[self.collisions[-1][1]]]))
-        print("COLLISION")
         self.collisions = self.collisions[:-1]
     
     def _root_running_deleting_behaviour_running_2_guard(self, parameters):

+ 15 - 12
examples/ElevatorBalls/PyDEVS/target.py

@@ -55,7 +55,8 @@ class MainAppInstance(RuntimeClassBase):
         self.num_floors = 0
         self.button_num = FLOORS
         
-        self.next_elevator_pos = None
+        self.elevator_pos = None
+        self.elevator_dim = None
     
     def user_defined_destructor(self):
         pass
@@ -270,7 +271,7 @@ class MainAppInstance(RuntimeClassBase):
         floor_num = parameters[0]
         x = parameters[1]
         y = parameters[2]
-        self.big_step.outputEventOM(Event("create_instance", None, [self, "ball", "Ball", self.canvas_id, floor_num, x, y]))
+        self.big_step.outputEventOM(Event("create_instance", None, [self, "ball", "Ball", self.canvas_id, floor_num, x, y, self.elevator_pos, self.elevator_dim]))
     
     def _running_1_exec(self, parameters):
         association_name = parameters[0]
@@ -281,7 +282,7 @@ class MainAppInstance(RuntimeClassBase):
         pos = parameters[0]
         dim = parameters[1]
         vel = parameters[2]
-        self.big_step.outputEventOM(Event("broad_cast", None, [self, Event("update_bounds", None, [pos, dim, vel])]))
+        self.big_step.outputEventOM(Event("broad_cast", None, [self, Event("update_elevator_bounds", None, [pos, dim, vel])]))
     
     def _running_3_exec(self, parameters):
         floor_number = parameters[0]
@@ -688,9 +689,11 @@ class ElevatorInstance(RuntimeClassBase):
         else:
             self.vel = 2
         
+        self.current_floor = floor_number
+        
         height = (CANVAS_DIMS[1] - 150)
         y_dim = (height - ((FLOORS - 1) * FLOOR_SPACE)) / FLOORS
-        self.next_pos['y'] = height - (y_dim /2) - (floor_number * (y_dim + FLOOR_SPACE));
+        self.next_pos['y'] = height - (y_dim /2) - (self.current_floor * (y_dim + FLOOR_SPACE));
     
     def _root_running_move_0_exec(self, parameters):
         self.big_step.outputEvent(Event("set_element_pos", self.getOutPortName("ui"), [self.canvas_id, self.elevator_id, self.pos['x'], self.pos['y']]))
@@ -700,7 +703,7 @@ class ElevatorInstance(RuntimeClassBase):
         self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("open_elevator", None, [])]))
     
     def _root_running_move_1_guard(self, parameters):
-        return (self.pos['y']) < self.next_pos['y']
+        return (self.vel > 0 and self.pos['y'] > self.next_pos['y']) or (self.vel < 0 and self.pos['y'] < self.next_pos['y'])
     
     def initializeStatechart(self):
         # enter default state
@@ -721,7 +724,7 @@ class Elevator(ObjectManagerBase):
         return new_instance
 
 class BallInstance(RuntimeClassBase):
-    def __init__(self, atomdevs, canvas_id, floor_num, x, y):
+    def __init__(self, atomdevs, canvas_id, floor_num, x, y, elevator_pos, elevator_dim):
         RuntimeClassBase.__init__(self, atomdevs)
         self.associations = {}
         self.associations["parent"] = Association("MainApp", 1, 1)
@@ -740,7 +743,7 @@ class BallInstance(RuntimeClassBase):
         self.pos = None
         
         # call user defined constructor
-        BallInstance.user_defined_constructor(self, canvas_id, floor_num, x, y)
+        BallInstance.user_defined_constructor(self, canvas_id, floor_num, x, y, elevator_pos, elevator_dim)
         port_name = Ports.addInputPort("<narrow_cast>", self)
         atomdevs.addInPort(port_name)
         port_name = Ports.addInputPort("ball_ui", self)
@@ -748,7 +751,7 @@ class BallInstance(RuntimeClassBase):
         atomdevs.port_mappings[port_name] = atomdevs.next_instance
         self.inports["ball_ui"] = port_name
     
-    def user_defined_constructor(self, canvas_id, floor_num, x, y):
+    def user_defined_constructor(self, canvas_id, floor_num, x, y, elevator_pos, elevator_dim):
         self.canvas_id = canvas_id;
         
         
@@ -756,8 +759,8 @@ class BallInstance(RuntimeClassBase):
         
         self.elevator_floor = 0;
         self.elevator_open = True;
-        self.rect_pos = None;
-        self.rect_dim = None;
+        self.rect_pos = elevator_pos;
+        self.rect_dim = elevator_dim;
         
         self.r = 5.0;
         self.vel = {'x': random.uniform(-5.0, 5.0), 'y': random.uniform(-5.0, 5.0)};
@@ -833,7 +836,7 @@ class BallInstance(RuntimeClassBase):
         self.states["/main_behaviour/bouncing"].addTransition(_main_behaviour_bouncing_2)
         _main_behaviour_bouncing_3 = Transition(self, self.states["/main_behaviour/bouncing"], [self.states["/main_behaviour/bouncing"]])
         _main_behaviour_bouncing_3.setAction(self._main_behaviour_bouncing_3_exec)
-        _main_behaviour_bouncing_3.setTrigger(Event("update_bounds", None))
+        _main_behaviour_bouncing_3.setTrigger(Event("update_elevator_bounds", None))
         self.states["/main_behaviour/bouncing"].addTransition(_main_behaviour_bouncing_3)
         
         # transition /main_behaviour/ball_delete
@@ -938,7 +941,7 @@ class Ball(ObjectManagerBase):
         self.ball_ui = self.addInPort("ball_ui")
     
     def constructObject(self, parameters):
-        new_instance = BallInstance(self, parameters[2], parameters[3], parameters[4], parameters[5])
+        new_instance = BallInstance(self, parameters[2], parameters[3], parameters[4], parameters[5], parameters[6], parameters[7])
         return new_instance
 
 class ObjectManagerState:

+ 12 - 0
examples/Inheritance/PyDEVS/runner.py

@@ -0,0 +1,12 @@
+import target as target
+from sccd.runtime.DEVS_loop import DEVSSimulator
+
+model = target.Controller(name="controller")
+refs = {"ui": model.in_ui}
+sim = DEVSSimulator(model, refs)
+sim.setRealTime(False)
+
+# Set verbose to the log file path
+#sim.setVerbose(None)
+
+sim.simulate()

+ 159 - 0
examples/Inheritance/PyDEVS/target.py

@@ -0,0 +1,159 @@
+"""
+Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration) and Sam Pieters (DEVS)
+
+Model author: Sam Pieters
+Model name:   Bouncing_Balls_DEVS_Version
+Model description:
+Tkinter frame with bouncing balls in it.
+"""
+
+from sccd.runtime.DEVS_statecharts_core import *
+
+# package "Bouncing_Balls_DEVS_Version"
+
+class AInstance(RuntimeClassBase):
+    def __init__(self, atomdevs):
+        RuntimeClassBase.__init__(self, atomdevs)
+        self.associations = {}
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        AInstance.user_defined_constructor(self)
+        port_name = Ports.addInputPort("<narrow_cast>", self)
+        atomdevs.addInPort(port_name)
+    
+    def user_defined_constructor(self):
+        self.huh = 21
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /running
+        self.states["/running"] = State(1, "/running", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/running"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/running"]
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/running"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class A(ObjectManagerBase):
+    def __init__(self, name):
+        ObjectManagerBase.__init__(self, name)
+        self.input = self.addInPort("input")
+        self.output = self.addOutPort("ui")
+    
+    def constructObject(self, parameters):
+        new_instance = AInstance(self)
+        return new_instance
+
+class BInstance(AInstance):
+    def __init__(self, atomdevs):
+        RuntimeClassBase.__init__(self, atomdevs)
+        self.associations = {}
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        BInstance.user_defined_constructor(self)
+        port_name = Ports.addInputPort("<narrow_cast>", self)
+        atomdevs.addInPort(port_name)
+    
+    def user_defined_constructor(self):
+        AInstance.user_defined_constructor(self)
+        self.nr_of_fields = 0
+    
+    def user_defined_destructor(self):
+        # call super class destructors
+        AInstance.user_defined_destructor(self)
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /running
+        self.states["/running"] = State(1, "/running", self)
+        self.states["/running"].setEnter(self._running_enter)
+        
+        # add children
+        self.states[""].addChild(self.states["/running"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/running"]
+    
+    def _running_enter(self):
+        print(self.huh)
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/running"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class B(ObjectManagerBase):
+    def __init__(self, name):
+        ObjectManagerBase.__init__(self, name)
+        self.input = self.addInPort("input")
+        self.output = self.addOutPort("ui")
+        self.instances[self.next_instance] = BInstance(self)
+        self.next_instance = self.next_instance + 1
+    
+    def constructObject(self, parameters):
+        new_instance = BInstance(self)
+        return new_instance
+
+class ObjectManagerState:
+    def __init__(self):
+        self.to_send = [("B", "B", Event("start_instance", None, ["B[0]"], 0))]
+
+class ObjectManager(TheObjectManager):
+    def __init__(self, name):
+        TheObjectManager.__init__(self, name)
+        self.State = ObjectManagerState()
+        self.input = self.addInPort("input")
+        self.output["A"] = self.addOutPort()
+        self.output["B"] = self.addOutPort()
+
+class Controller(CoupledDEVS):
+    def __init__(self, name):
+        CoupledDEVS.__init__(self, name)
+        self.in_ui = self.addInPort("ui")
+        Ports.addInputPort("ui")
+        self.out_ui = self.addOutPort("ui")
+        Ports.addOutputPort("ui")
+        self.objectmanager = self.addSubModel(ObjectManager("ObjectManager"))
+        self.atomic0 = self.addSubModel(A("A"))
+        self.atomic1 = self.addSubModel(B("B"))
+        self.connectPorts(self.atomic0.obj_manager_out, self.objectmanager.input)
+        self.connectPorts(self.objectmanager.output["A"], self.atomic0.obj_manager_in)
+        self.connectPorts(self.atomic1.obj_manager_out, self.objectmanager.input)
+        self.connectPorts(self.objectmanager.output["B"], self.atomic1.obj_manager_in)
+        self.connectPorts(self.atomic0.output, self.out_ui)
+        self.connectPorts(self.atomic1.output, self.out_ui)

+ 160 - 0
examples/Inheritance/PyDEVS/the_target.py

@@ -0,0 +1,160 @@
+"""
+Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration) and Sam Pieters (DEVS)
+
+Model author: Sam Pieters
+Model name:   Bouncing_Balls_DEVS_Version
+Model description:
+Tkinter frame with bouncing balls in it.
+"""
+
+from sccd.runtime.DEVS_statecharts_core import *
+
+# package "Bouncing_Balls_DEVS_Version"
+
+class AInstance(RuntimeClassBase):
+    def __init__(self, atomdevs):
+        RuntimeClassBase.__init__(self, atomdevs)
+        self.associations = {}
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        AInstance.user_defined_constructor(self)
+        port_name = Ports.addInputPort("<narrow_cast>", self)
+        atomdevs.addInPort(port_name)
+    
+    def user_defined_constructor(self):
+        self.huh = 21
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /running
+        self.states["/running"] = State(1, "/running", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/running"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/running"]
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/running"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+
+class A(ObjectManagerBase):
+    def __init__(self, name):
+        ObjectManagerBase.__init__(self, name)
+        self.input = self.addInPort("input")
+        self.output = self.addOutPort("ui")
+    
+    def constructObject(self, parameters):
+        new_instance = AInstance(self)
+        return new_instance
+
+class BInstance(AInstance):
+    def __init__(self, atomdevs):
+        RuntimeClassBase.__init__(self, atomdevs)
+        self.associations = {}
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        BInstance.user_defined_constructor(self)
+        port_name = Ports.addInputPort("<narrow_cast>", self)
+        atomdevs.addInPort(port_name)
+    
+    def user_defined_constructor(self):
+        AInstance.user_defined_constructor(self)
+        self.nr_of_fields = 0
+    
+    def user_defined_destructor(self):
+        # call super class destructors
+        AInstance.user_defined_destructor(self)
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /running
+        self.states["/running"] = State(1, "/running", self)
+        self.states["/running"].setEnter(self._running_enter)
+        
+        # add children
+        self.states[""].addChild(self.states["/running"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/running"]
+    
+    def _running_enter(self):
+        print(self.huh)
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/running"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class B(ObjectManagerBase):
+    def __init__(self, name):
+        ObjectManagerBase.__init__(self, name)
+        self.input = self.addInPort("input")
+        self.output = self.addOutPort("ui")
+        self.instances[self.next_instance] = BInstance(self)
+        self.next_instance = self.next_instance + 1
+    
+    def constructObject(self, parameters):
+        new_instance = BInstance(self)
+        return new_instance
+
+class ObjectManagerState:
+    def __init__(self):
+        self.to_send = [("B", "B", Event("start_instance", None, ["B[0]"], 0))]
+
+class ObjectManager(TheObjectManager):
+    def __init__(self, name):
+        TheObjectManager.__init__(self, name)
+        self.State = ObjectManagerState()
+        self.input = self.addInPort("input")
+        self.output["A"] = self.addOutPort()
+        self.output["B"] = self.addOutPort()
+
+class Controller(CoupledDEVS):
+    def __init__(self, name):
+        CoupledDEVS.__init__(self, name)
+        self.in_ui = self.addInPort("ui")
+        Ports.addInputPort("ui")
+        self.out_ui = self.addOutPort("ui")
+        Ports.addOutputPort("ui")
+        self.objectmanager = self.addSubModel(ObjectManager("ObjectManager"))
+        self.atomic0 = self.addSubModel(A("A"))
+        self.atomic1 = self.addSubModel(B("B"))
+        self.connectPorts(self.atomic0.obj_manager_out, self.objectmanager.input)
+        self.connectPorts(self.objectmanager.output["A"], self.atomic0.obj_manager_in)
+        self.connectPorts(self.atomic1.obj_manager_out, self.objectmanager.input)
+        self.connectPorts(self.objectmanager.output["B"], self.atomic1.obj_manager_in)
+        self.connectPorts(self.atomic0.output, self.out_ui)
+        self.connectPorts(self.atomic1.output, self.out_ui)

+ 8 - 0
examples/Inheritance/Python/runner.py

@@ -0,0 +1,8 @@
+import target as target
+from sccd.runtime.statecharts_core import Event
+import threading
+
+if __name__ == '__main__':
+    controller = target.Controller() 
+    
+    controller.start()

+ 128 - 0
examples/Inheritance/Python/target.py

@@ -0,0 +1,128 @@
+"""
+Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
+
+Model author: Sam Pieters
+Model name:   Bouncing_Balls_DEVS_Version
+Model description:
+Tkinter frame with bouncing balls in it.
+"""
+
+from sccd.runtime.statecharts_core import *
+
+# package "Bouncing_Balls_DEVS_Version"
+
+class A(RuntimeClassBase):
+    def __init__(self, controller):
+        RuntimeClassBase.__init__(self, controller)
+        
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        A.user_defined_constructor(self)
+    
+    def user_defined_constructor(self):
+        self.huh = 21
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /running
+        self.states["/running"] = State(1, "/running", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/running"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/running"]
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/running"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class B(A):
+    def __init__(self, controller):
+        RuntimeClassBase.__init__(self, controller)
+        
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        B.user_defined_constructor(self)
+    
+    def user_defined_constructor(self):
+        A.user_defined_constructor(self)
+        self.nr_of_fields = 0
+    
+    def user_defined_destructor(self):
+        # call super class destructors
+        A.user_defined_destructor(self)
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /running
+        self.states["/running"] = State(1, "/running", self)
+        self.states["/running"].setEnter(self._running_enter)
+        
+        # add children
+        self.states[""].addChild(self.states["/running"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/running"]
+    
+    def _running_enter(self):
+        print(self.huh)
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/running"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class ObjectManager(ObjectManagerBase):
+    def __init__(self, controller):
+        ObjectManagerBase.__init__(self, controller)
+    
+    def instantiate(self, class_name, construct_params):
+        if class_name == "A":
+            instance = A(self.controller)
+            instance.associations = {}
+        elif class_name == "B":
+            instance = B(self.controller)
+            instance.associations = {}
+        else:
+            raise Exception("Cannot instantiate class " + class_name)
+        return instance
+
+class Controller(ThreadsControllerBase):
+    def __init__(self, keep_running = None, behind_schedule_callback = None):
+        if keep_running == None: keep_running = True
+        if behind_schedule_callback == None: behind_schedule_callback = None
+        ThreadsControllerBase.__init__(self, ObjectManager(self), keep_running, behind_schedule_callback)
+        self.addInputPort("ui")
+        self.addOutputPort("ui")
+        self.object_manager.createInstance("B", [])

+ 42 - 0
examples/Inheritance/sccd.xml

@@ -0,0 +1,42 @@
+<?xml version="1.1" ?>
+<diagram author="Sam Pieters" name="Bouncing_Balls_DEVS_Version">
+    <description>
+        Tkinter frame with bouncing balls in it.
+    </description>
+    <top>
+    </top>
+    <inport name="ui"/>
+    <outport name="ui"/>
+
+    <class name="A">
+        <constructor>
+            <body>
+                self.huh = 21
+            </body>
+        </constructor>
+        <scxml initial="running">
+            <state id="running">
+            </state>
+        </scxml>
+    </class>
+    <class name="B" default="true">
+        <relationships>
+            <inheritance class="A" />
+        </relationships>
+        <constructor>
+            <body>
+                self.nr_of_fields = 0
+            </body>
+        </constructor>
+        <scxml initial="running">
+            <state id="running">
+                <onentry>
+                    <script>
+                        print(self.huh)
+                    </script>
+                </onentry>
+            </state>
+        </scxml>
+    </class>
+
+</diagram>

+ 1 - 1
examples/TimerEventloop/PyDEVS/runner.py

@@ -1,5 +1,5 @@
 import tkinter as tk
-import examples.FixedTimerEventloop.PyDEVS.target as target
+import target as target
 from sccd.runtime.libs.ui_v2 import UI
 from sccd.runtime.DEVS_loop import DEVSSimulator
 

+ 3 - 4
examples/TimerEventloop/PyDEVS/target.py

@@ -10,8 +10,7 @@ from sccd.runtime.DEVS_statecharts_core import *
 from sccd.runtime.libs.ui import ui
 import time
 
-CANVAS_WIDTH = 350
-CANVAS_HEIGHT = 300
+CANVAS_DIMS = (350, 300)
 
 # package "Timer (Eventloop Version)"
 
@@ -145,10 +144,10 @@ class MainAppInstance(RuntimeClassBase):
         self.states["/interrupted"].addTransition(_interrupted_0)
     
     def _creating_window_enter(self):
-        self.big_step.outputEvent(Event("create_window", self.getOutPortName("ui"), [CANVAS_WIDTH, CANVAS_HEIGHT, "Fixed Timer", self.inports['field_ui']]))
+        self.big_step.outputEvent(Event("create_window", self.getOutPortName("ui"), [CANVAS_DIMS[0], CANVAS_DIMS[1], "Fixed Timer", self.inports['field_ui']]))
     
     def _creating_canvas_enter(self):
-        self.big_step.outputEvent(Event("create_canvas", self.getOutPortName("ui"), [self.window_id, CANVAS_WIDTH, CANVAS_HEIGHT - 200, {'background':'#222222'}, self.inports['field_ui']]))
+        self.big_step.outputEvent(Event("create_canvas", self.getOutPortName("ui"), [self.window_id, CANVAS_DIMS[0], CANVAS_DIMS[1] - 200, {'background':'#222222'}, self.inports['field_ui']]))
     
     def _creating_clock_text_enter(self):
         self.big_step.outputEvent(Event("create_text", self.getOutPortName("ui"), [self.canvas_id, 50, 50, '', self.inports['field_ui']]))

+ 3 - 4
examples/TimerEventloop/Python/target.py

@@ -10,8 +10,7 @@ from sccd.runtime.statecharts_core import *
 from sccd.runtime.libs.ui import ui
 import time
 
-CANVAS_WIDTH = 350
-CANVAS_HEIGHT = 300
+CANVAS_DIMS = (350, 300)
 
 # package "Timer (Eventloop Version)"
 
@@ -140,10 +139,10 @@ class MainApp(RuntimeClassBase):
         self.states["/interrupted"].addTransition(_interrupted_0)
     
     def _creating_window_enter(self):
-        self.big_step.outputEvent(Event("create_window", self.getOutPortName("ui"), [CANVAS_WIDTH, CANVAS_HEIGHT, "Fixed Timer", self.inports['field_ui']]))
+        self.big_step.outputEvent(Event("create_window", self.getOutPortName("ui"), [CANVAS_DIMS[0], CANVAS_DIMS[1], "Fixed Timer", self.inports['field_ui']]))
     
     def _creating_canvas_enter(self):
-        self.big_step.outputEvent(Event("create_canvas", self.getOutPortName("ui"), [self.window_id, CANVAS_WIDTH, CANVAS_HEIGHT - 200, {'background':'#222222'}, self.inports['field_ui']]))
+        self.big_step.outputEvent(Event("create_canvas", self.getOutPortName("ui"), [self.window_id, CANVAS_DIMS[0], CANVAS_DIMS[1] - 200, {'background':'#222222'}, self.inports['field_ui']]))
     
     def _creating_clock_text_enter(self):
         self.big_step.outputEvent(Event("create_text", self.getOutPortName("ui"), [self.canvas_id, 50, 50, '', self.inports['field_ui']]))

+ 2 - 37
examples/TimerThread/PyDEVS/runner.py

@@ -1,10 +1,10 @@
-import target as best_target
+import target as target
 from sccd.runtime.DEVS_statecharts_core import Event
 import threading
 
 
 if __name__ == '__main__':
-    controller = best_target.Controller() 
+    controller = target.Controller("Controller") 
     
     def raw_inputter():
         while 1:
@@ -24,38 +24,3 @@ if __name__ == '__main__':
     output_thread.start()
     
     controller.start()
-
-
-
-
-import tkinter as tk
-import examples.BouncingBalls.PyDEVS.best_target as best_target
-from sccd.runtime.libs.ui_v2 import UI
-from sccd.runtime.DEVS_loop import DEVSSimulator
-
-class OutputListener:
-	def __init__(self, ui):
-		self.ui = ui
-
-	def add(self, event):
-		if event.port == "ui":
-			method = getattr(self.ui, event.name)
-			method(*event.parameters)
-
-if __name__ == '__main__':
-	model = best_target.Controller(name="controller")
-	refs = {"ui": model.ui, "field_ui": model.atomic1.field_ui, "button_ui": model.atomic2.button_ui, "ball_ui": model.atomic3.ball_ui}
-
-
-	sim = DEVSSimulator(model)
-	sim.setRealTime(True)
-	sim.setRealTimeInputFile(None)
-	sim.setRealTimePorts(refs)
-	sim.setVerbose(None)
-	#sim.setRealTimePlatformTk(tkroot)
-
-	model.atomic1.addMyOwnOutputListener(OutputListener(ui))
-	model.atomic2.addMyOwnOutputListener(OutputListener(ui))
-	model.atomic3.addMyOwnOutputListener(OutputListener(ui))
-	sim.simulate()
-	#tkroot.mainloop()

+ 9 - 3
examples/TimerThread/PyDEVS/target.py

@@ -27,6 +27,8 @@ class MainAppInstance(RuntimeClassBase):
         
         # call user defined constructor
         MainAppInstance.user_defined_constructor(self)
+        port_name = Ports.addInputPort("<narrow_cast>", self)
+        atomdevs.addInPort(port_name)
     
     def user_defined_constructor(self):
         self.starting_time = time.time()
@@ -102,6 +104,7 @@ class MainApp(ObjectManagerBase):
     def __init__(self, name):
         ObjectManagerBase.__init__(self, name)
         self.input = self.addInPort("input")
+        self.output = self.addOutPort("ui")
         self.instances[self.next_instance] = MainAppInstance(self)
         self.next_instance = self.next_instance + 1
     
@@ -123,9 +126,12 @@ class ObjectManager(TheObjectManager):
 class Controller(CoupledDEVS):
     def __init__(self, name):
         CoupledDEVS.__init__(self, name)
-        self.input = self.addInPort("input")
-        self.addOutPort("output")
+        self.in_input = self.addInPort("input")
+        Ports.addInputPort("input")
+        self.out_output = self.addOutPort("output")
+        Ports.addOutputPort("output")
         self.objectmanager = self.addSubModel(ObjectManager("ObjectManager"))
         self.atomic0 = self.addSubModel(MainApp("MainApp"))
         self.connectPorts(self.atomic0.obj_manager_out, self.objectmanager.input)
-        self.connectPorts(self.objectmanager.output["MainApp"], self.atomic0.obj_manager_in)
+        self.connectPorts(self.objectmanager.output["MainApp"], self.atomic0.obj_manager_in)
+        self.connectPorts(self.atomic0.output, self.out_output)

+ 13 - 6
sccd/compiler/DEVS_generator.py

@@ -164,15 +164,19 @@ class DEVSGenerator(Visitor):
         super_classes = []
         if not class_node.super_class_objs:
             if class_node.statechart:
-                super_classes.append("ObjectManagerBase")
+                super_classes.append("RuntimeClassBase")
         if class_node.super_classes:
             for super_class in class_node.super_classes:
-                super_classes.append(super_class)
+                # Check if this is always the case (that the superclass is an instance)
+                super_classes.append(super_class + "Instance")
 
         ################################
         # State Instance (statechart)
         ################################
-        self.writer.beginClass(f"{class_node.name}Instance", ["RuntimeClassBase"])
+
+        # TODO: RuntimeClassBase only if there are no superclasses, if there are then append the superclasses
+
+        self.writer.beginClass(f"{class_node.name}Instance", super_classes)
         self.writer.beginConstructor()
         self.writer.addFormalParameter("atomdevs")
 
@@ -269,11 +273,14 @@ class DEVSGenerator(Visitor):
         for p in constructor.getParams():
             p.accept(self)
         self.writer.beginMethodBody()
+
+        
         for super_class in constructor.parent_class.super_classes:
             # begin call
             if super_class in constructor.parent_class.super_class_objs:
-                self.writer.beginSuperClassMethodCall(super_class, "user_defined_constructor")
+                self.writer.beginSuperClassMethodCall(super_class + "Instance", "user_defined_constructor")
             else:
+                # TODO: How to get in this? 
                 self.writer.beginSuperClassConstructorCall(super_class)
             # write actual parameters
             if super_class in constructor.super_class_parameters:
@@ -331,7 +338,7 @@ class DEVSGenerator(Visitor):
         ################################
         # State Object (keeps list of all instances of that object + controller operations)
         ################################
-        self.writer.beginClass(class_node.name, super_classes)
+        self.writer.beginClass(class_node.name, ["ObjectManagerBase"])
 
         self.writer.beginMethod("constructObject")
 
@@ -409,7 +416,7 @@ class DEVSGenerator(Visitor):
             for super_class in destructor.parent_class.super_classes:
                 # begin call
                 if super_class in destructor.parent_class.super_class_objs:
-                    self.writer.beginSuperClassMethodCall(super_class, "user_defined_destructor")
+                    self.writer.beginSuperClassMethodCall(super_class + "Instance", "user_defined_destructor")
                     self.writer.endSuperClassMethodCall()
                 else:
                     self.writer.beginSuperClassDestructorCall(super_class)

+ 33 - 2
sccd/runtime/DEVS_statecharts_core.py

@@ -717,6 +717,12 @@ class ObjectManagerBase(AtomicDEVS):
         self.inports = {}
 
         self.lock = threading.Condition()
+
+
+
+
+        # TODO: HELP
+        self.external = False
     
     def getEarliestEventTime(self):
         with self.lock:
@@ -1153,6 +1159,7 @@ class ObjectManagerBase(AtomicDEVS):
                 self.addInput(ev)
         return self.instances
 
+    '''
     def intTransition(self):
         earliest = min(self.getEarliestEventTime(), self.simulated_time + self.input_queue.getEarliestTime())
         if not (earliest == INFINITY):
@@ -1167,8 +1174,32 @@ class ObjectManagerBase(AtomicDEVS):
             self.next_time = 0
         elif next_earliest == INFINITY:
             self.next_time = INFINITY
-        #else:
-        #    self.next_time = next_earliest - earliest
+        return self.instances
+    '''
+    
+    def intTransition(self):
+        self.simulated_time += self.next_time
+
+        self.next_time = min(self.getEarliestEventTime(), self.simulated_time + self.input_queue.getEarliestTime())
+
+        #earliest = min(self.getEarliestEventTime(), self.simulated_time + self.input_queue.getEarliestTime())
+        #if not (earliest == INFINITY):
+            #self.simulated_time = earliest
+        self.to_send = []
+        self.handleInput()
+        self.stepAll()
+        
+
+        self.next_time -= self.simulated_time
+
+        # Clamp to ensure non-negative result
+        self.next_time = max(self.next_time, 0.0)
+        #if next_earliest != INFINITY:
+            #self.next_time = next_earliest - earliest
+        #elif not (len(self.to_send) == 0):
+            #self.next_time = 0
+        #elif next_earliest == INFINITY:
+            #self.next_time = INFINITY
         return self.instances
 
     def outputFnc(self):

+ 124 - 0
test_output.txt

@@ -0,0 +1,124 @@
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
+		Initial State: None
+		Next scheduled internal transition at time inf
+
+
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		Input Port Configuration:
+			port <obj_manager_in>:
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
+			port <input>:
+			port <private_0_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x102b3e4e0>}
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x102b6b1a0>
+		Output Port Configuration:
+			port <port1>:
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		Input Port Configuration:
+			port <input>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+		New State: <target.ObjectManagerState object at 0x102b6b1a0>
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x102b3e4e0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+			port <ui>:
+				[(event name: waiting_on_input; port: ui)]
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x102b3e4e0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		Input Port Configuration:
+			port <obj_manager_in>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+			port <input>:
+			port <private_0_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x102b3e4e0>}
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x102b6b1a0>
+		Output Port Configuration:
+			port <port1>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x102b3e4e0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x102b3e4e0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time 1.000000
+

+ 2 - 0
tests/InputTest/PyDEVS/faulty_log.txt

@@ -0,0 +1,2 @@
+0.00 (event name: waiting_on_input; port: ui)
+1.00 (event name: test; port: ui; parameters: [])

+ 124 - 0
tests/InputTest/PyDEVS/log.txt

@@ -0,0 +1,124 @@
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
+		Initial State: None
+		Next scheduled internal transition at time inf
+
+
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		Input Port Configuration:
+			port <obj_manager_in>:
+				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+			port <input>:
+			port <private_0_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1048424e0>}
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10486f200>
+		Output Port Configuration:
+			port <port1>:
+				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+		Next scheduled internal transition at time inf
+
+
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time 1.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		Input Port Configuration:
+			port <input>:
+				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+		New State: <target.ObjectManagerState object at 0x10486f200>
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048424e0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+			port <ui>:
+				(event name: waiting_on_input; port: ui)
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	CONFLUENT TRANSITION in model <Tester.Controller.MainApp>
+		Input Port Configuration:
+			port <obj_manager_in>: 
+				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+			port <input>: 
+			port <private_0_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x1048424e0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10486f200>
+		Output Port Configuration:
+			port <port1>:
+				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048424e0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048424e0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   1.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+				(event name: test; port: ui; parameters: [])
+		Next scheduled internal transition at time inf
+

+ 110 - 0
tests/InputTest/PyDEVS/target.py

@@ -0,0 +1,110 @@
+"""
+Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration) and Sam Pieters (DEVS)
+
+Model author: Sam Pieters
+Model name:   Global inport
+Model description:
+Test X: Test if global inport works
+"""
+
+from sccd.runtime.DEVS_statecharts_core import *
+
+# package "Global inport"
+
+class MainAppInstance(RuntimeClassBase):
+    def __init__(self, atomdevs):
+        RuntimeClassBase.__init__(self, atomdevs)
+        self.associations = {}
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        MainAppInstance.user_defined_constructor(self)
+        port_name = Ports.addInputPort("<narrow_cast>", self)
+        atomdevs.addInPort(port_name)
+    
+    def user_defined_constructor(self):
+        pass
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /state1
+        self.states["/state1"] = State(1, "/state1", self)
+        self.states["/state1"].setEnter(self._state1_enter)
+        
+        # state /state2
+        self.states["/state2"] = State(2, "/state2", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/state1"])
+        self.states[""].addChild(self.states["/state2"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/state1"]
+        
+        # transition /state1
+        _state1_0 = Transition(self, self.states["/state1"], [self.states["/state2"]])
+        _state1_0.setAction(self._state1_0_exec)
+        _state1_0.setTrigger(Event("test", None))
+        self.states["/state1"].addTransition(_state1_0)
+    
+    def _state1_enter(self):
+        self.big_step.outputEvent(Event("waiting_on_input", self.getOutPortName("ui"), []))
+    
+    def _state1_0_exec(self, parameters):
+        self.big_step.outputEvent(Event("received", self.getOutPortName("ui"), []))
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/state1"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class MainApp(ObjectManagerBase):
+    def __init__(self, name):
+        ObjectManagerBase.__init__(self, name)
+        self.input = self.addInPort("input")
+        self.output = self.addOutPort("ui")
+        self.instances[self.next_instance] = MainAppInstance(self)
+        self.next_instance = self.next_instance + 1
+    
+    def constructObject(self, parameters):
+        new_instance = MainAppInstance(self)
+        return new_instance
+
+class ObjectManagerState:
+    def __init__(self):
+        self.to_send = [("MainApp", "MainApp", Event("start_instance", None, ["MainApp[0]"], 0))]
+
+class ObjectManager(TheObjectManager):
+    def __init__(self, name):
+        TheObjectManager.__init__(self, name)
+        self.State = ObjectManagerState()
+        self.input = self.addInPort("input")
+        self.output["MainApp"] = self.addOutPort()
+
+class Controller(CoupledDEVS):
+    def __init__(self, name):
+        CoupledDEVS.__init__(self, name)
+        self.in_ui = self.addInPort("ui")
+        Ports.addInputPort("ui")
+        self.out_ui = self.addOutPort("ui")
+        Ports.addOutputPort("ui")
+        self.objectmanager = self.addSubModel(ObjectManager("ObjectManager"))
+        self.atomic0 = self.addSubModel(MainApp("MainApp"))
+        self.connectPorts(self.atomic0.obj_manager_out, self.objectmanager.input)
+        self.connectPorts(self.objectmanager.output["MainApp"], self.atomic0.obj_manager_in)
+        self.connectPorts(self.atomic0.output, self.out_ui)

+ 1 - 0
tests/InputTest/input.txt

@@ -0,0 +1 @@
+1.00 (event name: test; port: ui; parameters: [])

+ 21 - 0
tests/InputTest/sccd.xml

@@ -0,0 +1,21 @@
+<?xml version="1.1" ?>
+<diagram author="Sam Pieters" name="Global inport">
+    <description>
+        Test X: Test if global inport works
+    </description>
+    <inport name="ui"/>
+    <outport name="ui"/>
+    <class name="MainApp" default="true">
+        <scxml initial="state1">
+            <state id="state1">
+                <onentry>
+                    <raise port="ui" event="waiting_on_input" />
+                </onentry>
+                <transition event='test' target='../state2'>
+                    <raise port="ui" event="received" />
+                </transition>
+            </state>
+            <state id="state2" />
+        </scxml>
+    </class>
+</diagram>

+ 59 - 22
tests/Test1/PyDEVS/log.txt

@@ -2,12 +2,17 @@
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INITIAL CONDITIONS in model <controller.MainApp>
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.ObjectManager>
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
 		Initial State: None
 		Next scheduled internal transition at time 0.000000
 
@@ -15,59 +20,69 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 			port <input>:
 			port <private_1_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10426da00>}
+		New State: {0: <target.MainAppInstance object at 0x1048b6c60>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041f3140>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x1048b92e0>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 		Next scheduled internal transition at time inf
 
 
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x1041f3140>
+		New State: <target.ObjectManagerState object at 0x1048b92e0>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426da00>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b6c60>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <ui>:
-		Next scheduled internal transition at time 1.000000
+		Next scheduled internal transition at time 0.000000
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	CONFLUENT TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
-			port <obj_manager_in>:
+			port <obj_manager_in>: 
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-			port <input>:
-			port <private_1_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10426da00>}
+			port <input>: 
+			port <private_1_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x1048b6c60>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041f3140>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x1048b92e0>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -77,8 +92,30 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426da00>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b6c60>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b6c60>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 1.000000
+
+
+__  Current Time:   1.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b6c60>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -88,8 +125,8 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   1.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426da00>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b6c60>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:

+ 51 - 33
tests/Test10/PyDEVS/log.txt

@@ -30,13 +30,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 			port <input>:
-			port <private_23_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+			port <private_22_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
@@ -52,12 +52,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -75,8 +75,8 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>: 
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <input>: 
-			port <private_23_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+			port <private_22_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
@@ -90,7 +90,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>: 
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -107,23 +107,23 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
-			port <private_24_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x10424c6b0>}
+			port <private_23_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x1060f87d0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 			port <linkA>:
 			port <linkB>:
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -139,12 +139,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x10424c6b0>}
+		New State: {0: <target.AInstance object at 0x1060f87d0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -152,6 +152,16 @@ __  Current Time:   0.000000 __________________________________________
 		Next scheduled internal transition at time inf
 
 
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
+			port <linkB>:
+		Next scheduled internal transition at time inf
+
+
 __  Current Time:   0.000000 __________________________________________ 
 
 
@@ -160,13 +170,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_23_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+			port <private_22_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -179,7 +189,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -192,7 +202,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -209,12 +219,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
@@ -232,13 +242,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_24_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x10424c6b0>}
+			port <private_23_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x1060f87d0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -254,19 +264,19 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x10424c6b0>}
+		New State: {0: <target.AInstance object at 0x1060f87d0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <ui>:
 				(event name: statechart_started_succesfully; port: ui; parameters: ['0.00'])
 				(event name: constructor_initialized_succesfully; port: ui; parameters: ['0.00'])
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 __  Current Time:   0.000000 __________________________________________ 
@@ -277,13 +287,21 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_23_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+			port <private_22_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Next scheduled internal transition at time 0.000000
 
 
+	INTERNAL TRANSITION in model <controller.A>
+		New State: {0: <target.AInstance object at 0x1060f87d0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041f2e70>
+		New State: <target.ObjectManagerState object at 0x105ecb2c0>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
@@ -296,7 +314,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -309,7 +327,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301310>}
+		New State: {0: <target.MainAppInstance object at 0x1060f5f10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:

+ 39 - 30
tests/Test12/PyDEVS/log.txt

@@ -25,13 +25,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 			port <input>:
-			port <private_25_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+			port <private_24_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
@@ -46,12 +46,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -68,8 +68,8 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>: 
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <input>: 
-			port <private_25_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+			port <private_24_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
@@ -82,7 +82,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>: 
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -98,22 +98,22 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
-			port <private_26_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x10424e540>}
+			port <private_25_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x106040560>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 			port <linkA>:
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -128,12 +128,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x10424e540>}
+		New State: {0: <target.AInstance object at 0x106040560>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -141,6 +141,15 @@ __  Current Time:   0.000000 __________________________________________
 		Next scheduled internal transition at time inf
 
 
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
+		Next scheduled internal transition at time inf
+
+
 __  Current Time:   0.000000 __________________________________________ 
 
 
@@ -149,13 +158,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_25_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+			port <private_24_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -167,7 +176,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -179,7 +188,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -195,12 +204,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
@@ -217,13 +226,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
 			port <input>:
-			port <private_26_<narrow_cast>>:
+			port <private_25_<narrow_cast>>:
 		New State: {}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -238,7 +247,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Next scheduled internal transition at time 0.000000
 
 
@@ -259,13 +268,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
 			port <input>:
-			port <private_25_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+			port <private_24_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042ff860>
+		New State: <target.ObjectManagerState object at 0x1060f5940>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
@@ -277,7 +286,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -289,7 +298,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104301340>}
+		New State: {0: <target.MainAppInstance object at 0x1060fa120>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:

+ 51 - 42
tests/Test13/PyDEVS/log.txt

@@ -25,13 +25,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 			port <input>:
-			port <private_27_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+			port <private_26_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
@@ -46,12 +46,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -68,8 +68,8 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>: 
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <input>: 
-			port <private_27_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+			port <private_26_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
@@ -82,7 +82,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>: 
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -98,22 +98,22 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
-			port <private_28_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x1042fdf10>}
+			port <private_27_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x10606eb10>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 			port <linkA>:
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -128,12 +128,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x1042fdf10>}
+		New State: {0: <target.AInstance object at 0x10606eb10>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -141,6 +141,15 @@ __  Current Time:   0.000000 __________________________________________
 		Next scheduled internal transition at time inf
 
 
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
+		Next scheduled internal transition at time inf
+
+
 __  Current Time:   0.000000 __________________________________________ 
 
 
@@ -149,13 +158,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_27_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+			port <private_26_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -167,7 +176,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -179,7 +188,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -195,12 +204,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
@@ -217,14 +226,14 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
+			port <private_27_<narrow_cast>>:
 			port <private_28_<narrow_cast>>:
-			port <private_29_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x1042fdf10>, 1: <target.AInstance object at 0x1042fe690>}
+		New State: {0: <target.AInstance object at 0x10606eb10>, 1: <target.AInstance object at 0x10606ef30>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -239,12 +248,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[1]']))
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x1042fdf10>, 1: <target.AInstance object at 0x1042fe690>}
+		New State: {0: <target.AInstance object at 0x10606eb10>, 1: <target.AInstance object at 0x10606ef30>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[1]']))
@@ -260,13 +269,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[1]']))
 			port <input>:
-			port <private_27_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+			port <private_26_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[1]']))
@@ -278,7 +287,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -290,7 +299,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -307,12 +316,12 @@ __  Current Time:   0.000000 __________________________________________
 			port <input>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[1]', [1]]))
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[1]', [1]]))
@@ -331,14 +340,14 @@ __  Current Time:   0.000000 __________________________________________
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[1]', [1]]))
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
 			port <input>:
+			port <private_27_<narrow_cast>>:
 			port <private_28_<narrow_cast>>:
-			port <private_29_<narrow_cast>>:
 		New State: {}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -355,7 +364,7 @@ __  Current Time:   0.000000 __________________________________________
 			port <input>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[1]', [1]]))
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Next scheduled internal transition at time 0.000000
 
 
@@ -378,13 +387,13 @@ __  Current Time:   0.000000 __________________________________________
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[1]', [1]]))
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
 			port <input>:
-			port <private_27_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+			port <private_26_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042fca40>
+		New State: <target.ObjectManagerState object at 0x1060f84d0>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[1]', [1]]))
@@ -397,7 +406,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -409,7 +418,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x1042fc890>}
+		New State: {0: <target.MainAppInstance object at 0x1060f9eb0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:

+ 72 - 43
tests/Test14/PyDEVS/log.txt

@@ -25,13 +25,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 			port <input>:
-			port <private_30_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+			port <private_29_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
@@ -46,12 +46,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -68,8 +68,8 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>: 
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <input>: 
-			port <private_30_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+			port <private_29_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
@@ -82,7 +82,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>: 
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -98,22 +98,22 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
-			port <private_31_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x10424d820>}
+			port <private_30_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x1060f5040>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 			port <linkA>:
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -128,12 +128,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x10424d820>}
+		New State: {0: <target.AInstance object at 0x1060f5040>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -141,6 +141,15 @@ __  Current Time:   0.000000 __________________________________________
 		Next scheduled internal transition at time inf
 
 
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
+		Next scheduled internal transition at time inf
+
+
 __  Current Time:   0.000000 __________________________________________ 
 
 
@@ -149,13 +158,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_30_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+			port <private_29_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -167,7 +176,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -179,7 +188,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -195,12 +204,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
@@ -217,13 +226,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_31_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x10424d820>}
+			port <private_30_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x1060f5040>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -238,18 +247,18 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x10424d820>}
+		New State: {0: <target.AInstance object at 0x1060f5040>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <ui>:
 				(event name: statechart_started_succesfully; port: ui; parameters: ['0.00'])
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 __  Current Time:   0.000000 __________________________________________ 
@@ -260,13 +269,21 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_30_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+			port <private_29_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Next scheduled internal transition at time 0.000000
 
 
+	INTERNAL TRANSITION in model <controller.A>
+		New State: {0: <target.AInstance object at 0x1060f5040>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
@@ -278,7 +295,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -290,7 +307,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -306,12 +323,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
@@ -328,13 +345,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
 			port <input>:
-			port <private_31_<narrow_cast>>:
+			port <private_30_<narrow_cast>>:
 		New State: {}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -349,7 +366,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Next scheduled internal transition at time 0.000000
 
 
@@ -370,13 +387,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
 			port <input>:
-			port <private_30_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+			port <private_29_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10272ef60>
+		New State: <target.ObjectManagerState object at 0x10606e930>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
@@ -388,7 +405,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -400,11 +417,23 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104303ef0>}
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 				(event name: instance_deleted_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])
 			port <linkA>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10606e720>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
 		Next scheduled internal transition at time inf
 

+ 72 - 43
tests/Test15/PyDEVS/log.txt

@@ -25,13 +25,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 			port <input>:
-			port <private_32_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+			port <private_31_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
@@ -46,12 +46,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -68,8 +68,8 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>: 
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <input>: 
-			port <private_32_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+			port <private_31_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
@@ -82,7 +82,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>: 
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -98,22 +98,22 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
-			port <private_33_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x10424e120>}
+			port <private_32_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x106041280>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 			port <linkA>:
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -128,12 +128,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x10424e120>}
+		New State: {0: <target.AInstance object at 0x106041280>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -141,6 +141,15 @@ __  Current Time:   0.000000 __________________________________________
 		Next scheduled internal transition at time inf
 
 
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
+		Next scheduled internal transition at time inf
+
+
 __  Current Time:   0.000000 __________________________________________ 
 
 
@@ -149,13 +158,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_32_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+			port <private_31_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -167,7 +176,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -179,7 +188,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -195,12 +204,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
@@ -217,13 +226,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_33_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x10424e120>}
+			port <private_32_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x106041280>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -238,18 +247,18 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x10424e120>}
+		New State: {0: <target.AInstance object at 0x106041280>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <ui>:
 				(event name: statechart_started_succesfully; port: ui; parameters: ['0.00'])
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 __  Current Time:   0.000000 __________________________________________ 
@@ -260,13 +269,21 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_32_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+			port <private_31_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Next scheduled internal transition at time 0.000000
 
 
+	INTERNAL TRANSITION in model <controller.A>
+		New State: {0: <target.AInstance object at 0x106041280>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
@@ -278,7 +295,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -290,7 +307,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -306,12 +323,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
@@ -328,13 +345,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: delete_instance; port: None; parameters: ['linkA[0]', [0]]))
 			port <input>:
-			port <private_33_<narrow_cast>>:
+			port <private_32_<narrow_cast>>:
 		New State: {}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -349,7 +366,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Next scheduled internal transition at time 0.000000
 
 
@@ -370,13 +387,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
 			port <input>:
-			port <private_32_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+			port <private_31_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x104273080>
+		New State: <target.ObjectManagerState object at 0x105f24a70>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_deleted; port: None; parameters: ['linkA[0]', [0]]))
@@ -388,7 +405,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -400,11 +417,23 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424ec90>}
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 				(event name: instance_deleted_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])
 			port <linkA>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1060652b0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
 		Next scheduled internal transition at time inf
 

+ 0 - 1
tests/Test2/PyDEVS/faulty_log.txt

@@ -1 +0,0 @@
-1.00 (event name: test_event; port: ui; parameters: ['1.00'])

+ 50 - 24
tests/Test2/PyDEVS/log.txt

@@ -2,12 +2,17 @@
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INITIAL CONDITIONS in model <controller.MainApp>
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.ObjectManager>
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
 		Initial State: None
 		Next scheduled internal transition at time 0.000000
 
@@ -15,59 +20,69 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 			port <input>:
 			port <private_2_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10426e8a0>}
+		New State: {0: <target.MainAppInstance object at 0x1048b9fa0>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10426e030>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x1048b9d90>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 		Next scheduled internal transition at time inf
 
 
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x10426e030>
+		New State: <target.ObjectManagerState object at 0x1048b9d90>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426e8a0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b9fa0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <ui>:
-		Next scheduled internal transition at time 1.000000
+		Next scheduled internal transition at time 0.000000
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	CONFLUENT TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
-			port <obj_manager_in>:
+			port <obj_manager_in>: 
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-			port <input>:
-			port <private_2_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10426e8a0>}
+			port <input>: 
+			port <private_2_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x1048b9fa0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10426e030>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x1048b9d90>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -77,8 +92,19 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426e8a0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b9fa0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b9fa0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -88,8 +114,8 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   1.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426e8a0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b9fa0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -99,8 +125,8 @@ __  Current Time:   1.000000 __________________________________________
 __  Current Time:   1.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426e8a0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1048b9fa0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:

+ 67 - 41
tests/Test22/PyDEVS/log.txt

@@ -25,13 +25,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
 			port <input>:
-			port <private_34_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+			port <private_33_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
@@ -46,12 +46,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -68,8 +68,8 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>: 
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <input>: 
-			port <private_34_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+			port <private_33_<narrow_cast>>: 
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
@@ -82,7 +82,7 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>: 
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Output Port Configuration:
 			port <port1>:
 				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
@@ -98,22 +98,22 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
-			port <private_35_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x104539af0>}
+			port <private_34_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x106041670>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 			port <linkA>:
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -128,12 +128,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x104539af0>}
+		New State: {0: <target.AInstance object at 0x106041670>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -141,6 +141,15 @@ __  Current Time:   0.000000 __________________________________________
 		Next scheduled internal transition at time inf
 
 
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
+		Next scheduled internal transition at time inf
+
+
 __  Current Time:   0.000000 __________________________________________ 
 
 
@@ -149,13 +158,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_34_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+			port <private_33_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
@@ -167,7 +176,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -179,7 +188,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -195,12 +204,12 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
@@ -217,13 +226,13 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_35_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x104539af0>}
+			port <private_34_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x106041670>}
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -238,18 +247,18 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x104539af0>}
+		New State: {0: <target.AInstance object at 0x106041670>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <ui>:
 				(event name: statechart_started_succesfully; port: ui; parameters: ['0.00'])
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 __  Current Time:   0.000000 __________________________________________ 
@@ -260,13 +269,21 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_34_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+			port <private_33_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Next scheduled internal transition at time 0.000000
 
 
+	INTERNAL TRANSITION in model <controller.A>
+		New State: {0: <target.AInstance object at 0x106041670>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Output Port Configuration:
 			port <port1>:
 				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
@@ -278,7 +295,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -290,7 +307,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -306,19 +323,19 @@ __  Current Time:   0.000000 __________________________________________
 		Input Port Configuration:
 			port <input>:
 				('MainApp', 'A', (event name: link_check; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Next scheduled internal transition at time 0.000000
 
 
 	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10424eff0>}
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 				('MainApp', 'A', (event name: link_check; port: None; parameters: ['linkA[0]']))
 			port <ui>:
 				(event name: instance_disassociated_succesfully; port: ui; parameters: ['0.00', ['linkA[0]']])
 			port <linkA>:
-		Next scheduled internal transition at time inf
+		Next scheduled internal transition at time 0.000000
 
 
 __  Current Time:   0.000000 __________________________________________ 
@@ -329,13 +346,22 @@ __  Current Time:   0.000000 __________________________________________
 			port <obj_manager_in>:
 				('MainApp', 'A', (event name: link_check; port: None; parameters: ['linkA[0]']))
 			port <input>:
-			port <private_35_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x104539af0>}
+			port <private_34_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x106041670>}
 		Next scheduled internal transition at time 0.000000
 
 
+	INTERNAL TRANSITION in model <controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x1060422a0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
+		Next scheduled internal transition at time inf
+
+
 	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10424d9d0>
+		New State: <target.ObjectManagerState object at 0x1060420c0>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
@@ -347,7 +373,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x104539af0>}
+		New State: {0: <target.AInstance object at 0x106041670>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -358,7 +384,7 @@ __  Current Time:   0.000000 __________________________________________
 
 
 	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x104539af0>}
+		New State: {0: <target.AInstance object at 0x106041670>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:

+ 0 - 5
tests/Test3/PyDEVS/faulty_log.txt

@@ -1,5 +0,0 @@
-2.00 (event name: test_event; port: ui; parameters: ['1', '1.00'])
-3.00 (event name: test_event; port: ui; parameters: ['2', '2.00'])
-4.00 (event name: test_event; port: ui; parameters: ['3', '3.00'])
-5.00 (event name: test_event; port: ui; parameters: ['4', '4.00'])
-5.00 (event name: test_event; port: ui; parameters: ['5', '5.00'])

+ 120 - 39
tests/Test3/PyDEVS/log.txt

@@ -2,12 +2,17 @@
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INITIAL CONDITIONS in model <controller.MainApp>
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.ObjectManager>
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
 		Initial State: None
 		Next scheduled internal transition at time 0.000000
 
@@ -15,40 +20,51 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_3_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10426dd00>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480ac60>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x10426dd00>
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+		New State: <target.ObjectManagerState object at 0x10480ac60>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <ui>:
 		Next scheduled internal transition at time 1.000000
 
@@ -56,29 +72,61 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_3_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10426dd00>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480ac60>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 1.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   1.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -88,70 +136,103 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   1.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
+				[(event name: test_event; port: ui; parameters: ['1', '1.00'])]
 		Next scheduled internal transition at time 2.000000
 
 
 __  Current Time:   2.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: test_event; port: ui; parameters: ['1', '1.00'])
+		Next scheduled internal transition at time 2.000000
+
+
+__  Current Time:   2.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+				[(event name: test_event; port: ui; parameters: ['2', '2.00'])]
 		Next scheduled internal transition at time 3.000000
 
 
 __  Current Time:   3.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 3.000000
+
+
+__  Current Time:   3.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+				[(event name: test_event; port: ui; parameters: ['3', '3.00'])]
+		Next scheduled internal transition at time 4.000000
+
+
+__  Current Time:   4.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: test_event; port: ui; parameters: ['2', '2.00'])
 		Next scheduled internal transition at time 4.000000
 
 
 __  Current Time:   4.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: test_event; port: ui; parameters: ['3', '3.00'])
+				[(event name: test_event; port: ui; parameters: ['4', '4.00'])]
 		Next scheduled internal transition at time 5.000000
 
 
 __  Current Time:   5.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: test_event; port: ui; parameters: ['4', '4.00'])
 		Next scheduled internal transition at time 5.000000
 
 
 __  Current Time:   5.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426f5c0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104809d90>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: test_event; port: ui; parameters: ['5', '5.00'])
+				[(event name: test_event; port: ui; parameters: ['5', '5.00'])]
 		Next scheduled internal transition at time inf
 

+ 14 - 0
tests/Test3/PyDEVS/runner.py

@@ -0,0 +1,14 @@
+import tkinter as tk
+import target as target
+from sccd.runtime.libs.ui_v2 import UI
+from sccd.runtime.DEVS_loop import DEVSSimulator
+
+if __name__ == '__main__':
+	model = target.Controller(name="controller")
+
+	sim = DEVSSimulator(model)
+	sim.setRealTime(False)
+
+	sim.setVerbose(None)
+
+	sim.simulate()

+ 0 - 1
tests/Test4/PyDEVS/faulty_log.txt

@@ -1 +0,0 @@
-0.00 (event name: output_event; port: ui; parameters: ['0.00'])

+ 60 - 23
tests/Test4/PyDEVS/log.txt

@@ -2,12 +2,17 @@
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INITIAL CONDITIONS in model <controller.MainApp>
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.ObjectManager>
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
 		Initial State: None
 		Next scheduled internal transition at time 0.000000
 
@@ -15,73 +20,105 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_4_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104269f70>}
+		New State: {0: <target.MainAppInstance object at 0x10480ad80>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041cc620>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x103dc3200>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x1041cc620>
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+		New State: <target.ObjectManagerState object at 0x103dc3200>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104269f70>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480ad80>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+			port <ui>:
+				[(event name: output_event; port: ui; parameters: ['0.00'])]
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480ad80>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <ui>:
-				(event name: output_event; port: ui; parameters: ['0.00'])
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_4_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104269f70>}
+		New State: {0: <target.MainAppInstance object at 0x10480ad80>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1041cc620>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x103dc3200>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104269f70>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480ad80>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480ad80>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 		Next scheduled internal transition at time inf
 
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time inf
+

+ 0 - 1
tests/Test5/PyDEVS/faulty_log.txt

@@ -1 +0,0 @@
-0.00 (event name: output_event; port: ui; parameters: ['0.00'])

+ 60 - 23
tests/Test5/PyDEVS/log.txt

@@ -2,12 +2,17 @@
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INITIAL CONDITIONS in model <controller.MainApp>
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.ObjectManager>
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
 		Initial State: None
 		Next scheduled internal transition at time 0.000000
 
@@ -15,73 +20,105 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_5_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10426a180>}
+		New State: {0: <target.MainAppInstance object at 0x10480dc70>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10426fb60>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480c560>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x10426fb60>
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+		New State: <target.ObjectManagerState object at 0x10480c560>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426a180>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480dc70>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+			port <ui>:
+				[(event name: output_event; port: ui; parameters: ['0.00'])]
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480dc70>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
 			port <ui>:
-				(event name: output_event; port: ui; parameters: ['0.00'])
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_5_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x10426a180>}
+		New State: {0: <target.MainAppInstance object at 0x10480dc70>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x10426fb60>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480c560>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x10426a180>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480dc70>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480dc70>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
 		Next scheduled internal transition at time inf
 
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time inf
+

+ 0 - 1
tests/Test6/PyDEVS/faulty_log.txt

@@ -1 +0,0 @@
-0.00 (event name: instance_created_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])

+ 96 - 64
tests/Test6/PyDEVS/log.txt

@@ -2,17 +2,22 @@
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INITIAL CONDITIONS in model <controller.A>
+	INITIAL CONDITIONS in model <Tester.Controller.A>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.MainApp>
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.ObjectManager>
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
 		Initial State: None
 		Next scheduled internal transition at time 0.000000
 
@@ -20,21 +25,21 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_6_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104270d10>}
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042711c0>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480d880>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <port2>:
 		Next scheduled internal transition at time inf
 
@@ -42,19 +47,19 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x1042711c0>
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+		New State: <target.ObjectManagerState object at 0x10480d880>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104270d10>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <ui>:
 			port <linkA>:
 		Next scheduled internal transition at time 0.000000
@@ -63,102 +68,119 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	CONFLUENT TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
-			port <obj_manager_in>: 
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-			port <input>: 
-			port <private_6_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x104270d10>}
+			port <input>:
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))]
+		New State: <target.ObjectManagerState object at 0x10480d880>
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))]
 			port <ui>:
 			port <linkA>:
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	EXTERNAL TRANSITION in model <Tester.Controller.A>
+		Input Port Configuration:
+			port <obj_manager_in>:
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))]
+			port <input>:
+			port <private_7_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x10480f560>}
 		Next scheduled internal transition at time 0.000000
 
 
-	CONFLUENT TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
-			port <input>: 
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x1042711c0>
+			port <obj_manager_in>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+			port <input>:
+			port <private_6_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480d880>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <port2>:
-		Next scheduled internal transition at time 0.000000
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))]
+		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.A>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
-			port <obj_manager_in>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
-			port <private_7_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x104272ae0>}
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
+		New State: <target.ObjectManagerState object at 0x10480d880>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104270d10>}
+	INTERNAL TRANSITION in model <Tester.Controller.A>
+		New State: {0: <target.AInstance object at 0x10480f560>}
 		Output Port Configuration:
 			port <obj_manager_out>:
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <ui>:
-			port <linkA>:
-		Next scheduled internal transition at time inf
-
-
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042711c0>
-		Output Port Configuration:
-			port <port1>:
-			port <port2>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
-		Input Port Configuration:
-			port <input>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1042711c0>
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x104272ae0>}
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
 			port <ui>:
+			port <linkA>:
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <input>:
 			port <private_6_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104270d10>}
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042711c0>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480d880>
 		Output Port Configuration:
 			port <port1>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <port2>:
 		Next scheduled internal transition at time inf
 
@@ -166,8 +188,8 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104270d10>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -178,12 +200,22 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104270d10>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480d8b0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: instance_created_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])
+				[(event name: instance_created_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])]
 			port <linkA>:
 		Next scheduled internal transition at time inf
 
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time inf
+

+ 0 - 3
tests/Test7/PyDEVS/faulty_log.txt

@@ -1,3 +0,0 @@
-0.00 (event name: instance_created_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])
-0.00 (event name: statechart_started_succesfully; port: ui; parameters: ['0.00'])
-0.00 (event name: instance_started_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])

+ 137 - 94
tests/Test7/PyDEVS/log.txt

@@ -2,17 +2,22 @@
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INITIAL CONDITIONS in model <controller.A>
+	INITIAL CONDITIONS in model <Tester.Controller.A>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.MainApp>
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.ObjectManager>
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
 		Initial State: None
 		Next scheduled internal transition at time 0.000000
 
@@ -20,21 +25,21 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_8_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <port2>:
 		Next scheduled internal transition at time inf
 
@@ -42,19 +47,19 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <ui>:
 			port <linkA>:
 		Next scheduled internal transition at time 0.000000
@@ -63,102 +68,119 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	CONFLUENT TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
-			port <obj_manager_in>: 
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-			port <input>: 
-			port <private_8_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+			port <input>:
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))]
+		New State: <target.ObjectManagerState object at 0x104806360>
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))]
 			port <ui>:
 			port <linkA>:
+		Next scheduled internal transition at time inf
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	EXTERNAL TRANSITION in model <Tester.Controller.A>
+		Input Port Configuration:
+			port <obj_manager_in>:
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))]
+			port <input>:
+			port <private_9_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x10480c710>}
 		Next scheduled internal transition at time 0.000000
 
 
-	CONFLUENT TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
-			port <input>: 
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+			port <obj_manager_in>:
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+			port <input>:
+			port <private_8_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <port2>:
-		Next scheduled internal transition at time 0.000000
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))]
+		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.A>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
-			port <obj_manager_in>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 			port <input>:
-			port <private_9_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x104274b30>}
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+	INTERNAL TRANSITION in model <Tester.Controller.A>
+		New State: {0: <target.AInstance object at 0x10480c710>}
 		Output Port Configuration:
 			port <obj_manager_out>:
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <ui>:
-			port <linkA>:
-		Next scheduled internal transition at time inf
-
-
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042214f0>
-		Output Port Configuration:
-			port <port1>:
-			port <port2>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A']))
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
-		Input Port Configuration:
-			port <input>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+			port <ui>:
+			port <linkA>:
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x104274b30>}
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
 			port <ui>:
+			port <linkA>:
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <input>:
 			port <private_8_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Output Port Configuration:
 			port <port1>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <port2>:
 		Next scheduled internal transition at time inf
 
@@ -166,8 +188,8 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -178,12 +200,12 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: instance_created_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])
+				[(event name: instance_created_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])]
 			port <linkA>:
 		Next scheduled internal transition at time 0.000000
 
@@ -191,19 +213,19 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
-				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+				[('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))]
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
+				[('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))]
 			port <ui>:
 			port <linkA>:
 		Next scheduled internal transition at time inf
@@ -212,64 +234,75 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.A>
+	EXTERNAL TRANSITION in model <Tester.Controller.A>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
+				[('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))]
 			port <input>:
 			port <private_9_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x104274b30>}
+		New State: {0: <target.AInstance object at 0x10480c710>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Output Port Configuration:
 			port <port1>:
 			port <port2>:
-				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
+				[('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))]
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
-				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+				[('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))]
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x104274b30>}
+	INTERNAL TRANSITION in model <Tester.Controller.A>
+		New State: {0: <target.AInstance object at 0x10480c710>}
+		Output Port Configuration:
+			port <obj_manager_out>:
+				[('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))]
+			port <ui>:
+				[(event name: statechart_started_succesfully; port: ui; parameters: ['0.00'])]
+		Next scheduled internal transition at time 0.000000
+
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.A>
+		New State: {0: <target.AInstance object at 0x10480c710>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <ui>:
-				(event name: statechart_started_succesfully; port: ui; parameters: ['0.00'])
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
+				[('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))]
 			port <input>:
 			port <private_8_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x1042214f0>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x104806360>
 		Output Port Configuration:
 			port <port1>:
-				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
+				[('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))]
 			port <port2>:
 		Next scheduled internal transition at time inf
 
@@ -277,8 +310,8 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
@@ -289,12 +322,22 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104272ed0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x104806150>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: instance_started_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])
+				[(event name: instance_started_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])]
 			port <linkA>:
 		Next scheduled internal transition at time inf
 
+
+__  Current Time:   0.000000 __________________________________________ 
+
+
+	INTERNAL TRANSITION in model <Tester.Tester>
+		New State: None
+		Output Port Configuration:
+			port <ui>:
+		Next scheduled internal transition at time inf
+

+ 78 - 147
tests/Test8/PyDEVS/log.txt

@@ -2,17 +2,22 @@
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INITIAL CONDITIONS in model <controller.A>
+	INITIAL CONDITIONS in model <Tester.Controller.A>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.MainApp>
+	INITIAL CONDITIONS in model <Tester.Controller.MainApp>
 		Initial State: None
 		Next scheduled internal transition at time inf
 
 
-	INITIAL CONDITIONS in model <controller.ObjectManager>
+	INITIAL CONDITIONS in model <Tester.Controller.ObjectManager>
+		Initial State: None
+		Next scheduled internal transition at time 0.000000
+
+
+	INITIAL CONDITIONS in model <Tester.Tester>
 		Initial State: None
 		Next scheduled internal transition at time 0.000000
 
@@ -20,21 +25,21 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_10_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x102a27b90>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480d850>
 		Output Port Configuration:
 			port <port1>:
-				('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: start_instance; port: None; parameters: ['MainApp[0]']))]
 			port <port2>:
 		Next scheduled internal transition at time inf
 
@@ -42,19 +47,19 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
 			port <input>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-		New State: <target.ObjectManagerState object at 0x102a27b90>
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
+		New State: <target.ObjectManagerState object at 0x10480d850>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <ui>:
 			port <linkA>:
 		Next scheduled internal transition at time 0.000000
@@ -63,127 +68,85 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	CONFLUENT TRANSITION in model <controller.MainApp>
-		Input Port Configuration:
-			port <obj_manager_in>: 
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-			port <input>: 
-			port <private_10_<narrow_cast>>: 
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
-		Output Port Configuration:
-			port <obj_manager_out>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}]))
-			port <ui>:
-			port <linkA>:
-		Next scheduled internal transition at time 0.000000
-
-
-	CONFLUENT TRANSITION in model <controller.ObjectManager>
-		Input Port Configuration:
-			port <input>: 
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}]))
-		New State: <target.ObjectManagerState object at 0x102a27b90>
-		Output Port Configuration:
-			port <port1>:
-				('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))
-			port <port2>:
-		Next scheduled internal transition at time 0.000000
-
-
-__  Current Time:   0.000000 __________________________________________ 
-
-
-	EXTERNAL TRANSITION in model <controller.A>
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
 		Input Port Configuration:
-			port <obj_manager_in>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}]))
 			port <input>:
-			port <private_11_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x1042752e0>}
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}]))]
+		New State: <target.ObjectManagerState object at 0x10480d850>
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}]))]
 			port <ui>:
 			port <linkA>:
 		Next scheduled internal transition at time inf
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x102a27b90>
-		Output Port Configuration:
-			port <port1>:
-			port <port2>:
-				('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}]))
-		Next scheduled internal transition at time inf
-
-
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
+	EXTERNAL TRANSITION in model <Tester.Controller.A>
 		Input Port Configuration:
+			port <obj_manager_in>:
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}]))]
 			port <input>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x102a27b90>
+			port <private_11_<narrow_cast>>:
+		New State: {0: <target.AInstance object at 0x104810e60>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x1042752e0>}
-		Output Port Configuration:
-			port <obj_manager_out>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
-			port <ui>:
-		Next scheduled internal transition at time inf
-
-
-__  Current Time:   0.000000 __________________________________________ 
-
-
-	EXTERNAL TRANSITION in model <controller.MainApp>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <input>:
 			port <private_10_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x102a27b90>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480d850>
 		Output Port Configuration:
 			port <port1>:
-				('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))
+				[('MainApp', 'MainApp', (event name: instance_started; port: None; parameters: ['MainApp[0]']))]
 			port <port2>:
+				[('MainApp', 'A', (event name: create_instance; port: None; parameters: ['linkA', 'A', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}]))]
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		Input Port Configuration:
+			port <input>:
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
+		New State: <target.ObjectManagerState object at 0x10480d850>
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.A>
+		New State: {0: <target.AInstance object at 0x104810e60>}
 		Output Port Configuration:
 			port <obj_manager_out>:
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <ui>:
-			port <linkA>:
-		Next scheduled internal transition at time 0.000000
+		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
-				(event name: instance_created_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])
 			port <linkA>:
 		Next scheduled internal transition at time 0.000000
 
@@ -191,19 +154,10 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
-		Input Port Configuration:
-			port <input>:
-				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x102a27b90>
-		Next scheduled internal transition at time 0.000000
-
-
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
 			port <ui>:
 			port <linkA>:
 		Next scheduled internal transition at time inf
@@ -212,77 +166,46 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.A>
+	EXTERNAL TRANSITION in model <Tester.Controller.MainApp>
 		Input Port Configuration:
 			port <obj_manager_in>:
-				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <input>:
-			port <private_11_<narrow_cast>>:
-		New State: {0: <target.AInstance object at 0x1042752e0>}
+			port <private_10_<narrow_cast>>:
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x102a27b90>
+	INTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		New State: <target.ObjectManagerState object at 0x10480d850>
 		Output Port Configuration:
 			port <port1>:
+				[('A', 'MainApp', (event name: instance_created; port: None; parameters: ['linkA[0]']))]
 			port <port2>:
-				('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))
 		Next scheduled internal transition at time inf
 
 
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	EXTERNAL TRANSITION in model <controller.ObjectManager>
-		Input Port Configuration:
-			port <input>:
-				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
-		New State: <target.ObjectManagerState object at 0x102a27b90>
-		Next scheduled internal transition at time 0.000000
-
-
-	INTERNAL TRANSITION in model <controller.A>
-		New State: {0: <target.AInstance object at 0x1042752e0>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
-				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
 			port <ui>:
-				(event name: statechart_started_succesfully; port: ui; parameters: ['0.00'])
-				(event name: constructor_initialized_succesfully; port: ui; parameters: ['0.00', 1, 3.14, 'test', [1, 2, 3], {'1': 1, '2': 2, '3': 3}])
-		Next scheduled internal transition at time inf
-
-
-__  Current Time:   0.000000 __________________________________________ 
-
-
-	EXTERNAL TRANSITION in model <controller.MainApp>
-		Input Port Configuration:
-			port <obj_manager_in>:
-				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
-			port <input>:
-			port <private_10_<narrow_cast>>:
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+			port <linkA>:
 		Next scheduled internal transition at time 0.000000
 
 
-	INTERNAL TRANSITION in model <controller.ObjectManager>
-		New State: <target.ObjectManagerState object at 0x102a27b90>
-		Output Port Configuration:
-			port <port1>:
-				('A', 'MainApp', (event name: instance_started; port: None; parameters: ['linkA[0]']))
-			port <port2>:
-		Next scheduled internal transition at time inf
-
-
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
 			port <ui>:
+				[(event name: instance_created_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])]
 			port <linkA>:
 		Next scheduled internal transition at time 0.000000
 
@@ -290,12 +213,20 @@ __  Current Time:   0.000000 __________________________________________
 __  Current Time:   0.000000 __________________________________________ 
 
 
-	INTERNAL TRANSITION in model <controller.MainApp>
-		New State: {0: <target.MainAppInstance object at 0x104275340>}
+	EXTERNAL TRANSITION in model <Tester.Controller.ObjectManager>
+		Input Port Configuration:
+			port <input>:
+				[('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))]
+		New State: <target.ObjectManagerState object at 0x10480d850>
+		Next scheduled internal transition at time 0.000000
+
+
+	INTERNAL TRANSITION in model <Tester.Controller.MainApp>
+		New State: {0: <target.MainAppInstance object at 0x10480e3f0>}
 		Output Port Configuration:
 			port <obj_manager_out>:
+				[('MainApp', 'A', (event name: start_instance; port: None; parameters: ['linkA[0]']))]
 			port <ui>:
-				(event name: instance_started_succesfully; port: ui; parameters: ['0.00', 'linkA[0]'])
 			port <linkA>:
 		Next scheduled internal transition at time inf
 

File diff ditekan karena terlalu besar
+ 259 - 158
tests/Test9/PyDEVS/log.txt