dynamic_estimator.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/estimator/dynamic_estimator.hpp>
00035 
00036 
00037 
00038 BEGIN_NAMESPACE_ACADO
00039 
00040 
00041 //
00042 // PUBLIC MEMBER FUNCTIONS:
00043 //
00044 
00045 DynamicEstimator::DynamicEstimator( ) : Estimator( )
00046 {
00047 }
00048 
00049 
00050 DynamicEstimator::DynamicEstimator(     const RealTimeAlgorithm& _realTimeAlgorithm,
00051                                                                         double _samplingTime
00052                                                                         ) : Estimator( _samplingTime )
00053 {
00054         realTimeAlgorithm = new RealTimeAlgorithm( _realTimeAlgorithm );
00055         setStatus( BS_NOT_INITIALIZED );
00056 }
00057 
00058 
00059 DynamicEstimator::DynamicEstimator( const DynamicEstimator& rhs ) : Estimator( rhs )
00060 {
00061         if ( rhs.realTimeAlgorithm != 0 )
00062                 realTimeAlgorithm = new RealTimeAlgorithm( *(rhs.realTimeAlgorithm) );
00063         else
00064                 realTimeAlgorithm = 0;
00065 }
00066 
00067 
00068 DynamicEstimator::~DynamicEstimator( )
00069 {
00070         if ( realTimeAlgorithm != 0 )
00071                 delete realTimeAlgorithm;
00072 }
00073 
00074 
00075 DynamicEstimator& DynamicEstimator::operator=( const DynamicEstimator& rhs )
00076 {
00077         if ( this != &rhs )
00078         {
00079                 if ( realTimeAlgorithm != 0 )
00080                         delete realTimeAlgorithm;
00081 
00082 
00083                 Estimator::operator=( rhs );
00084 
00085 
00086                 if ( rhs.realTimeAlgorithm!= 0 )
00087                         realTimeAlgorithm = new RealTimeAlgorithm( *(rhs.realTimeAlgorithm) );
00088                 else
00089                         realTimeAlgorithm = 0;
00090         }
00091 
00092     return *this;
00093 }
00094 
00095 
00096 Estimator* DynamicEstimator::clone( ) const
00097 {
00098         return new DynamicEstimator( *this );
00099 }
00100 
00101 
00102 
00103 returnValue DynamicEstimator::init(     double startTime,
00104                                                                         const DVector &x0_,
00105                                                                         const DVector &p_
00106                                                                         )
00107 {
00108         setStatus( BS_READY );
00109 
00110         return SUCCESSFUL_RETURN;
00111 }
00112 
00113 
00114 returnValue DynamicEstimator::step(     double currentTime,
00115                                                                         const DVector& _y
00116                                                                         )
00117 {
00118         return SUCCESSFUL_RETURN;
00119 }
00120 
00121 
00122 
00123 //
00124 // PROTECTED MEMBER FUNCTIONS:
00125 //
00126 
00127 
00128 
00129 
00130 CLOSE_NAMESPACE_ACADO
00131 
00132 // end of file.


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