# Set up output dir assert (config.match_model == 'pr4a' or config.match_model == 'pr4a-i1') config.experiment_out_dir = os.path.join(config.experiment_out_dir, config.dataset_name, config.match_model, 'ms=%s' % config.makespan, ts) output_dir = config.experiment_out_dir copy_source_to_dir(output_dir, config) output_dir = os.path.join(output_dir, 'results') n_rev = np.size(scores, axis=0) n_pap = np.size(scores, axis=1) mkdir_p(output_dir) # Output files. assignment_file = os.path.join(output_dir, 'assignment') time_file = os.path.join(output_dir, 'time.tsv') time_limit = None iter_limit = config.iter_limit bm = PR4A(scores, covs, loads, iter_limit=iter_limit) s = time.time() bm.fair_assignment() t = time.time() - s f = open(time_file, 'w') f.write(str(t)) f.close()
# Set up output dir assert(config.match_model == 'irda-lb' or config.match_model == 'irda') config.experiment_out_dir = os.path.join( config.experiment_out_dir, config.dataset_name, config.match_model, 'ms=%s' % config.makespan, ts) output_dir = config.experiment_out_dir copy_source_to_dir(output_dir, config) output_dir = os.path.join(output_dir, 'results') n_rev = np.size(scores, axis=0) n_pap = np.size(scores, axis=1) mkdir_p(output_dir) # Output files. assignment_file = os.path.join(output_dir, 'assignment') time_file = os.path.join(output_dir, 'time.tsv') if config.match_model == 'irda': bm = IRDALB(loads, None, covs, scores, makespan=ms) else: bm = IRDALB(loads, loads_lb, covs, scores, makespan=ms) s = time.time() bm.solve() t = time.time() - s f = open(time_file, 'w') f.write(str(t))