29 #include "tclap/CmdLine.h" 33 using TCLAP::SwitchArg;
34 using TCLAP::ValueArg;
35 using TCLAP::UnlabeledValueArg;
48 CmdLine cmd(executable_name_,
' ', version_no_);
49 cmd.setExceptionHandling(
false);
50 SwitchArg only_extremal_arg(
"x",
"extremal",
"compute only extremal supported non-dominated results",
false);
51 cmd.add(only_extremal_arg);
52 SwitchArg be_verbose_arg(
"v",
"verbose",
"verbose PolySCIP cmd line output ",
false);
53 cmd.add(be_verbose_arg);
54 SwitchArg write_results_arg(
"w",
"writeResults",
"write results to file; default path is ./",
false);
55 cmd.add(write_results_arg);
56 SwitchArg output_sols_arg(
"s",
"noSolutions",
"switching output of solutions off",
true);
57 cmd.add(output_sols_arg);
58 SwitchArg output_outcomes_arg(
"o",
"noOutcomes",
"switching output of outcomes off",
true);
59 cmd.add(output_outcomes_arg);
60 std::vector<int> round_vals = {5,10,15};
61 TCLAP::ValuesConstraint<int> allowed_vals(round_vals);
62 ValueArg<int> round_weighted_obj_coeff_arg(
"r",
"round",
63 "round weighted objective coefficient in fct 'setWeightedObjective' at r-th decimal position",
64 false, 0, &allowed_vals);
65 cmd.add(round_weighted_obj_coeff_arg);
66 ValueArg<TimeLimitType> time_limit_arg(
"t",
"timeLimit",
67 "time limit in seconds for total SCIP computation time",
69 cmd.add(time_limit_arg);
70 ValueArg<double> delta_arg(
"d",
"delta",
"Delta used in computation of feasible boxes; default value: 0.01",
71 false, 0.01,
"double");
73 ValueArg<double> epsilon_arg(
"e",
"epsilon",
"epsilon used in computation of unsupported points; default value: 1e-3",
74 false, 1e-3,
"double");
76 ValueArg<string> write_sols_path_arg(
"W",
"writeSolsPath",
79 cmd.add(write_sols_path_arg);
80 ValueArg<string> param_file_arg(
"p",
"params",
"parameter settings file for SCIP",
81 false,
"",
"paramFile.set");
82 cmd.add(param_file_arg);
83 UnlabeledValueArg<string> prob_file_arg(
"probFile",
"problem file in MOP format",
84 true,
"",
"problemFile.mop");
85 cmd.add(prob_file_arg);
86 cmd.parse(argc, argv);
88 be_verbose_ = be_verbose_arg.getValue();
89 only_extremal_ = only_extremal_arg.getValue();
90 write_results_ = write_results_arg.getValue();
91 output_solutions_ = output_sols_arg.getValue();
92 output_outcomes_ = output_outcomes_arg.getValue();
93 round_weighted_obj_coeff_ = round_weighted_obj_coeff_arg.getValue();
94 time_limit_ = time_limit_arg.getValue();
95 delta_ = delta_arg.getValue();
96 epsilon_ = epsilon_arg.getValue();
97 write_results_path_ = write_sols_path_arg.getValue();
98 param_file_ = param_file_arg.getValue();
99 prob_file_ = prob_file_arg.getValue();
Some preprocessor directives.
static constexpr auto kTimeLimitInf
Constant used for default value of cmd line parameter -t | - - timeLimit.
#define EXECUTABLE_NAME
Name of executable.
#define POLYSCIP_VERSION_MINOR
Current minor version of PolySCIP.
#define POLYSCIP_VERSION_MAJOR
Current major version of PolySCIP.
CmdLineArgs(int argc, const char *const *argv)
PolySCIP command line arguments.