Ipopt  3.12.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpAlgBuilder.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2007 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpAlgBuilder.hpp 2666 2016-07-20 16:02:55Z stefan $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2004-09-29
8 
9 #ifndef __IPALGBUILDER_HPP__
10 #define __IPALGBUILDER_HPP__
11 
12 #include "IpIpoptAlg.hpp"
13 #include "IpReferenced.hpp"
14 #include "IpAugSystemSolver.hpp"
15 #include "IpPDSystemSolver.hpp"
16 
17 namespace Ipopt
18 {
19 
20  // forward declarations
21  class IterationOutput;
22  class HessianUpdater;
23  class ConvergenceCheck;
24  class SearchDirectionCalculator;
25  class EqMultiplierCalculator;
26  class IterateInitializer;
27  class LineSearch;
28  class MuUpdate;
29 
50  {
51  public:
55  AlgorithmBuilder(SmartPtr<AugSystemSolver> custom_solver=NULL);
56 
59  {}
60 
62 
66  static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
68 
79 
86  const OptionsList& options,
87  const std::string& prefix);
88 
95  const OptionsList& options,
96  const std::string& prefix);
97 
106  AugSystemSolverFactory(const Journalist& jnlst,
107  const OptionsList& options,
108  const std::string& prefix);
109 
116  const OptionsList& options,
117  const std::string& prefix);
118 
129  PDSystemSolverFactory(const Journalist& jnlst,
130  const OptionsList& options,
131  const std::string& prefix);
132 
139  const OptionsList& options,
140  const std::string& prefix);
142 
149  virtual void BuildIpoptObjects(const Journalist& jnlst,
150  const OptionsList& options,
151  const std::string& prefix,
152  const SmartPtr<NLP>& nlp,
153  SmartPtr<IpoptNLP>& ip_nlp,
154  SmartPtr<IpoptData>& ip_data,
156 
174  const OptionsList& options,
175  const std::string& prefix);
176 
184  BuildIterationOutput(const Journalist& jnlst,
185  const OptionsList& options,
186  const std::string& prefix);
187 
195  BuildHessianUpdater(const Journalist& jnlst,
196  const OptionsList& options,
197  const std::string& prefix);
198 
206  BuildConvergenceCheck(const Journalist& jnlst,
207  const OptionsList& options,
208  const std::string& prefix);
209 
225  const OptionsList& options,
226  const std::string& prefix);
227 
241  const OptionsList& options,
242  const std::string& prefix);
243 
257  BuildIterateInitializer(const Journalist& jnlst,
258  const OptionsList& options,
259  const std::string& prefix);
260 
281  virtual SmartPtr<LineSearch> BuildLineSearch(const Journalist& jnlst,
282  const OptionsList& options,
283  const std::string& prefix);
284 
301  virtual SmartPtr<MuUpdate> BuildMuUpdate(const Journalist& jnlst,
302  const OptionsList& options,
303  const std::string& prefix);
305 
306  private:
316  //AlgorithmBuilder();
317 
320 
322  void operator=(const AlgorithmBuilder&);
324 
342 
352 
356 
357  };
358 } // namespace Ipopt
359 
360 #endif
virtual SmartPtr< IpoptAlgorithm > BuildBasicAlgorithm(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the IpoptAlgorithm class by building each of its required constructor argument...
SmartPtr< ConvergenceCheck > ConvCheck_
virtual SmartPtr< EqMultiplierCalculator > BuildEqMultiplierCalculator(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the EqMultiplierCalculator class.
SmartPtr< AugSystemSolver > custom_solver_
Optional pointer to AugSystemSolver.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptTypeInfo.
SmartPtr< SymLinearSolver > GetSymLinearSolver(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Get the symmetric linear system solver for this algorithm.
SmartPtr< HessianUpdater > HessUpdater_
Builder for creating a complete IpoptAlg object.
SmartPtr< IterationOutput > IterOutput_
SmartPtr< SearchDirectionCalculator > SearchDirCalc_
virtual SmartPtr< PDSystemSolver > PDSystemSolverFactory(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Create a solver that can be used to solve a primal-dual system.
virtual SmartPtr< IterateInitializer > BuildIterateInitializer(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the IterateInitializer class.
SmartPtr< IterateInitializer > IterInitializer_
virtual SmartPtr< ConvergenceCheck > BuildConvergenceCheck(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the ConvergenceCheck class.
AlgorithmBuilder(SmartPtr< AugSystemSolver > custom_solver=NULL)
Constructor.
SmartPtr< AugSystemSolver > AugSolver_
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
ReferencedObject class.
virtual SmartPtr< IterationOutput > BuildIterationOutput(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the IterationOutput class.
This class stores a list of user set options.
SmartPtr< LineSearch > LineSearch_
SmartPtr< AugSystemSolver > GetAugSystemSolver(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Get the augmented system solver for this algorithm.
virtual SmartPtr< AugSystemSolver > AugSystemSolverFactory(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Create a solver that can be used to solve an augmented system.
virtual SmartPtr< SearchDirectionCalculator > BuildSearchDirectionCalculator(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the SearchDirectionCalculator class.
virtual SmartPtr< LineSearch > BuildLineSearch(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the LineSearch class.
SmartPtr< MuUpdate > MuUpdate_
SmartPtr< SymLinearSolver > SymSolver_
SmartPtr< EqMultiplierCalculator > EqMultCalculator_
Class responsible for all message output.
virtual SmartPtr< MuUpdate > BuildMuUpdate(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the MuUpdate class.
virtual ~AlgorithmBuilder()
Destructor.
SmartPtr< PDSystemSolver > PDSolver_
virtual void BuildIpoptObjects(const Journalist &jnlst, const OptionsList &options, const std::string &prefix, const SmartPtr< NLP > &nlp, SmartPtr< IpoptNLP > &ip_nlp, SmartPtr< IpoptData > &ip_data, SmartPtr< IpoptCalculatedQuantities > &ip_cq)
Allocates memory for the IpoptNLP, IpoptData, and IpoptCalculatedQuanties arguments.
void operator=(const AlgorithmBuilder &)
Overloaded Equals Operator.
virtual SmartPtr< HessianUpdater > BuildHessianUpdater(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Creates an instance of the HessianUpdater class.
virtual SmartPtr< SymLinearSolver > SymLinearSolverFactory(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Create a solver that can be used to solve a symmetric linear system.
SmartPtr< PDSystemSolver > GetPDSystemSolver(const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
Get the primal-dual system solver for this algorithm.