/home/coin/SVN-release/CoinAll-1.1.0/Ipopt/src/Apps/CompositeInterface/CompositeNLP.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2004, International Business Machines and others.
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // $Id: CompositeNLP.hpp 598 2005-12-01 17:56:15Z claird $
00006 //
00007 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
00008 
00009 #ifndef __IPCOMPOSITENLP_HPP__
00010 #define __IPCOMPOSITENLP_HPP__
00011 
00012 #include "IpNLP.hpp"
00013 
00014 namespace Ipopt
00015 {
00016 
00017   /* forward declaration */
00018   class SymLinearSolver;
00019 
00025   class CompositeNLP : public NLP
00026   {
00027   public:
00031     CompositeNLP(std::vector<SmartPtr<NLP> > nlps, SmartPtr<VectorSpace> q_space,
00032                  std::vector<SmartPtr<VectorSpace> > linking_eqn_c_spaces,
00033                  std::vector<SmartPtr<Matrix> > Jx_linking_eqns,
00034                  std::vector<SmartPtr<Matrix> > Jq_linking_eqns);
00035 
00037     virtual ~CompositeNLP();
00039 
00042     DECLARE_STD_EXCEPTION(INVALID_JACOBIAN_DIMENSION_FOR_LINKING_EQUATIONS);
00044 
00047     virtual bool ProcessOptions(const OptionsList& options,
00048                                 const std::string& prefix);
00049 
00052     virtual bool GetSpaces(SmartPtr<const VectorSpace>& x_space,
00053                            SmartPtr<const VectorSpace>& c_space,
00054                            SmartPtr<const VectorSpace>& d_space,
00055                            SmartPtr<const VectorSpace>& x_l_space,
00056                            SmartPtr<const MatrixSpace>& px_l_space,
00057                            SmartPtr<const VectorSpace>& x_u_space,
00058                            SmartPtr<const MatrixSpace>& px_u_space,
00059                            SmartPtr<const VectorSpace>& d_l_space,
00060                            SmartPtr<const MatrixSpace>& pd_l_space,
00061                            SmartPtr<const VectorSpace>& d_u_space,
00062                            SmartPtr<const MatrixSpace>& pd_u_space,
00063                            SmartPtr<const MatrixSpace>& Jac_c_space,
00064                            SmartPtr<const MatrixSpace>& Jac_d_space,
00065                            SmartPtr<const SymMatrixSpace>& Hess_lagrangian_space);
00066 
00068     virtual bool GetBoundsInformation(const Matrix& Px_L,
00069                                       Vector& x_L,
00070                                       const Matrix& Px_U,
00071                                       Vector& x_U,
00072                                       const Matrix& Pd_L,
00073                                       Vector& d_L,
00074                                       const Matrix& Pd_U,
00075                                       Vector& d_U);
00076 
00079     virtual bool GetStartingPoint(
00080       SmartPtr<Vector> x,
00081       bool need_x,
00082       SmartPtr<Vector> y_c,
00083       bool need_y_c,
00084       SmartPtr<Vector> y_d,
00085       bool need_y_d,
00086       SmartPtr<Vector> z_L,
00087       bool need_z_L,
00088       SmartPtr<Vector> z_U,
00089       bool need_z_U
00090     );
00092 
00095     virtual bool Eval_f(const Vector& x, Number& f);
00096 
00097     virtual bool Eval_grad_f(const Vector& x, Vector& g_f);
00098 
00099     virtual bool Eval_c(const Vector& x, Vector& c);
00100 
00101     virtual bool Eval_jac_c(const Vector& x, Matrix& jac_c);
00102 
00103     virtual bool Eval_d(const Vector& x, Vector& d);
00104 
00105     virtual bool Eval_jac_d(const Vector& x, Matrix& jac_d);
00106 
00107     virtual bool Eval_h(const Vector& x,
00108                         Number obj_factor,
00109                         const Vector& yc,
00110                         const Vector& yd,
00111                         SymMatrix& h);
00113 
00117     SmartPtr<SymLinearSolver> CreateLinearSolver();
00119   private:
00129     CompositeNLP();
00130 
00132     CompositeNLP(const CompositeNLP&);
00133 
00135     void operator=(const CompositeNLP&);
00137 
00139     SmartPtr<const Journalist> jnlst_;
00140 
00142     std::vector<SmartPtr<NLP> > nlps_;
00143 
00145     SmartPtr<VectorSpace> q_space_;
00146 
00148     std::vector<SmartPtr<VectorSpace> > linking_eqn_c_spaces_;
00149 
00157     std::vector<SmartPtr<Matrix> > Jx_linking_eqns_;
00158 
00161     std::vector<SmartPtr<Matrix> > Jq_linking_eqns_;
00163   };
00164 
00165 } // namespace Ipopt
00166 
00167 #endif

Generated on Sun Nov 14 14:06:35 2010 for Coin-All by  doxygen 1.4.7