How to use the ciw.exit_node.ExitNode 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
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()
        self.service_times = self.find_service_dists()
        self.batch_sizes = self.find_batching_dists()
        self.number_of_priority_classes = self.network.number_of_priority_classes
        self.transitive_nodes = [self.NodeType(i + 1, self) for i in range(network.number_of_nodes)]
        self.nodes = ([self.ArrivalNodeType(self)] + self.transitive_nodes + [ExitNode()])
        self.statetracker = tracker
        self.statetracker.initialise(self)
        self.times_dictionary = {self.statetracker.hash_state(): 0.0}
        self.times_to_deadlock = {}
        self.rejection_dict = self.nodes[0].rejection_dict
        self.baulked_dict = self.nodes[0].baulked_dict
        self.unchecked_blockage = False