bande::Settings Class Reference

The Settings class handles command line settings. More...

#include <Settings.hh>

List of all members.

Public Member Functions

 Settings ()
virtual ~Settings ()
void args (int argc, char **argv)
 Parse command line arguments.
void run ()
 Execute appropriate operations according to command line.

Static Public Attributes

static unsigned debug = 0
 Global debug bit mask.

Private Member Functions

void usage (char *prog, std::ostream &out, int ret)
 Prints usage description and exits.

Private Attributes

const char * inFile
 The name of the input file.
const char * outFile
 The name of the output file or 0.

Static Private Attributes

static struct option opts []
 List of command line options.

Detailed Description

The Settings class handles command line settings.

Definition at line 51 of file

Member Function Documentation

void bande::Settings::args ( int  argc,
char **  argv 

Parse command line arguments.

argc the number of command line arguments.
argv an array of command line arguments.

Definition at line 93 of file

References debug, inFile, opts, outFile, and usage().

Referenced by main().

void bande::Settings::run (  ) 

Execute appropriate operations according to command line.

Once all settings are in place, This method is called in order to run the requested command. Currently that means reading the requested input file and enumerating all solutions for it.

There is no check whether the problem instance is bounded. The branching process assumes that each LP instance is either infeasible or allows for an optimal solution. Enumeration on an unbounded instance doesn't make too much sense. To be generally applicable there should be one check to ensure that the problem is bounded.

Definition at line 146 of file

References CoinSeedRandom(), bande::BranchControl::getIP(), inFile, outFile, bande::IntegerProgram::randomizeObjective(), bande::IntegerProgram::readMps(), bande::BranchControl::run(), and bande::Solutions::writeToFile().

Referenced by main().

void bande::Settings::usage ( char *  prog,
std::ostream &  out,
int  ret 
) [private]

Prints usage description and exits.

This information can be displayed by passing the command line argument --help.

prog the name with which the program was executed, argv[0].
out the stream to which usage information is printed.
ret the return code with which the program terminates.

Definition at line 69 of file

Referenced by args().

Member Data Documentation

unsigned bande::Settings::debug = 0 [static]

Global debug bit mask.

The value of this bit mask can be specified on the command line. At the moment only the least significant bit, 1, has any meaning. It enables tracing of the branching algorithm in BranchControl::branch().

Definition at line 41 of file Settings.hh.

Referenced by args(), and bande::BranchControl::branch().

bande::Settings::opts [static, read, private]

List of command line options.

This list should be kept in sync with the usage() description.

Definition at line 44 of file Settings.hh.

Referenced by args().

The documentation for this class was generated from the following files:

Generated on Fri Aug 21 08:17:19 2009 for bande by  doxygen 1.6.0