This class creates a composite NLP from a list of NLP's. More...
#include <CompositeNLP.hpp>
Public Member Functions | |
Constructors/Destructors | |
CompositeNLP (std::vector< SmartPtr< NLP > > nlps, SmartPtr< VectorSpace > q_space, std::vector< SmartPtr< VectorSpace > > linking_eqn_c_spaces, std::vector< SmartPtr< Matrix > > Jx_linking_eqns, std::vector< SmartPtr< Matrix > > Jq_linking_eqns) | |
Default constructor. | |
virtual | ~CompositeNLP () |
Default destructor. | |
Exceptions | |
DECLARE_STD_EXCEPTION (INVALID_JACOBIAN_DIMENSION_FOR_LINKING_EQUATIONS) | |
CompositeNLP Initialization. | |
virtual bool | ProcessOptions (const OptionsList &options, const std::string &prefix) |
Method for creating the derived vector / matrix types (Do not delete these, the ). | |
virtual bool | GetSpaces (SmartPtr< const VectorSpace > &x_space, SmartPtr< const VectorSpace > &c_space, SmartPtr< const VectorSpace > &d_space, SmartPtr< const VectorSpace > &x_l_space, SmartPtr< const MatrixSpace > &px_l_space, SmartPtr< const VectorSpace > &x_u_space, SmartPtr< const MatrixSpace > &px_u_space, SmartPtr< const VectorSpace > &d_l_space, SmartPtr< const MatrixSpace > &pd_l_space, SmartPtr< const VectorSpace > &d_u_space, SmartPtr< const MatrixSpace > &pd_u_space, SmartPtr< const MatrixSpace > &Jac_c_space, SmartPtr< const MatrixSpace > &Jac_d_space, SmartPtr< const SymMatrixSpace > &Hess_lagrangian_space) |
Method for creating the derived vector / matrix types (Do not delete these, the ). | |
virtual bool | GetBoundsInformation (const Matrix &Px_L, Vector &x_L, const Matrix &Px_U, Vector &x_U, const Matrix &Pd_L, Vector &d_L, const Matrix &Pd_U, Vector &d_U) |
Method for obtaining the bounds information. | |
virtual bool | GetStartingPoint (SmartPtr< Vector > x, bool need_x, SmartPtr< Vector > y_c, bool need_y_c, SmartPtr< Vector > y_d, bool need_y_d, SmartPtr< Vector > z_L, bool need_z_L, SmartPtr< Vector > z_U, bool need_z_U) |
Method for obtaining the starting point for all the iterates. | |
CompositeNLP evaluation routines. | |
virtual bool | Eval_f (const Vector &x, Number &f) |
virtual bool | Eval_grad_f (const Vector &x, Vector &g_f) |
virtual bool | Eval_c (const Vector &x, Vector &c) |
virtual bool | Eval_jac_c (const Vector &x, Matrix &jac_c) |
virtual bool | Eval_d (const Vector &x, Vector &d) |
virtual bool | Eval_jac_d (const Vector &x, Matrix &jac_d) |
virtual bool | Eval_h (const Vector &x, Number obj_factor, const Vector &yc, const Vector &yd, SymMatrix &h) |
Information about the Composite Structure | |
SmartPtr< SymLinearSolver > | CreateLinearSolver () |
returns an appropriate linear solver for the problem structure | |
![]() | |
virtual void | GetQuasiNewtonApproximationSpaces (SmartPtr< VectorSpace > &approx_space, SmartPtr< Matrix > &P_approx) |
Method for obtaining the subspace in which the limited-memory Hessian approximation should be done. | |
NLP () | |
Default constructor. | |
virtual | ~NLP () |
Default destructor. | |
DECLARE_STD_EXCEPTION (USER_SCALING_NOT_IMPLEMENTED) | |
Exceptions. | |
DECLARE_STD_EXCEPTION (INVALID_NLP) | |
Exceptions. | |
virtual bool | GetWarmStartIterate (IteratesVector &warm_start_iterate) |
Method for obtaining an entire iterate as a warmstart point. | |
virtual void | FinalizeSolution (SolverReturn status, const Vector &x, const Vector &z_L, const Vector &z_U, const Vector &c, const Vector &d, const Vector &y_c, const Vector &y_d, Number obj_value, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq) |
This method is called at the very end of the optimization. | |
virtual bool | IntermediateCallBack (AlgorithmMode mode, Index iter, Number obj_value, Number inf_pr, Number inf_du, Number mu, Number d_norm, Number regularization_size, Number alpha_du, Number alpha_pr, Index ls_trials, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq) |
This method is called once per iteration, after the iteration summary output has been printed. | |
virtual void | GetScalingParameters (const SmartPtr< const VectorSpace > x_space, const SmartPtr< const VectorSpace > c_space, const SmartPtr< const VectorSpace > d_space, Number &obj_scaling, SmartPtr< Vector > &x_scaling, SmartPtr< Vector > &c_scaling, SmartPtr< Vector > &d_scaling) const |
Routines to get the scaling parameters. | |
![]() | |
ReferencedObject () | |
virtual | ~ReferencedObject () |
Index | ReferenceCount () const |
void | AddRef (const Referencer *referencer) const |
void | ReleaseRef (const Referencer *referencer) 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. | |
CompositeNLP () | |
Default Constructor. | |
CompositeNLP (const CompositeNLP &) | |
Copy Constructor. | |
void | operator= (const CompositeNLP &) |
Overloaded Equals Operator. |
Private Attributes | |
SmartPtr< const Journalist > | jnlst_ |
Journalist. | |
std::vector< SmartPtr< NLP > > | nlps_ |
std::vector of nlps | |
SmartPtr< VectorSpace > | q_space_ |
vector space for the linking variables, q | |
std::vector< SmartPtr < VectorSpace > > | linking_eqn_c_spaces_ |
std::vector of VectorSpaces for the linking equations | |
Data about Linking Equations. For now, | |
this class only allows linear linking equations. Therefore, the jacobian of the linking equations is set only once at the beginning. | |
std::vector< SmartPtr< Matrix > > | Jx_linking_eqns_ |
std::vector of Jacobian of the linking eqns (one for each nlp) with respect to x variables | |
std::vector< SmartPtr< Matrix > > | Jq_linking_eqns_ |
std::vector of Jacobian of the linking eqns (one for each nlp) with respect to linking variables (q) |
This class creates a composite NLP from a list of NLP's.
This is a Composite class (Design Patterns) that creates a single NLP from a list of NLP's with some common variables. This allows users to "link" different NLP's into a single NLP easily
Definition at line 25 of file CompositeNLP.hpp.
Ipopt::CompositeNLP::CompositeNLP | ( | std::vector< SmartPtr< NLP > > | nlps, |
SmartPtr< VectorSpace > | q_space, | ||
std::vector< SmartPtr< VectorSpace > > | linking_eqn_c_spaces, | ||
std::vector< SmartPtr< Matrix > > | Jx_linking_eqns, | ||
std::vector< SmartPtr< Matrix > > | Jq_linking_eqns | ||
) |
Default constructor.
|
virtual |
Default destructor.
|
private |
Default Constructor.
|
private |
Copy Constructor.
Ipopt::CompositeNLP::DECLARE_STD_EXCEPTION | ( | INVALID_JACOBIAN_DIMENSION_FOR_LINKING_EQUATIONS | ) |
|
virtual |
Method for creating the derived vector / matrix types (Do not delete these, the ).
Reimplemented from Ipopt::NLP.
|
virtual |
Method for creating the derived vector / matrix types (Do not delete these, the ).
Implements Ipopt::NLP.
|
virtual |
Method for obtaining the bounds information.
Implements Ipopt::NLP.
|
virtual |
Method for obtaining the starting point for all the iterates.
Implements Ipopt::NLP.
Implements Ipopt::NLP.
Implements Ipopt::NLP.
Implements Ipopt::NLP.
Implements Ipopt::NLP.
Implements Ipopt::NLP.
Implements Ipopt::NLP.
|
virtual |
Implements Ipopt::NLP.
SmartPtr<SymLinearSolver> Ipopt::CompositeNLP::CreateLinearSolver | ( | ) |
returns an appropriate linear solver for the problem structure
|
private |
Overloaded Equals Operator.
|
private |
Definition at line 139 of file CompositeNLP.hpp.
std::vector of nlps
Definition at line 142 of file CompositeNLP.hpp.
|
private |
vector space for the linking variables, q
Definition at line 145 of file CompositeNLP.hpp.
|
private |
std::vector of VectorSpaces for the linking equations
Definition at line 148 of file CompositeNLP.hpp.
std::vector of Jacobian of the linking eqns (one for each nlp) with respect to x variables
Definition at line 157 of file CompositeNLP.hpp.
std::vector of Jacobian of the linking eqns (one for each nlp) with respect to linking variables (q)
Definition at line 161 of file CompositeNLP.hpp.