|
| | InstanceOptions (const char *s) |
| | Initialize options for script with name s.
|
| | InstanceOptions (const char *s, const char *spec) |
| | Initialize options for script s that reads instance files.
|
| virtual void | help (void) |
| | Print help text.
|
| void | parse (int &argc, char *argv[]) |
| | Parse options from arguments argv (number is argc).
|
| void | parse (int &argc, char *argv[], bool strict) |
| | Parse options, optionally rejecting unrecognised arguments.
|
| void | parse_strict (int &argc, char *argv[]) |
| | Parse options with strict checking (equivalent to parse() with true).
|
| void | parse_permissive (int &argc, char *argv[]) |
| | Parse options partially (equivalent to parse() with false).
|
| void | instance (const char *s) |
| | Set default instance name.
|
| const char * | instance (void) const |
| | Return instance name.
|
| bool | builtin (unsigned int &i) const |
| | Test whether the instance is the number of a built-in instance.
|
| void | spec (const char *s) |
| | Set the reader spec for instance files.
|
| const char * | spec (void) const |
| | Return the reader spec for instance files (may be null).
|
| void | spec_file (const char *f) |
| | Set the file with a reader spec that replaces spec().
|
| const char * | spec_file (void) const |
| | Return the file with a reader spec (may be null).
|
| void | param (const char *p) |
| | Set the spec parameters (name=value, separated by commas).
|
| const char * | param (void) const |
| | Return the spec parameters (may be null).
|
| bool | is_file (void) const |
| | Test whether the instance names a readable file.
|
| Instance::Data | data (void) const |
| | Read the instance file.
|
| | ~InstanceOptions (void) |
| | Destructor.
|
| void | model (int v) |
| | Set default model value.
|
| void | model (int v, const char *o, const char *h=nullptr) |
| | Add model option value for value v, string o, and help h.
|
| int | model (void) const |
| | Return model value.
|
| void | symmetry (int v) |
| | Set default symmetry value.
|
| void | symmetry (int v, const char *o, const char *h=nullptr) |
| | Add symmetry option value for value v, string o, and help h.
|
| int | symmetry (void) const |
| | Return symmetry value.
|
| void | propagation (int v) |
| | Set default propagation value.
|
| void | propagation (int v, const char *o, const char *h=nullptr) |
| | Add propagation option value for value v, string o, and help h.
|
| int | propagation (void) const |
| | Return propagation value.
|
| void | ipl (IntPropLevel i) |
| | Set default integer propagation level.
|
| IntPropLevel | ipl (void) const |
| | Return integer propagation level.
|
| void | branching (int v) |
| | Set default branching value.
|
| void | branching (int v, const char *o, const char *h=nullptr) |
| | Add branching option value for value v, string o, and help h.
|
| int | branching (void) const |
| | Return branching value.
|
| void | decay (double d) |
| | Set default decay factor.
|
| double | decay (void) const |
| | Return decay factor.
|
| void | seed (unsigned int s) |
| | Set default seed value.
|
| unsigned int | seed (void) const |
| | Return seed value.
|
| void | step (double s) |
| | Set default step value.
|
| double | step (void) const |
| | Return step value.
|
| void | search (int v) |
| | Set default search value.
|
| void | search (int v, const char *o, const char *h=nullptr) |
| | Add search option value for value v, string o, and help h.
|
| int | search (void) const |
| | Return search value.
|
| void | solutions (unsigned long long int n) |
| | Set default number of solutions to search for.
|
| unsigned long long int | solutions (void) const |
| | Return number of solutions to search for.
|
| void | threads (double n) |
| | Set number of parallel threads.
|
| double | threads (void) const |
| | Return number of parallel threads.
|
| void | c_d (unsigned int d) |
| | Set default copy recomputation distance.
|
| unsigned int | c_d (void) const |
| | Return copy recomputation distance.
|
| void | a_d (unsigned int d) |
| | Set default adaptive recomputation distance.
|
| unsigned int | a_d (void) const |
| | Return adaptive recomputation distance.
|
| void | d_l (unsigned int d) |
| | Set default discrepancy limit for LDS.
|
| unsigned int | d_l (void) const |
| | Return discrepancy limit for LDS.
|
| void | node (unsigned long long int n) |
| | Set default node cutoff.
|
| unsigned long long int | node (void) const |
| | Return node cutoff.
|
| void | fail (unsigned long long int n) |
| | Set default failure cutoff.
|
| unsigned long long int | fail (void) const |
| | Return failure cutoff.
|
| void | time (double t) |
| | Set default time cutoff.
|
| double | time (void) const |
| | Return time cutoff.
|
| void | assets (unsigned int n) |
| | Set default number of assets in a portfolio.
|
| unsigned int | assets (void) const |
| | Return slice size in a portfolio.
|
| void | slice (unsigned int n) |
| | Set default slice size in a portfolio.
|
| unsigned int | slice (void) const |
| | Return slice size in a portfolio.
|
| void | restart (RestartMode r) |
| | Set default restart mode.
|
| RestartMode | restart (void) const |
| | Return restart mode.
|
| void | restart_base (double base) |
| | Set default restart base.
|
| double | restart_base (void) const |
| | Return restart base.
|
| void | restart_scale (unsigned int scale) |
| | Set default restart scale factor.
|
| unsigned int | restart_scale (void) const |
| | Return restart scale factor.
|
| void | restart_limit (unsigned long long int n) |
| | Set default restart cutoff.
|
| unsigned long long int | restart_limit (void) const |
| | Return restart cutoff.
|
| void | nogoods (bool b) |
| | Set default nogoods posting behavior.
|
| bool | nogoods (void) const |
| | Return whether nogoods are used.
|
| void | nogoods_limit (unsigned int l) |
| | Set default nogoods depth limit.
|
| unsigned int | nogoods_limit (void) const |
| | Return depth limit for nogoods.
|
| void | relax (double d) |
| | Set default relax probability.
|
| double | relax (void) const |
| | Return default relax probability.
|
| void | interrupt (bool b) |
| | Set default interrupt behavior.
|
| bool | interrupt (void) const |
| | Return interrupt behavior.
|
| | Options (const char *s) |
| | Initialize options for script with name s.
|
| void | mode (ScriptMode em) |
| | Set default mode.
|
| ScriptMode | mode (void) const |
| | Return mode.
|
| void | samples (unsigned int s) |
| | Set default number of samples.
|
| unsigned int | samples (void) const |
| | Return number of samples.
|
| void | iterations (unsigned int i) |
| | Set default number of iterations.
|
| unsigned int | iterations (void) const |
| | Return number of iterations.
|
| void | print_last (bool p) |
| | Set whether to print only last solution found.
|
| bool | print_last (void) const |
| | Return whether to print only last solution found.
|
| void | out_file (const char *f) |
| | Set default output file name for solutions.
|
| const char * | out_file (void) const |
| | Get file name for solutions.
|
| void | log_file (const char *f) |
| | Set default output file name for Gecode stats.
|
| const char * | log_file (void) const |
| | Get file name for Gecode stats.
|
| void | trace (int f) |
| | Set trace flags.
|
| int | trace (void) const |
| | Return trace flags.
|
| void | profiler_id (int i) |
| | Set profiler execution identifier.
|
| int | profiler_id (void) const |
| | Return profiler execution id.
|
| void | profiler_port (unsigned int p) |
| | Set profiler port.
|
| unsigned int | profiler_port (void) const |
| | Return profiler execution id.
|
| void | guidance (const Search::HeuristicGuidance *g) |
| | Set guidance for heuristic search (not copied).
|
| const Search::HeuristicGuidance * | guidance (void) const |
| | Return guidance for heuristic search.
|
| | BaseOptions (const char *s) |
| | Initialize options for script with name s.
|
| void | add (Driver::BaseOption &o) |
| | Add new option o.
|
| void | parse (int &argc, char *argv[]) |
| | Parse options from arguments argv (number is argc).
|
| void | parse (int &argc, char *argv[], bool strict) |
| | Parse options, optionally rejecting unrecognised arguments.
|
| void | parse_strict (int &argc, char *argv[]) |
| | Parse options with strict checking (equivalent to parse() with true).
|
| void | parse_permissive (int &argc, char *argv[]) |
| | Parse options partially (equivalent to parse() with false).
|
| const char * | name (void) const |
| | Return name of script.
|
| void | name (const char *) |
| | Set name of script.
|
| virtual | ~BaseOptions (void) |
| | Destructor.
|
Options for scripts with additional instance parameter
The instance is given as the last command line argument. It is either the name of an instance built into the script, or an instance file. A script that reads instance files gives the reader spec for its file format (see Instance::Spec) to the constructor, for example
const char* dimacs = R"(
comment "c"
line "p cnf {vars:int} {clauses:int}"
repeat clauses { list clause: int until 0 }
)";
InstanceOptions(const char *s)
Initialize options for script with name s.
Named values read from an instance.
void parse(int argc, char *argv[])
Parse commandline arguments.
The option -spec then reads instance files with the spec in another file instead, and -param gives a value to one of the spec's parameters as name=value (for example instance=3 to select an instance in a file with several instances). For several parameters, -param is given several times, or the pairs are separated by commas as in -param a=1,b=2. A script may rely on the checks in its own spec, so a replacement spec must define the same data and is responsible for the same checks.
Reading an instance reports errors by throwing Instance::Error; the command line itself is parsed as for all options. The driver library requires the instance library.
Definition at line 834 of file driver.hh.