def __init__(self, collections, designCandidates, workload, config, costModel, initialDesign, bestCost, channel=None, lock=None, worker_id=None): AbstractDesigner.__init__(self, collections, workload, config) self.costModel = costModel self.init_bestDesign = initialDesign.copy() self.init_bestCost = bestCost self.timeout = self.config.getint(configutil.SECT_MULTI_SEARCH, 'time_for_lnssearch') self.patient_time = self.config.getint(configutil.SECT_MULTI_SEARCH, 'patient_time') # If we have 4 or less collections, we run bbsearch till it finishes if len(self.collections) <= constants.EXAUSTED_SEARCH_BAR: self.init_bbsearch_time = INIFITY self.init_relaxRatio = 1.0 self.isExhaustedSearch = True else: self.init_bbsearch_time = self.config.getfloat(configutil.SECT_MULTI_SEARCH, 'init_bbsearch_time') self.init_relaxRatio = self.config.getfloat(configutil.SECT_MULTI_SEARCH, 'init_relax_ratio') self.isExhaustedSearch = False self.ratio_step = self.config.getfloat(configutil.SECT_MULTI_SEARCH, 'relax_ratio_step') self.max_ratio = self.config.getfloat(configutil.SECT_MULTI_SEARCH, 'max_relax_ratio') self.designCandidates = designCandidates self.channel = channel self.bbsearch_method = None self.bestLock = lock self.worker_id = worker_id self.debug = False ### Test self.count = 0
def __init__(self, collections, designCandidates, workload, config, costModel, initialDesign, bestCost, channel=None, lock=None, worker_id=None): AbstractDesigner.__init__(self, collections, workload, config) self.costModel = costModel self.init_bestDesign = initialDesign.copy() self.init_bestCost = bestCost self.timeout = self.config.getint(configutil.SECT_MULTI_SEARCH, 'time_for_lnssearch') self.patient_time = self.config.getint(configutil.SECT_MULTI_SEARCH, 'patient_time') # If we have 4 or less collections, we run bbsearch till it finishes if len(self.collections) <= constants.EXAUSTED_SEARCH_BAR: self.init_bbsearch_time = INIFITY self.init_relaxRatio = 1.0 self.isExhaustedSearch = True else: self.init_bbsearch_time = self.config.getfloat( configutil.SECT_MULTI_SEARCH, 'init_bbsearch_time') self.init_relaxRatio = self.config.getfloat( configutil.SECT_MULTI_SEARCH, 'init_relax_ratio') self.isExhaustedSearch = False self.ratio_step = self.config.getfloat(configutil.SECT_MULTI_SEARCH, 'relax_ratio_step') self.max_ratio = self.config.getfloat(configutil.SECT_MULTI_SEARCH, 'max_relax_ratio') self.designCandidates = designCandidates self.channel = channel self.bbsearch_method = None self.bestLock = lock self.worker_id = worker_id self.debug = False ### Test self.count = 0
def __init__(self, collections, workload, config): AbstractDesigner.__init__(self, collections, workload, config)
def __init__(self, collections, workload, config): AbstractDesigner.__init__(self, collections, workload, config) self.address_size = constants.DEFAULT_ADDRESS_SIZE self.debug = LOG.isEnabledFor(logging.DEBUG)