queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
OptimizerOptions.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2017 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_OPT_OPTIONS_H
26 #define UQ_OPT_OPTIONS_H
27 
28 // C++
29 #include <string>
30 
31 // QUESO
32 #include <queso/SharedPtr.h>
33 
34 #define UQ_OPT_HELP ""
35 
36 // _ODV = option default value
37 #define UQ_OPT_MAX_ITERATIONS 100
38 #define UQ_OPT_TOLERANCE 1e-3
39 #define UQ_OPT_FINITE_DIFFERENCE_STEP_SIZE 1e-4
40 #define UQ_OPT_SOLVER_TYPE "bfgs2"
41 #define UQ_OPT_FSTEP_SIZE 0.1
42 #define UQ_OPT_FDFSTEP_SIZE 1.0
43 #define UQ_OPT_LINE_TOLERANCE 0.1
44 
45 namespace QUESO {
46 
47 class BaseEnvironment;
48 class BoostInputOptionsParser;
49 
61 {
62 public:
64 
67 
69  OptimizerOptions(const BaseEnvironment * env, const char * prefix = "");
70 
73 
75  virtual ~OptimizerOptions();
77 
78  std::string m_prefix;
79 
81  std::string m_help;
82 
84  unsigned int m_maxIterations;
85 
87 
94  double m_tolerance;
95 
97 
102 
104 
115  std::string m_solverType;
116 
118 
123  double m_fstepSize;
124 
127 
129 
134 
135 private:
137 
139 
140  // The input options as strings so we can parse the input file later
141  std::string m_option_help;
142 
146  std::string m_option_tolerance;
150  std::string m_option_solverType;
152  std::string m_option_fstepSize;
154  std::string m_option_fdfstepSize;
157 
158  void checkOptions();
159 
160  friend std::ostream & operator<<(std::ostream & os,
161  const OptimizerOptions & obj);
162 };
163 
164 } // End namespace QUESO
165 
166 #endif // UQ_OPT_OPTIONS_H
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:198
std::string m_option_lineTolerance
Option name for OptimizerOptions::m_lineTolerance. Default is m_prefix + &quot;optimizer_lineTolerance&quot;.
std::string m_help
If this string is non-empty, options are print to the output file.
friend std::ostream & operator<<(std::ostream &os, const OptimizerOptions &obj)
virtual ~OptimizerOptions()
Destructor.
std::string m_option_solverType
Option name for OptimizerOptions::m_solverType. Default is m_prefix + &quot;optimizer_solverType&quot;.
std::string m_solverType
The optimization algorithm to use. Default is bfgs2.
double m_tolerance
The tolerance at which optimization stops. Default is 1e-3.
BoostInputOptionsParser * m_parser
This class provides options for a Optimizer.
double m_lineTolerance
Accuracy to which to solve line minization to. Default is 0.1.
double m_fstepSize
The size of the initial trial steps for optimizing without gradients. Default is 0.1.
OptimizerOptions()
Default constructor. All options have their default values.
std::string m_option_finiteDifferenceStepSize
Option name for OptimizerOptions::m_finiteDifferenceStepSize. Default is m_prefix + &quot;optimizer_finite...
const BaseEnvironment * m_env
std::string m_option_fstepSize
Option name for OptimizerOptions::m_fstepSize. Default is m_prefix + &quot;optimizer_fstepSize&quot;.
std::string m_option_tolerance
Option name for OptimizerOptions::m_tolerance. Default is m_prefix + &quot;optimizer_tolerance&quot;.
double m_fdfstepSize
The size of the first step when optimizing with gradients. Default is 1.0.
std::string m_option_fdfstepSize
Option name for OptimizerOptions::m_fdfstepSize. Default is m_prefix + &quot;optimizer_fdfStepSize&quot;.
unsigned int m_maxIterations
The maximum number of iterations to do for optimization. Default is 100.
std::string m_option_maxIterations
Option name for OptimizerOptions::m_maxIterations. Default is m_prefix + &quot;optimizer_maxIterations&quot;.
double m_finiteDifferenceStepSize
The step size used to compute gradients from finite differencing. Default is 1e-4.

Generated on Tue Jun 5 2018 19:48:54 for queso-0.57.1 by  doxygen 1.8.5