Beispiel #1
0
def test_cx(ind1, ind2):
    #Test cxTP
    from MAST.structopt_stem.crossover.cxTP import cxTP
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = cxTP(i1,i2,A,False)
    
    #Test cxTPA
    from MAST.structopt_stem.crossover.cxTPA import cxTPA
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = cxTPA(i1,i2,A,False)
    
    #Test cxTPC
    from MAST.structopt_stem.crossover.cxTPC import cxTPC
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = cxTPC(i1,i2,A,False)
    
    #Test NewClus
    from MAST.structopt_stem.crossover.NewClus import NewClus
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = NewClus(i1,i2,A,False)
    
    #Test randalloybox
    from MAST.structopt_stem.crossover.randalloybox import randalloybox
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = randalloybox(i1,i2,A,False)
    
    #Test rotct_rand_clus
    from MAST.structopt_stem.crossover.rotct_rand_clus import rotct_rand_clus
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = rotct_rand_clus(i1,i2,A,False)
    
    #Test rotct_rand
    from MAST.structopt_stem.crossover.rotct_rand import rotct_rand
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = rotct_rand(i1,i2,A,False)
    
    #Test rotct
    from MAST.structopt_stem.crossover.rotct import rotct
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = rotct(i1,i2,A,False)
Beispiel #2
0
def test_cx(ind1, ind2):
    #Test cxTP
    from MAST.structopt_stem.crossover.cxTP import cxTP
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = cxTP(i1, i2, A, False)

    #Test cxTPA
    from MAST.structopt_stem.crossover.cxTPA import cxTPA
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = cxTPA(i1, i2, A, False)

    #Test cxTPC
    from MAST.structopt_stem.crossover.cxTPC import cxTPC
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = cxTPC(i1, i2, A, False)

    #Test NewClus
    from MAST.structopt_stem.crossover.NewClus import NewClus
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = NewClus(i1, i2, A, False)

    #Test randalloybox
    from MAST.structopt_stem.crossover.randalloybox import randalloybox
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = randalloybox(i1, i2, A, False)

    #Test rotct_rand_clus
    from MAST.structopt_stem.crossover.rotct_rand_clus import rotct_rand_clus
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = rotct_rand_clus(i1, i2, A, False)

    #Test rotct_rand
    from MAST.structopt_stem.crossover.rotct_rand import rotct_rand
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = rotct_rand(i1, i2, A, False)

    #Test rotct
    from MAST.structopt_stem.crossover.rotct import rotct
    i1 = ind1.duplicate()
    i2 = ind2.duplicate()
    nc1, nc2 = rotct(i1, i2, A, False)
Beispiel #3
0
     pass
 try:
     from MAST.structopt_stem.crossover.NewClus import NewClus
     i1 = ind1.duplicate()
     i2 = ind2.duplicate()
     nc1, nc2 = NewClus(i1,i2,A)
     print 'NewClus crossover test SUCCESSFUL'
 except Exception, e:
     print 'ERROR: NewClus crossover test FAILED'
     print e
     pass
 try:
     from MAST.structopt_stem.crossover.randalloybox import randalloybox
     i1 = ind1.duplicate()
     i2 = ind2.duplicate()
     nc1, nc2 = randalloybox(i1,i2,A)
     print 'randalloybox crossover test SUCCESSFUL'
 except Exception, e:
     print 'ERROR: randalloybox crossover test FAILED'
     print e
     pass
 try:
     from MAST.structopt_stem.crossover.rotct_rand_clus import rotct_rand_clus
     i1 = ind1.duplicate()
     i2 = ind2.duplicate()
     nc1, nc2 = rotct_rand_clus(i1,i2,A)
     print 'rotct_rand_clus crossover test SUCCESSFUL'
 except Exception, e:
     print 'ERROR: rotct_rand_clus crossover test FAILED'
     print e
     pass