moheftAlgorithm.process(maxRelAlgorithm.individual, max_rel) moheft_result_sort_by_makespan = sort_result_by_makespan(moheftAlgorithm.pareto_result) FileUtil.dump_result_to_file(moheft_result_sort_by_makespan, moheftAlgorithm.name, workflow.name, percentage) metric_result = list() # Q-metric evaluation = EvaluationMetric() metric_result.append(evaluation.q_metric(randomAlgorithm.pareto_result, moheftAlgorithm.pareto_result)) metric_result.append(evaluation.q_metric(randomAlgorithm.pareto_result, mowsDtmAlgorithm.pareto_result)) metric_result.append(evaluation.q_metric(moheftAlgorithm.pareto_result, mowsDtmAlgorithm.pareto_result)) # FS-metric metric_result.append(evaluation.fs_metric(randomAlgorithm.pareto_result)) metric_result.append(evaluation.fs_metric(moheftAlgorithm.pareto_result)) metric_result.append(evaluation.fs_metric(mowsDtmAlgorithm.pareto_result)) # S-metric metric_result.append(evaluation.s_metric(randomAlgorithm.pareto_result)) metric_result.append(evaluation.s_metric(moheftAlgorithm.pareto_result)) metric_result.append(evaluation.s_metric(mowsDtmAlgorithm.pareto_result)) FileUtil.dump_metric_result_to_file( metric_result, "%s_%s_%s_%s_%s" % ( workflow.name, randomAlgorithm.name, mowsDtmAlgorithm.name, moheftAlgorithm.name, percentage) ) # if len(mowsDtmAlgorithm.pareto_result) >= 10: # break
evaluation = EvaluationMetric() metric_result.append( evaluation.q_metric(randomAlgorithm.pareto_result, moheftAlgorithm.pareto_result)) metric_result.append( evaluation.q_metric(randomAlgorithm.pareto_result, mowsDtmAlgorithm.pareto_result)) metric_result.append( evaluation.q_metric(moheftAlgorithm.pareto_result, mowsDtmAlgorithm.pareto_result)) # FS-metric metric_result.append(evaluation.fs_metric(randomAlgorithm.pareto_result)) metric_result.append(evaluation.fs_metric(mowsDtmAlgorithm.pareto_result)) metric_result.append(evaluation.fs_metric(moheftAlgorithm.pareto_result)) # S-metric metric_result.append(evaluation.s_metric(randomAlgorithm.pareto_result)) metric_result.append(evaluation.s_metric(mowsDtmAlgorithm.pareto_result)) metric_result.append(evaluation.s_metric(moheftAlgorithm.pareto_result)) FileUtil.dump_metric_result_to_file( metric_result, "%s_%s_%s" % (randomAlgorithm.name, mowsDtmAlgorithm.name, moheftAlgorithm.name)) # for delta in [0, 1, 3, 5, 7]: # mowsDtmAlgorithm = GeneticAlgorithm(workflow, bw_value, delta=delta) # mowsDtmAlgorithm.process() # mows_dtm_result_sort_by_makespan = sort_result_by_makespan(mowsDtmAlgorithm.pareto_result) # FileUtil.dump_result_to_file(mows_dtm_result_sort_by_makespan, mowsDtmAlgorithm.name)