How to use the ciw.deadlock_detector.NoDeadlockDetection 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 / deadlock_detector.py View on Github external
pass

    def action_at_blockage(self, individual, next_node):
        """
        The action takn at the 'block_individual' method of the node.
        """
        pass

    def action_at_detach_server(self, server):
        """
        The action taken at the 'detatch_server' method of the node.
        """
        pass


class StateDigraphMethod(NoDeadlockDetection):
    """
    The state digraph method uses:
        Vertices -- Servers
        Edges -- Blockage relationship such that there is a
        directed edge from vertices j -> k iff the customer
        at server j is blocked from entering the node that
        contains k.
    """
    def __init__(self):
        """
        Initialises the state digraph detection mechanism class
        """
        self.statedigraph = nx.DiGraph()

    def initialise_at_node(self, node):
        """