Options for scripts More...
#include <driver.hh>
Public Member Functions | |
Options (const char *s) | |
Initialize options for script with name s. More... | |
![]() | |
BaseOptions (const char *s) | |
Initialize options for script with name s. More... | |
virtual void | help (void) |
Print help text. More... | |
void | add (Driver::BaseOption &o) |
Add new option o. More... | |
void | parse (int &argc, char *argv[]) |
Parse options from arguments argv (number is argc) More... | |
const char * | name (void) const |
Return name of script. More... | |
void | name (const char *) |
Set name of script. More... | |
virtual | ~BaseOptions (void) |
Destructor. More... | |
Model options | |
Driver::StringOption | _model |
General model options. More... | |
Driver::StringOption | _symmetry |
General symmetry options. More... | |
Driver::StringOption | _propagation |
Propagation options. More... | |
Driver::StringOption | _icl |
Integer consistency level. More... | |
Driver::StringOption | _branching |
Branching options. More... | |
Driver::DoubleOption | _decay |
Decay option. More... | |
void | model (int v) |
Set default model value. More... | |
void | model (int v, const char *o, const char *h=NULL) |
Add model option value for value v, string o, and help h. More... | |
int | model (void) const |
Return model value. More... | |
void | symmetry (int v) |
Set default symmetry value. More... | |
void | symmetry (int v, const char *o, const char *h=NULL) |
Add symmetry option value for value v, string o, and help h. More... | |
int | symmetry (void) const |
Return symmetry value. More... | |
void | propagation (int v) |
Set default propagation value. More... | |
void | propagation (int v, const char *o, const char *h=NULL) |
Add propagation option value for value v, string o, and help h. More... | |
int | propagation (void) const |
Return propagation value. More... | |
void | icl (IntConLevel i) |
Set default integer consistency level. More... | |
IntConLevel | icl (void) const |
Return integer consistency level. More... | |
void | branching (int v) |
Set default branching value. More... | |
void | branching (int v, const char *o, const char *h=NULL) |
Add branching option value for value v, string o, and help h. More... | |
int | branching (void) const |
Return branching value. More... | |
void | decay (double d) |
Set default decay factor. More... | |
double | decay (void) const |
Return decay factor. More... | |
Search options | |
Driver::StringOption | _search |
Search options. More... | |
Driver::UnsignedIntOption | _solutions |
How many solutions. More... | |
Driver::DoubleOption | _threads |
How many threads to use. More... | |
Driver::UnsignedIntOption | _c_d |
Copy recomputation distance. More... | |
Driver::UnsignedIntOption | _a_d |
Adaptive recomputation distance. More... | |
Driver::UnsignedIntOption | _node |
Cutoff for number of nodes. More... | |
Driver::UnsignedIntOption | _fail |
Cutoff for number of failures. More... | |
Driver::UnsignedIntOption | _time |
Cutoff for time. More... | |
Driver::StringOption | _restart |
Restart method option. More... | |
Driver::DoubleOption | _r_base |
Restart base. More... | |
Driver::UnsignedIntOption | _r_scale |
Restart scale factor. More... | |
Driver::BoolOption | _nogoods |
Whether to use no-goods. More... | |
Driver::UnsignedIntOption | _nogoods_limit |
Limit for no-good extraction. More... | |
Driver::BoolOption | _interrupt |
Whether to catch SIGINT. More... | |
void | search (int v) |
Set default search value. More... | |
void | search (int v, const char *o, const char *h=NULL) |
Add search option value for value v, string o, and help h. More... | |
int | search (void) const |
Return search value. More... | |
void | solutions (unsigned int n) |
Set default number of solutions to search for. More... | |
unsigned int | solutions (void) const |
Return number of solutions to search for. More... | |
void | threads (double n) |
Set number of parallel threads. More... | |
double | threads (void) const |
Return number of parallel threads. More... | |
void | c_d (unsigned int d) |
Set default copy recomputation distance. More... | |
unsigned int | c_d (void) const |
Return copy recomputation distance. More... | |
void | a_d (unsigned int d) |
Set default adaptive recomputation distance. More... | |
unsigned int | a_d (void) const |
Return adaptive recomputation distance. More... | |
void | node (unsigned int n) |
Set default node cutoff. More... | |
unsigned int | node (void) const |
Return node cutoff. More... | |
void | fail (unsigned int n) |
Set default failure cutoff. More... | |
unsigned int | fail (void) const |
Return failure cutoff. More... | |
void | time (unsigned int t) |
Set default time cutoff. More... | |
unsigned int | time (void) const |
Return time cutoff. More... | |
void | restart (RestartMode r) |
Set default restart mode. More... | |
RestartMode | restart (void) const |
Return restart mode. More... | |
void | restart_base (double base) |
Set default restart base. More... | |
double | restart_base (void) const |
Return restart base. More... | |
void | restart_scale (unsigned int scale) |
Set default restart scale factor. More... | |
unsigned int | restart_scale (void) const |
Return restart scale factor. More... | |
void | nogoods (bool b) |
Set default nogoods posting behavior. More... | |
bool | nogoods (void) const |
Return whether nogoods are used. More... | |
void | nogoods_limit (unsigned int l) |
Set default nogoods depth limit. More... | |
unsigned int | nogoods_limit (void) const |
Return depth limit for nogoods. More... | |
void | interrupt (bool b) |
Set default interrupt behavior. More... | |
bool | interrupt (void) const |
Return interrupt behavior. More... | |
Execution options | |
Driver::StringOption | _mode |
Script mode to run. More... | |
Driver::UnsignedIntOption | _samples |
How many samples. More... | |
Driver::UnsignedIntOption | _iterations |
How many iterations per sample. More... | |
Driver::BoolOption | _print_last |
Print only last solution found. More... | |
Driver::StringValueOption | _out_file |
Where to print solutions. More... | |
Driver::StringValueOption | _log_file |
Where to print statistics. More... | |
void | mode (ScriptMode em) |
Set default mode. More... | |
ScriptMode | mode (void) const |
Return mode. More... | |
void | samples (unsigned int s) |
Set default number of samples. More... | |
unsigned int | samples (void) const |
Return number of samples. More... | |
void | iterations (unsigned int i) |
Set default number of iterations. More... | |
unsigned int | iterations (void) const |
Return number of iterations. More... | |
void | print_last (bool p) |
Set whether to print only last solution found. More... | |
bool | print_last (void) const |
Return whether to print only last solution found. More... | |
void | out_file (const char *f) |
Set default output file name for solutions. More... | |
const char * | out_file (void) const |
Get file name for solutions. More... | |
void | log_file (const char *f) |
Set default output file name for Gecode stats. More... | |
const char * | log_file (void) const |
Get file name for Gecode stats. More... | |
Additional Inherited Members | |
![]() | |
Driver::BaseOption * | fst |
First registered option. More... | |
Driver::BaseOption * | lst |
Last registered option. More... | |
const char * | _name |
Script name. More... | |
Gecode::Options::Options | ( | const char * | s | ) |
Initialize options for script with name s.
Definition at line 359 of file options.cpp.
|
inline |
Set default model value.
Definition at line 155 of file options.hpp.
|
inline |
Add model option value for value v, string o, and help h.
Definition at line 159 of file options.hpp.
|
inline |
Return model value.
Definition at line 163 of file options.hpp.
|
inline |
Set default symmetry value.
Definition at line 168 of file options.hpp.
|
inline |
Add symmetry option value for value v, string o, and help h.
Definition at line 172 of file options.hpp.
|
inline |
Return symmetry value.
Definition at line 176 of file options.hpp.
|
inline |
Set default propagation value.
Definition at line 181 of file options.hpp.
|
inline |
Add propagation option value for value v, string o, and help h.
Definition at line 185 of file options.hpp.
|
inline |
Return propagation value.
Definition at line 189 of file options.hpp.
|
inline |
Set default integer consistency level.
Definition at line 194 of file options.hpp.
|
inline |
Return integer consistency level.
Definition at line 198 of file options.hpp.
|
inline |
Set default branching value.
Definition at line 203 of file options.hpp.
|
inline |
Add branching option value for value v, string o, and help h.
Definition at line 207 of file options.hpp.
|
inline |
Return branching value.
Definition at line 211 of file options.hpp.
|
inline |
Set default decay factor.
Definition at line 216 of file options.hpp.
|
inline |
Return decay factor.
Definition at line 220 of file options.hpp.
|
inline |
Set default search value.
Definition at line 230 of file options.hpp.
|
inline |
Add search option value for value v, string o, and help h.
Definition at line 234 of file options.hpp.
|
inline |
Return search value.
Definition at line 238 of file options.hpp.
|
inline |
Set default number of solutions to search for.
Definition at line 243 of file options.hpp.
|
inline |
Return number of solutions to search for.
Definition at line 247 of file options.hpp.
|
inline |
Set number of parallel threads.
Definition at line 252 of file options.hpp.
|
inline |
Return number of parallel threads.
Definition at line 256 of file options.hpp.
|
inline |
Set default copy recomputation distance.
Definition at line 261 of file options.hpp.
|
inline |
Return copy recomputation distance.
Definition at line 265 of file options.hpp.
|
inline |
Set default adaptive recomputation distance.
Definition at line 270 of file options.hpp.
|
inline |
Return adaptive recomputation distance.
Definition at line 274 of file options.hpp.
|
inline |
Set default node cutoff.
Definition at line 279 of file options.hpp.
|
inline |
Return node cutoff.
Definition at line 283 of file options.hpp.
|
inline |
Set default failure cutoff.
Definition at line 288 of file options.hpp.
|
inline |
Return failure cutoff.
Definition at line 292 of file options.hpp.
|
inline |
Set default time cutoff.
Definition at line 297 of file options.hpp.
|
inline |
Return time cutoff.
Definition at line 301 of file options.hpp.
|
inline |
Set default restart mode.
Definition at line 306 of file options.hpp.
|
inline |
Return restart mode.
Definition at line 310 of file options.hpp.
|
inline |
Set default restart base.
Definition at line 315 of file options.hpp.
|
inline |
Return restart base.
Definition at line 319 of file options.hpp.
|
inline |
Set default restart scale factor.
Definition at line 324 of file options.hpp.
|
inline |
Return restart scale factor.
Definition at line 328 of file options.hpp.
|
inline |
Set default nogoods posting behavior.
Definition at line 333 of file options.hpp.
|
inline |
Return whether nogoods are used.
Definition at line 337 of file options.hpp.
|
inline |
Set default nogoods depth limit.
Definition at line 342 of file options.hpp.
|
inline |
Return depth limit for nogoods.
Definition at line 346 of file options.hpp.
|
inline |
Set default interrupt behavior.
Definition at line 353 of file options.hpp.
|
inline |
Return interrupt behavior.
Definition at line 357 of file options.hpp.
|
inline |
Set default mode.
Definition at line 367 of file options.hpp.
|
inline |
Return mode.
Definition at line 371 of file options.hpp.
|
inline |
Set default number of samples.
Definition at line 376 of file options.hpp.
|
inline |
Return number of samples.
Definition at line 380 of file options.hpp.
|
inline |
Set default number of iterations.
Definition at line 385 of file options.hpp.
|
inline |
Return number of iterations.
Definition at line 389 of file options.hpp.
|
inline |
Set whether to print only last solution found.
Definition at line 394 of file options.hpp.
|
inline |
Return whether to print only last solution found.
Definition at line 398 of file options.hpp.
|
inline |
Set default output file name for solutions.
Definition at line 403 of file options.hpp.
|
inline |
Get file name for solutions.
Definition at line 408 of file options.hpp.
|
inline |
Set default output file name for Gecode stats.
Definition at line 413 of file options.hpp.
|
inline |
Get file name for Gecode stats.
Definition at line 418 of file options.hpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |