How to use the ciw.deadlock function in Ciw

To help you get started, we’ve selected a few Ciw examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CiwPython / Ciw / ciw / simulation.py View on Github external
def __init__(self, network,
                 exact=False,
                 name='Simulation',
                 tracker=trackers.StateTracker(),
                 deadlock_detector=deadlock.NoDetection(),
                 node_class=None,
                 arrival_node_class=None):
        """
        Initialise an instance of the simualation.
        """
        self.current_time = 0.0
        self.network = network
        self.set_classes(node_class, arrival_node_class)
        if exact:
            self.NodeType = ExactNode
            self.ArrivalNodeType = ExactArrivalNode
            getcontext().prec = exact

        self.name = name
        self.deadlock_detector = deadlock_detector
        self.inter_arrival_times = self.find_arrival_dists()