def __init__(self, w, target_OFE_budgets, gammaBudget, updateNeighbours, extra_termination_critea = [],): ''' Required Args * w - weights vector used for scalarization. * initial_target_OFE_budgets - OFE budgets at which tuning is desired to take place for the subproblem * gammaBudget - number of application layer evaluations to use on subproblem. i.e. if the algorithm being tuned is run 3 times with an OFE budget of 180 on 2 subproblem (w has 2 non-zero elements), then the gamma usage is 1080. * updateNeighbours - subproblems who PFAs are in the update neighbourhood when CPV tuples for this subproblem are evaluated ''' assert type(w) == numpy.ndarray assert type(target_OFE_budgets) == numpy.ndarray assert type(gammaBudget) == int assert type(updateNeighbours) == list self.initialized = False self.w = w self.target_OFE_budgets = copy.deepcopy(target_OFE_budgets) self.min_target_OFE_budget = min(target_OFE_budgets) self.max_target_OFE_budget = max(target_OFE_budgets) self.gamma = 0 self.gammaBudget = gammaBudget self.updateNeighbours = updateNeighbours self.extra_termination_critea = extra_termination_critea self.terminated_due_extra_termination_critea = False self.PFA = paretoArchive2D_polynimal_simularity_checking() #Pareto-optimal Front Approximation self.PFA_history = PFA_history_recorder() self.objective_transform_m = numpy.ones(len(w)) self.objective_transform_c = numpy.zeros(len(w)) # z' = m*z + c