9 #ifndef __REGISTEREDTNLPS_HPP__
10 #define __REGISTEREDTNLPS_HPP__
15 using namespace Ipopt;
34 RegisterTNLP(tnlp, name);
42 const std::string name);
46 #define REGISTER_TNLP(class_constructor, name) \
47 class RegisteredTNLP_Setup_ ## name : public RegisteredTNLPs \
50 RegisteredTNLP_Setup_ ## name() \
52 RegisteredTNLPs(new class_constructor, #name) \
54 RegisteredTNLP_Setup_ ## name* KeepCompilerFromRemovingThis(); \
57 RegisteredTNLP_Setup_ ## name RegisteredTNLP_Setup_ ## name ## instance_; \
58 RegisteredTNLP_Setup_ ## name* \
59 RegisteredTNLP_Setup_ ## name::KeepCompilerFromRemovingThis() \
60 { return &RegisteredTNLP_Setup_ ## name ## instance_; }
Base class for all NLP's that use standard triplet matrix form and dense vectors.
Class implemented the NLP discretization of.
virtual bool InitializeProblem(Index N)=0
Initialize internal parameters, where N is a parameter determining the problme size.
static void PrintRegisteredProblems()
SmartPtr< RegisteredTNLP > tnlp_
void RegisterTNLP(const SmartPtr< RegisteredTNLP > &tnlp, const std::string name)
static SmartPtr< RegisteredTNLP > GetTNLP(const std::string name)
virtual ~RegisteredTNLPs()
RegisteredTNLPs(const SmartPtr< RegisteredTNLP > &tnlp, const std::string name)
int Index
Type of all indices of vectors, matrices etc.