solver  1.0
Enumerations | Functions
ProjectSolver.cpp File Reference

Entry point of the program. Auxiliary functions for program help and argument processing. More...

#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include "Settings.h"
#include "SolverConfig.h"
#include "Shared/Exceptions.h"
#include "InstancesReader/InstancesReader.h"
#include "Solution/Solution.h"
#include "Solution/SolutionChecker.h"
#include "ILPModel/SolverInterface.h"
#include "ILPSolver/RoboticLineSolverILP.h"
#include "HeuristicSolver/ParallelHeuristicSolver.h"
+ Include dependency graph for ProjectSolver.cpp:

Go to the source code of this file.

Enumerations

enum  ProgramReturnedCodes {
  EXIT_WITH_SUCCESS = 0, INVALID_PARAMETER = 1, INPUT_OUTPUT_ERROR = 2, RUNTIME_ERROR = 4,
  UNKNOWN_ERROR = 8
}
 Return codes of the program with obvious meanings.
 

Functions

void printProgramHeader ()
 It prints a brief description of the program including the authors, license, ILP solver, and version.
 
void printProgramHelp (const string &progName)
 It prints the program header and brief help. More...
 
template<class T >
parsePositiveNumber (const string &number)
 
bool getArgument (int &i, int argc, char *argv[], const string &fullName, const string &shortName, string &writeArgument)
 It processes the arguments with one parameter. More...
 
bool processArg (int &i, int argc, char *argv[], const string &fullName, const string &shortName, bool *toWrite=nullptr)
 It processes the arguments without parameters. More...
 
bool processArg (int &i, int argc, char *argv[], const string &fullName, const string &shortName, string &toWrite)
 It processes the arguments with one string parameter. More...
 
template<class T >
bool processArg (int &i, int argc, char *argv[], const string &fullName, const string &shortName, T &toWrite, T minValue=1)
 It processes the arguments with one numerical parameter. More...
 
bool processCommandLineArguments (int argc, char *argv[])
 It parses the program arguments and sets the desired parameters for optimization. More...
 
int main (int argc, char *argv[])
 An entry point of the program, arguments are processed, dataset is parsed and solved, and results printed and optionally written to files. More...
 

Detailed Description

Entry point of the program. Auxiliary functions for program help and argument processing.

Author
Libor Bukata

Definition in file ProjectSolver.cpp.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

An entry point of the program, arguments are processed, dataset is parsed and solved, and results printed and optionally written to files.

Parameters
argcThe number of program arguments passed to the program is argc-1.
argvProgram name and arguments (+parameters) of the program.
Returns
A return code of the program, see ProgramReturnedCodes enum.
See also
InstancesReader, ParallelHeuristicSolver, RoboticLineSolverILP, SolutionChecker, SolverException

Definition at line 298 of file ProjectSolver.cpp.

+ Here is the call graph for this function: