Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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)
def __init__(self):
Controller.__init__(self)
self._can_work = True
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
def __init__(self):
"Initialize the controller."
Controller.__init__(self)
self.workers = Queue.Queue()
self.messages = Queue.Queue()
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