parser.add_option("-f", "--filename", action="store", type="string", dest="filename", help="filename to save csv output") (options, args) = parser.parse_args() options.na = read_multiple_integer(options.na, "Number of " \ "assignment examples") options.nc = read_multiple_integer(options.nc, "Number of criteria") options.ncat = read_multiple_integer(options.ncat, "Number of " \ "categories") options.na_gen = read_multiple_integer(options.na_gen, "Number of " \ "generalization alternatives") options.pcerrors = read_multiple_integer(options.pcerrors, "Ratio of errors") options.nseeds = read_single_integer(options.nseeds, "Number of seeds") options.ns = read_multiple_integer(options.ns, "Number of function " \ "segments") dt = datetime.datetime.now().strftime("%Y%m%d-%H%M%S") default_filename = "%s/test_lp_avfsort-%s.csv" % (DATADIR, dt) options.filename = read_csv_filename(options.filename, default_filename) run_tests(options.na, options.nc, options.ncat, options.ns, options.na_gen, options.pcerrors, options.nseeds, options.filename) print("Results saved in '%s'" % options.filename)
veto_func = 1 elif vetom == 'proportional': veto_func = 2 options.vparam = read_multiple_float(options.vparam, "Value of the veto param") options.na = read_multiple_integer(options.na, "Number of assignment examples") options.nc = read_multiple_integer(options.nc, "Number of criteria") options.ncat = read_multiple_integer(options.ncat, "Number of categories") options.na_gen = read_multiple_integer(options.na_gen, "Number of " \ "generalization alternatives") options.pcerrors = read_multiple_integer(options.pcerrors, "Ratio of " \ "errors") options.nseeds = read_single_integer(options.nseeds, "Number of seeds") dt = datetime.datetime.now().strftime("%Y%m%d-%H%M%S") default_filename = "%s/test_%s-%s.csv" % (DATADIR, "mip_mrsort_veto", dt) options.filename = read_csv_filename(options.filename, default_filename) directory = "%s/test_%s-%s" % (DATADIR, "mip_mrsort_veto", dt) if not os.path.exists(directory): os.makedirs(directory) run_tests(options.na, options.nc, options.ncat, options.na_gen, options.pcerrors, options.nseeds, options.vetot, options.vetom, options.vparam, options.filename) print("Results saved in '%s'" % options.filename)