#include <IpAlgStrategy.hpp>
Inheritance diagram for Ipopt::AlgorithmStrategyObject:
Public Member Functions | |
bool | Initialize (const Journalist &jnlst, IpoptNLP &ip_nlp, IpoptData &ip_data, IpoptCalculatedQuantities &ip_cq, const OptionsList &options, const std::string &prefix) |
This method is called every time the algorithm starts again - it is used to reset any internal state. | |
bool | ReducedInitialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix) |
Reduced version of the Initialize method, which does not require special Ipopt information. | |
Constructors/Destructors | |
AlgorithmStrategyObject () | |
Default Constructor. | |
virtual | ~AlgorithmStrategyObject () |
Default Destructor. | |
Protected Member Functions | |
virtual bool | InitializeImpl (const OptionsList &options, const std::string &prefix)=0 |
Implementation of the initialization method that has to be overloaded by for each derived class. | |
Accessor methods for the problem defining objects. | |
Those should be used by the derived classes. | |
const Journalist & | Jnlst () const |
IpoptNLP & | IpNLP () const |
IpoptData & | IpData () const |
IpoptCalculatedQuantities & | IpCq () const |
bool | HaveIpData () const |
Private Member Functions | |
Default Compiler Generated Methods | |
(Hidden to avoid implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called. | |
AlgorithmStrategyObject (const AlgorithmStrategyObject &) | |
Copy Constructor. | |
void | operator= (const AlgorithmStrategyObject &) |
Overloaded Equals Operator. | |
Private Attributes | |
bool | initialize_called_ |
flag indicating if Initialize method has been called (for debugging) | |
Pointers to objects defining a particular optimization | |
problem | |
SmartPtr< const Journalist > | jnlst_ |
SmartPtr< IpoptNLP > | ip_nlp_ |
SmartPtr< IpoptData > | ip_data_ |
SmartPtr< IpoptCalculatedQuantities > | ip_cq_ |
The AlgorithmStrategyObject base class implements a common interface for all algorithm strategy objects. A strategy object is a component of the algorithm for which different alternatives or implementations exists. It allows to compose the algorithm before execution for a particular configuration, without the need to call alternatives based on enums. For example, the LineSearch object is a strategy object, since different line search options might be used for different runs.
This interface is used for things that are done to all strategy objects, like initialization and setting options.
Definition at line 33 of file IpAlgStrategy.hpp.
Ipopt::AlgorithmStrategyObject::AlgorithmStrategyObject | ( | ) | [inline] |
virtual Ipopt::AlgorithmStrategyObject::~AlgorithmStrategyObject | ( | ) | [inline, virtual] |
Ipopt::AlgorithmStrategyObject::AlgorithmStrategyObject | ( | const AlgorithmStrategyObject & | ) | [private] |
Copy Constructor.
bool Ipopt::AlgorithmStrategyObject::Initialize | ( | const Journalist & | jnlst, | |
IpoptNLP & | ip_nlp, | |||
IpoptData & | ip_data, | |||
IpoptCalculatedQuantities & | ip_cq, | |||
const OptionsList & | options, | |||
const std::string & | prefix | |||
) | [inline] |
This method is called every time the algorithm starts again - it is used to reset any internal state.
The pointers to the Journalist, as well as to the IpoptNLP, IpoptData, and IpoptCalculatedQuantities objects should be stored in the instanciation of this base class. This method is also used to get all required user options from the OptionsList. Here, if prefix is given, each tag (identifying the options) is first looked for with the prefix in front, and if not found, without the prefix. Note: you should not cue off of the iteration count to indicate the "start" of an algorithm!
Do not overload this method, since it does some general initialization that is common for all strategy objects. Overload the protected InitializeImpl method instead.
Definition at line 64 of file IpAlgStrategy.hpp.
References initialize_called_, InitializeImpl(), ip_cq_, ip_data_, ip_nlp_, and jnlst_.
bool Ipopt::AlgorithmStrategyObject::ReducedInitialize | ( | const Journalist & | jnlst, | |
const OptionsList & | options, | |||
const std::string & | prefix | |||
) | [inline] |
Reduced version of the Initialize method, which does not require special Ipopt information.
This is useful for algorithm objects that could be used outside Ipopt, such as linear solvers.
Definition at line 90 of file IpAlgStrategy.hpp.
References initialize_called_, InitializeImpl(), ip_cq_, ip_data_, ip_nlp_, and jnlst_.
virtual bool Ipopt::AlgorithmStrategyObject::InitializeImpl | ( | const OptionsList & | options, | |
const std::string & | prefix | |||
) | [protected, pure virtual] |
Implementation of the initialization method that has to be overloaded by for each derived class.
Implemented in Ipopt::AdaptiveMuUpdate, Ipopt::BacktrackingLineSearch, Ipopt::BacktrackingLSAcceptor, Ipopt::ConvergenceCheck, Ipopt::DefaultIterateInitializer, Ipopt::EqMultiplierCalculator, Ipopt::ExactHessianUpdater, Ipopt::FilterLSAcceptor, Ipopt::HessianUpdater, Ipopt::IpoptAlgorithm, Ipopt::IterateInitializer, Ipopt::IterationOutput, Ipopt::LeastSquareMultipliers, Ipopt::LimMemQuasiNewtonUpdater, Ipopt::LoqoMuOracle, Ipopt::MonotoneMuUpdate, Ipopt::MuOracle, Ipopt::MuUpdate, Ipopt::OptimalityErrorConvergenceCheck, Ipopt::OrigIterationOutput, Ipopt::PDFullSpaceSolver, Ipopt::PDPerturbationHandler, Ipopt::PDSearchDirCalculator, Ipopt::PDSystemSolver, Ipopt::PenaltyLSAcceptor, Ipopt::ProbingMuOracle, Ipopt::QualityFunctionMuOracle, Ipopt::RestoFilterConvergenceCheck, Ipopt::RestoIterateInitializer, Ipopt::RestoIterationOutput, Ipopt::MinC_1NrmRestorationPhase, Ipopt::RestorationPhase, Ipopt::RestoRestorationPhase, Ipopt::SearchDirectionCalculator, Ipopt::WarmStartIterateInitializer, Ipopt::GenKKTSolverInterface, Ipopt::Ma27TSolverInterface, Ipopt::Ma28TDependencyDetector, Ipopt::Ma57TSolverInterface, Ipopt::Mc19TSymScalingMethod, Ipopt::MumpsSolverInterface, Ipopt::PardisoSolverInterface, Ipopt::SparseSymLinearSolverInterface, Ipopt::SymLinearSolver, Ipopt::TDependencyDetector, Ipopt::TSymDependencyDetector, Ipopt::TSymLinearSolver, Ipopt::TSymScalingMethod, Ipopt::WsmpSolverInterface, Ipopt::CGPenaltyLSAcceptor, Ipopt::CGPerturbationHandler, and Ipopt::CGSearchDirCalculator.
Referenced by Initialize(), and ReducedInitialize().
const Journalist& Ipopt::AlgorithmStrategyObject::Jnlst | ( | ) | const [inline, protected] |
Definition at line 118 of file IpAlgStrategy.hpp.
References DBG_ASSERT, initialize_called_, and jnlst_.
IpoptNLP& Ipopt::AlgorithmStrategyObject::IpNLP | ( | ) | const [inline, protected] |
Definition at line 123 of file IpAlgStrategy.hpp.
References DBG_ASSERT, initialize_called_, ip_nlp_, and Ipopt::IsValid().
IpoptData& Ipopt::AlgorithmStrategyObject::IpData | ( | ) | const [inline, protected] |
Definition at line 129 of file IpAlgStrategy.hpp.
References DBG_ASSERT, initialize_called_, ip_data_, and Ipopt::IsValid().
IpoptCalculatedQuantities& Ipopt::AlgorithmStrategyObject::IpCq | ( | ) | const [inline, protected] |
Definition at line 135 of file IpAlgStrategy.hpp.
References DBG_ASSERT, initialize_called_, ip_cq_, and Ipopt::IsValid().
bool Ipopt::AlgorithmStrategyObject::HaveIpData | ( | ) | const [inline, protected] |
void Ipopt::AlgorithmStrategyObject::operator= | ( | const AlgorithmStrategyObject & | ) | [private] |
Overloaded Equals Operator.
SmartPtr<const Journalist> Ipopt::AlgorithmStrategyObject::jnlst_ [private] |
Reimplemented in Ipopt::Ma28TDependencyDetector, and Ipopt::TSymDependencyDetector.
Definition at line 170 of file IpAlgStrategy.hpp.
Referenced by Initialize(), Jnlst(), and ReducedInitialize().
Definition at line 171 of file IpAlgStrategy.hpp.
Referenced by Initialize(), IpNLP(), and ReducedInitialize().
Definition at line 172 of file IpAlgStrategy.hpp.
Referenced by HaveIpData(), Initialize(), IpData(), and ReducedInitialize().
Definition at line 173 of file IpAlgStrategy.hpp.
Referenced by Initialize(), IpCq(), and ReducedInitialize().
bool Ipopt::AlgorithmStrategyObject::initialize_called_ [private] |
flag indicating if Initialize method has been called (for debugging)
Definition at line 178 of file IpAlgStrategy.hpp.
Referenced by Initialize(), IpCq(), IpData(), IpNLP(), Jnlst(), and ReducedInitialize().