PIPS-IPM++ Solver and Tools
a parallel interior-point method for doubly bordered block diagonal linear programs
pipsipmpp::options::PIPSIPMppOptions Class Reference

all PIPS-IPM++ options More...

#include <PIPSIPMppOptions.h>

Static Protected Member Functions

template<typename T>
static void add_parameter (Category category, const std::string &identifier, const std::string &description, const T &defaultval, const std::vector< std::pair< T, std::string > > &possiblevals=std::vector< std::pair< T, std::string > >())
 add parameter, possibly with list of possible values
template<typename T>
static void add_parameter (Category category, const std::string &identifier, const std::string &description, const T &defaultval, const T &minval, const T &maxval=std::numeric_limits< T >::has_infinity ? std::numeric_limits< T >::infinity() :std::numeric_limits< T >::max())
 add parameter, possibly with bounds on possible values; not available for string and bool
template<typename T>
static void set_parameter_default (const std::string &identifier, const T &newdefaultval)
 overwrite default value of parameter, resets current value to default

Static Protected Attributes

static std::unordered_map< std::string, Option< double > > double_options
 double-valued options
static std::unordered_map< std::string, Option< int > > int_options
 integer-valued options
static std::unordered_map< std::string, Option< bool > > bool_options
 boolean-valued options
static std::unordered_map< std::string, Option< std::string > > string_options
 string-valued options

Friends

template<typename T>
void set_parameter (const std::string &identifier, const T &value)
template<typename T>
const Option< T > & get_option (const std::string &identifier)
void set_options (const std::string &opt_file)
void set_option (const std::string &opt_setting)
void adjust_options ()
void reset ()
 reset all options to their default value
void print_modified_options (std::ostream &out)
void print_options_docu (std::ostream &out)

Detailed Description

all PIPS-IPM++ options

Member Function Documentation

◆ add_parameter() [1/2]

template<typename T>
void pipsipmpp::options::PIPSIPMppOptions::add_parameter ( Category category,
const std::string & identifier,
const std::string & description,
const T & defaultval,
const std::vector< std::pair< T, std::string > > & possiblevals = std::vector< std::pair< T, std::string > >() )
staticprotected

add parameter, possibly with list of possible values

Parameters
categorycategory where to add option
identifiername of option
descriptiondescription of option
defaultvaldefault value of option
possiblevalsa list of possible values, each with a description; or empty if any value is possible

◆ add_parameter() [2/2]

template<typename T>
void pipsipmpp::options::PIPSIPMppOptions::add_parameter ( Category category,
const std::string & identifier,
const std::string & description,
const T & defaultval,
const T & minval,
const T & maxval = std::numeric_limits< T >::has_infinity ? std::numeric_limits< T >::infinity() :std::numeric_limits< T >::max() )
staticprotected

add parameter, possibly with bounds on possible values; not available for string and bool

Parameters
categorycategory where to add option
identifiername of option
descriptiondescription of option
defaultvaldefault value of option
minvalminimal value the option can be set to
maxvalmaximal value the option can be set to

◆ set_parameter_default()

template<typename T>
void pipsipmpp::options::PIPSIPMppOptions::set_parameter_default ( const std::string & identifier,
const T & newdefaultval )
staticprotected

overwrite default value of parameter, resets current value to default

Parameters
identifiername of option
newdefaultvalnew default value of option

◆ adjust_options

void adjust_options ( )
friend

updates some options settings according to other settings that may have been set should be called after options file has been read

◆ get_option

template<typename T>
const Option< T > & get_option ( const std::string & identifier)
friend

get option object for option name

Parameters
identifiername of option to get
Returns
Option which name is identifier

◆ print_modified_options

void print_modified_options ( std::ostream & out)
friend

write out all options not set to default

Parameters
outstream to print to

◆ print_options_docu

void print_options_docu ( std::ostream & out)
friend

write out all options that have been set

Parameters
outstream to print to

◆ set_option

void set_option ( const std::string & opt_setting)
friend

process a single option setting line (OPT=val)

Parameters
opt_settingoption setting to apply

◆ set_options

void set_options ( const std::string & opt_file)
friend

read options from an options file

Parameters
opt_filename of options file

◆ set_parameter

template<typename T>
void set_parameter ( const std::string & identifier,
const T & value )
friend

set string-valued option

Parameters
identifiername of option to set
valuevalue the option should be set to