How to use the ciw.server.Server 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 / node.py View on Github external
def add_new_servers(self, shift_indx):
        """
        Add appropriate amount of servers for the given shift.
        """
        num_servers = self.schedule[shift_indx][1]
        for i in range(num_servers):
            self.highest_id += 1
            self.servers.append(Server(self, self.highest_id, self.next_event_date))
github CiwPython / Ciw / ciw / exactnode.py View on Github external
def create_starting_servers(self):
        """
        Initialise the servers
        """
        return [Server(self, i + 1, Decimal('0.0')) for i in range(self.c)]
github CiwPython / Ciw / ciw / node.py View on Github external
def create_starting_servers(self):
        """
        Initialise the servers.
        """
        return [Server(self, i + 1, 0.0) for i in range(self.c)]