How to use the poap.controller.Controller.__init__ function in POAP

To help you get started, we’ve selected a few POAP 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 dbindel / POAP / poap / mpiserve.py View on Github external
def __init__(self, strategy=None):
        "Initialize the controller."
        Controller.__init__(self)
        self._workers = [w for w in range(1, nproc)]
        self._recids = {}
        self._needs_ping = False
        self.strategy = strategy
        self.add_term_callback(self._send_shutdown)
github SanPen / GridCal / src / GridCal / Engine / Replacements / mpiserve.py View on Github external
def __init__(self, strategy=None):
        "Initialize the controller."
        Controller.__init__(self)
        self._workers = [w for w in range(1, nproc)]
        self._recids = {}
        self._needs_ping = False
        self.strategy = strategy
        self.add_term_callback(self._send_shutdown)
github dbindel / POAP / poap / controller.py View on Github external
def __init__(self):
        Controller.__init__(self)
        self._can_work = True
github dbindel / POAP / poap / controller.py View on Github external
def __init__(self, objective, skip=False):
        """Initialize the controller.

        Args:
            objective: Objective function
            skip: if True, skip over "None" proposals
        """
        Controller.__init__(self)
        self.objective = objective
        self.skip = skip
github dbindel / POAP / poap / controller.py View on Github external
def __init__(self):
        "Initialize the controller."
        Controller.__init__(self)
        self.workers = Queue.Queue()
        self.messages = Queue.Queue()
github dbindel / POAP / poap / controller.py View on Github external
def __init__(self, objective, delay, workers):
        """Initialize the controller.

        Args:
            objective: Objective function
            delay: Time delay function (takes no arguments)
            workers: Number of workers available in simulation
        """
        Controller.__init__(self)
        self.objective = objective
        self.delay = delay
        self.workers = workers
        self.time = 0
        self.time_events = []
        self.event_id = 0