evaluation_point.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023  *
00024  */
00025 
00026 
00027 
00034 #ifndef ACADO_TOOLKIT_EVALUATION_POINT_HPP
00035 #define ACADO_TOOLKIT_EVALUATION_POINT_HPP
00036 
00037 #include <acado/function/ocp_iterate.hpp>
00038 #include <acado/function/function_evaluation_tree.hpp>
00039 
00040 
00041 BEGIN_NAMESPACE_ACADO
00042 
00043 
00044 class Function;
00045 
00058 class EvaluationPoint{
00059 
00060 friend class Function;
00061 
00062 //
00063 // PUBLIC MEMBER FUNCTIONS:
00064 //
00065 
00066 public:
00067 
00068 
00070     EvaluationPoint();
00071 
00072 
00074     EvaluationPoint( const Function &f,
00075                      uint  nx_ = 0,
00076                      uint  na_ = 0,
00077                      uint  nu_ = 0,
00078                      uint  np_ = 0,
00079                      uint  nw_ = 0,
00080                      uint  nd_ = 0,
00081                      uint  N_  = 0  );
00082 
00083 
00085     EvaluationPoint( const Function   &f   ,
00086                      const OCPiterate &iter  );
00087 
00088 
00090     EvaluationPoint( const EvaluationPoint& rhs );
00091 
00093     virtual ~EvaluationPoint( );
00094 
00096     EvaluationPoint& operator=( const EvaluationPoint& rhs );
00097 
00098 
00111     returnValue init( const Function &f,
00112                       uint  nx_ = 0,
00113                       uint  na_ = 0,
00114                       uint  np_ = 0,
00115                       uint  nu_ = 0,
00116                       uint  nw_ = 0,
00117                       uint  nd_ = 0,
00118                       uint  N_  = 0      );
00119 
00120 
00121     returnValue init( const Function   &f   ,
00122                       const OCPiterate &iter  );
00123 
00124 
00125 
00126     inline returnValue setT ( const double &t  );
00127     inline returnValue setX ( const DVector &x  );
00128     inline returnValue setXA( const DVector &xa );
00129     inline returnValue setP ( const DVector &p  );
00130     inline returnValue setU ( const DVector &u  );
00131     inline returnValue setW ( const DVector &w  );
00132     inline returnValue setDX( const DVector &dx );
00133 
00134     inline returnValue setZ ( const uint       &idx ,
00135                               const OCPiterate &iter  );
00136 
00137         inline returnValue setZero( );
00138 
00139 
00140     inline double getT () const;
00141     inline DVector getX () const;
00142     inline DVector getXA() const;
00143     inline DVector getP () const;
00144     inline DVector getU () const;
00145     inline DVector getW () const;
00146     inline DVector getDX() const;
00147 
00148 
00156     returnValue print() const;
00157 
00158 
00159 // PROTECTED MEMBER FUNCTIONS:
00160 // ---------------------------
00161 
00162 protected:
00163 
00164     inline returnValue copy( const int *order, const DVector &rhs );
00165 
00166     void copy( const EvaluationPoint &rhs );
00167     void deleteAll();
00168 
00169     void copyIdx( const uint &dim, const int *idx1, int **idx2 );
00170 
00171     inline DVector backCopy( const int *order, const uint &dim ) const;
00172 
00173     inline double* getEvaluationPointer() const;
00174 
00175 
00176 
00177 // PROTECTED MEMBERS:
00178 // ------------------
00179 
00180 protected:
00181 
00182     double     *z;   
00183     int     **idx;   
00185     uint       nx;   
00186     uint       na;   
00187     uint       nu;   
00188     uint       np;   
00189     uint       nw;   
00190     uint       nd;   
00191     uint       N ;   
00192 };
00193 
00194 
00195 CLOSE_NAMESPACE_ACADO
00196 
00197 
00198 
00199 #include <acado/function/evaluation_point.ipp>
00200 
00201 
00202 #endif  // ACADO_TOOLKIT_EVALUATION_POINT_HPP
00203 
00204 /*
00205  *   end of file
00206  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 11:58:09