simulated_reference_trajectory.cpp
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 
00034 #include <acado/reference_trajectory/simulated_reference_trajectory.hpp>
00035 
00036 
00037 
00038 BEGIN_NAMESPACE_ACADO
00039 
00040 
00041 
00042 //
00043 // PUBLIC MEMBER FUNCTIONS:
00044 //
00045 
00046 SimulatedReferenceTrajectory::SimulatedReferenceTrajectory( ) : AdaptiveReferenceTrajectory( )
00047 {
00048         process = 0;
00049 }
00050 
00051 
00052 SimulatedReferenceTrajectory::SimulatedReferenceTrajectory(     const DynamicSystem& _dynamicSystem,
00053                                                                                                                         IntegratorType _integratorType
00054                                                                                                                         )
00055 {
00056         process = new Process( _dynamicSystem,_integratorType );
00057 }
00058 
00059 
00060 SimulatedReferenceTrajectory::SimulatedReferenceTrajectory( const SimulatedReferenceTrajectory& rhs ) : AdaptiveReferenceTrajectory( rhs )
00061 {
00062         if ( rhs.process != 0 )
00063                 process = new Process( *(rhs.process) );
00064         else
00065                 process = 0;
00066 }
00067 
00068 
00069 SimulatedReferenceTrajectory::~SimulatedReferenceTrajectory( )
00070 {
00071         if ( process != 0 )
00072                 delete process;
00073 }
00074 
00075 
00076 SimulatedReferenceTrajectory& SimulatedReferenceTrajectory::operator=( const SimulatedReferenceTrajectory& rhs )
00077 {
00078         if ( this != &rhs )
00079         {
00080                 if ( process != 0 )
00081                         delete process;
00082 
00083                 AdaptiveReferenceTrajectory::operator=( rhs );
00084                 
00085         }
00086 
00087     return *this;
00088 }
00089 
00090 
00091 ReferenceTrajectory* SimulatedReferenceTrajectory::clone( ) const
00092 {
00093         return new SimulatedReferenceTrajectory( *this );
00094 }
00095 
00096 
00097 returnValue SimulatedReferenceTrajectory::init( double startTime,
00098                                                                                                 const DVector& _x,
00099                                                                                                 const DVector& _xa,
00100                                                                                                 const DVector& _u,
00101                                                                                                 const DVector& _p,
00102                                                                                                 const DVector& _w
00103                                                                                                 )
00104 {
00105     return ACADOERROR( RET_NOT_YET_IMPLEMENTED );
00106 }
00107 
00108 
00109 returnValue SimulatedReferenceTrajectory::step( double _currentTime,
00110                                                                                                 const DVector& _y,
00111                                                                                                 const DVector& _x,
00112                                                                                                 const DVector& _xa,
00113                                                                                                 const DVector& _u,
00114                                                                                                 const DVector& _p,
00115                                                                                                 const DVector& _w
00116                                                                                                 )
00117 {
00118         return ACADOERROR( RET_NOT_YET_IMPLEMENTED );
00119 }
00120 
00121 
00122 returnValue SimulatedReferenceTrajectory::step( const DVector& _x,
00123                                                                                                 const VariablesGrid& _u,
00124                                                                                                 const VariablesGrid& _p,
00125                                                                                                 const VariablesGrid& _w
00126                                                                                                 )
00127 {
00128         
00129 
00130         return SUCCESSFUL_RETURN;
00131 }
00132 
00133 
00134 returnValue SimulatedReferenceTrajectory::getReference( double tStart,
00135                                                                                                                 double tEnd,
00136                                                                                                                 VariablesGrid& _yRef
00137                                                                                                                 ) const
00138 {
00139     return ACADOERROR( RET_NOT_YET_IMPLEMENTED );
00140 }
00141 
00142 
00143 
00144 uint SimulatedReferenceTrajectory::getDim( ) const
00145 {
00146         if ( process != 0 )
00147                 return process->getNY( );
00148         else
00149                 return 0;
00150 }
00151 
00152 
00153 //
00154 // PROTECTED MEMBER FUNCTIONS:
00155 //
00156 
00157 
00158 
00159 
00160 CLOSE_NAMESPACE_ACADO
00161 
00162 // end of file.


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:00:14