Exemplo n.º 1
0
 def initialize_decs(self):
     dec = Decision('x1', -5, 5)
     self.decs.append(dec)
     dec = Decision('x2', -5, 5)
     self.decs.append(dec)
     dec = Decision('x3', -5, 5)
     self.decs.append(dec)
Exemplo n.º 2
0
    def initialize_decs(self, num_decs):

        dec = Decision('mutation_prob', 0, 1)
        self.decs.append(dec)
        # number of crossover points
        dec = Decision('cop', 1, 5, type="int")
        self.decs.append(dec)
        # population size
        dec = Decision('pop_size', 50, 150, type="int")
        self.decs.append(dec)
Exemplo n.º 3
0
 def initialize_decs(self):
     dec = Decision('x1', 0, 1)
     self.decs.append(dec)
     dec = Decision('x2', 0, 1)
     self.decs.append(dec)
     dec = Decision('x3', 0, 1)
     self.decs.append(dec)
     dec = Decision('x4', 0, 1)
     self.decs.append(dec)
     dec = Decision('x5', 0, 1)
     self.decs.append(dec)
     dec = Decision('x6', 0, 1)
     self.decs.append(dec)
     dec = Decision('x7', 0, 1)
     self.decs.append(dec)
     dec = Decision('x8', 0, 1)
     self.decs.append(dec)
     dec = Decision('x9', 0, 1)
     self.decs.append(dec)
     dec = Decision('x10', 0, 1)
     self.decs.append(dec)
Exemplo n.º 4
0
 def initialize_decs(self):
     dec = Decision('x1', 2.6, 3.6)
     self.decs.append(dec)
     dec = Decision('x2', 0.7, 0.8)
     self.decs.append(dec)
     dec = Decision('x3', 17.0, 28.0)
     self.decs.append(dec)
     dec = Decision('x4', 7.3, 8.3)
     self.decs.append(dec)
     dec = Decision('x5', 7.3, 8.3)
     self.decs.append(dec)
     dec = Decision('x6', 2.9, 3.9)
     self.decs.append(dec)
     dec = Decision('x7', 5.0, 5.5)
     self.decs.append(dec)
Exemplo n.º 5
0
 def initialize_decs(self):
     dec = Decision('x1', 0, 10)
     self.decs.append(dec)
     dec = Decision('x2', 0, 10)
     self.decs.append(dec)
     dec = Decision('x3', 1, 5)
     self.decs.append(dec)
     dec = Decision('x4', 0, 6)
     self.decs.append(dec)
     dec = Decision('x5', 1, 5)
     self.decs.append(dec)
     dec = Decision('x6', 0, 10)
     self.decs.append(dec)
Exemplo n.º 6
0
    def initialize_decs(self, num_decs):

        for i in range(num_decs):
            dec = Decision('x' + str(i + 1), 0, 1)
            self.decs.append(dec)
Exemplo n.º 7
0
 def initialize_decs(self):
     dec = Decision('x', -(10**5), (10**5))
     self.decs.append(dec)