#NEWLINE# def _test_mmlhs_latin( self , n , k ) : #NEWLINE# #INDENT# p = 1 #NEWLINE# population = 3 #NEWLINE# generations = 6 #NEWLINE# test_lhc = _rand_latin_hypercube ( n , k ) #NEWLINE# best_lhc = _LHC_Individual ( test_lhc , 1 , p ) #NEWLINE# mmphi_initial = best_lhc . mmphi ( ) #NEWLINE# for q in ( 1 , 2 , 5 , 10 , 20 , 50 , 100 ) : #NEWLINE# #INDENT# lhc_start = _LHC_Individual ( test_lhc , q , p ) #NEWLINE# lhc_opt = _mmlhs ( lhc_start , population , generations ) #NEWLINE# if ( lhc_opt . mmphi ( ) < best_lhc . mmphi ( ) ) : #NEWLINE# #INDENT# best_lhc = lhc_opt #NEWLINE# #UNINDENT# #UNINDENT# self . assertTrue ( ( best_lhc . mmphi ( ) < mmphi_initial ) , "'_mmlhs' didn't yield lower phi. Seed was {}" . format ( self . seedval ) )