def __init__(self, search_space, fitness_function, IDW, noisemap, x_y_limits, z_sigma, work_space, random_state, init_network, sample_point_distance, restricted_airspace, flight_constraints, geofence_point_boundary, minimization=True): Problem.__init__(self, search_space, fitness_function, minimization) self.IDW = IDW self.noisemap = noisemap self.x_y_limits = x_y_limits self.z_sigma = z_sigma self.work_space = work_space self.random_state = random_state self.init_network = init_network self.sample_point_distance = sample_point_distance self.endpoints = self._get_endpoints() self.restricted_airspace = restricted_airspace self.flight_constraints = flight_constraints self.geofence_point_boundary = geofence_point_boundary
def __init__(self, **kwargs): Problem.__init__(self, **kwargs) self.jobs = {'quantity': 0, 'list': [], 'total_units': []} self.machines = {'quantity': 0, 'loadout_times': [], 'lower_bounds_taillard': [], 'assigned_jobs': []} # Load benchmark instance self.ilb = 0 # Instance lower bound self.iub = 0 # Instance upper bound self.load_instance() # Set n dimensions self.n = self.jobs['quantity'] self.pre_processing_done = False
def __init__( self, decision_vector, objective_vector, solver, highs, lows, directions=None, is_empty=False, **settings ): Problem.__init__(self) if is_empty: return if not directions: directions = [True] * len(objective_vector) self.decisions = [Decision(dec.decl().name(), is_true(False), is_true(True)) for dec in decision_vector] self.objectives = [ Objective(obj.decl().name(), directions[i], lows[i], highs[i]) for i, obj in enumerate(objective_vector) ] self.decision_vector = decision_vector self.objective_vector = objective_vector self.solver = solver self.base_solver = clone(solver) self.generation_counter = 0
def __init__(self, **kwargs): Problem.__init__(self, **kwargs) # Set n dimensions self.n = 2