9 #ifndef __REGISTEREDTNLPS_HPP__
10 #define __REGISTEREDTNLPS_HPP__
15 using namespace Ipopt;
26 virtual bool InitializeProblem(
Index N) = 0;
34 RegisterTNLP(tnlp, name);
39 static void PrintRegisteredProblems();
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_; }
RegisteredTNLPs(const SmartPtr< RegisteredTNLP > &tnlp, const std::string name)
SmartPtr< RegisteredTNLP > tnlp_
int Index
Type of all indices of vectors, matrices etc.
Class implemented the NLP discretization of.
virtual ~RegisteredTNLPs()
Base class for all NLP's that use standard triplet matrix form and dense vectors. ...