class ObjectiveFunction(ObjectiveFunctionInterface):
def __init__(self):
self._lower_bounds = [None,100]
self._upper_bounds = [None,2500]
self._variable = [True,True]
self._discrete_values = [[x for x in range(3, 9)], None]
# define all input parameters
self._maximize = False # do we maximize or minimize?
self._max_imp = 50000 # maximum number of improvisations
self._hms = 100 # harmony memory size
self._hmcr = 0.75 # harmony memory considering rate
self._par = 0.5 # pitch adjusting rate
self._mpap = 0.25 # maximum pitch adjustment proportion (new parameter defined in pitch_adjustment()) - used for continuous variables only
self._mpai = 10 # maximum pitch adjustment index (also defined in pitch_adjustment()) - used for discrete variables only
def get_fitness(self, vect