コード例 #1
0
import version4_tcheby_real as v4
import sys


#problem_size=[5,10, 30]
problem_sizes               = [10, 30]
k = 20
training_neighborhood_sizes = [21]
problems = ["UF1", "UF2", "UF3"]

#problem_sizes = [5,10, 30]
#k = 30


for problem_size in problem_sizes:

    nb_iterations = problem_size*50
    nb_iterations = 40

    for problem in problems:

        for run in range(k):

            filename = problem + "_MOEAD_PS-" + str(problem_size) + "_R-"+ str(run) +".txt"
            file_to_write = open(filename, 'a')
            v4.experimentWith(problem, file_to_write ,problem_size, nb_iterations, 1)
            file_to_write.close()
            print(filename, "done.")
コード例 #2
0
import sys
import version4_tcheby_real as v4
import random


args = sys.argv
_, problem, problem_size, run, nb_iterations, param_print_every, result_folder = args

random.seed(run)

filename = result_folder + "/" + problem + "_MOEAD_PS-" + problem_size + "_R-"+ run +".txt"
file_to_write = open(filename, 'a')
v4.experimentWith(problem, file_to_write ,int(problem_size), int(nb_iterations), int(param_print_every))
file_to_write.close()
#print(filename, "done.")