def generate_random_point(self):
        co_od = []
        for _ in xrange(self.dim):
            co_od.append(np.random.uniform(self.range_lower_limit, self.range_upper_limit))

        self.coords = copy.deepcopy(co_od)
        self.z = evaluate(self.coords)
Exemplo n.º 2
0
    def generate_random_point(self):
        co_od = []
        for _ in xrange(self.dim):
            co_od.append(
                np.random.uniform(self.range_lower_limit,
                                  self.range_upper_limit))

        self.coords = copy.deepcopy(co_od)
        self.z = evaluate(self.coords)
    def generate_neighbour(self):
        for ix in xrange(self.dim):
            offset = (2 * np.random.random() - 1.0) * 0.5
            self.coords[ix] += offset
            if self.coords[ix] < self.range_lower_limit:
                self.coords[ix] = self.range_lower_limit
            elif self.coords[ix] > self.range_upper_limit:
                self.coords[ix] = self.range_upper_limit

        self.z = evaluate(self.coords)
Exemplo n.º 4
0
    def generate_neighbour(self):
        for ix in xrange(self.dim):
            offset = (2 * np.random.random() - 1.0) * 0.5
            self.coords[ix] += offset
            if self.coords[ix] < self.range_lower_limit:
                self.coords[ix] = self.range_lower_limit
            elif self.coords[ix] > self.range_upper_limit:
                self.coords[ix] = self.range_upper_limit

        self.z = evaluate(self.coords)
 def evaluate_point(self):
     self.z = evaluate(self.coords)
Exemplo n.º 6
0
 def evaluate_point(self):
     self.z = evaluate(self.coords)