simulated_reference_trajectory.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
35 
36 
37 
39 
40 
41 
42 //
43 // PUBLIC MEMBER FUNCTIONS:
44 //
45 
47 {
48  process = 0;
49 }
50 
51 
53  IntegratorType _integratorType
54  )
55 {
56  process = new Process( _dynamicSystem,_integratorType );
57 }
58 
59 
61 {
62  if ( rhs.process != 0 )
63  process = new Process( *(rhs.process) );
64  else
65  process = 0;
66 }
67 
68 
70 {
71  if ( process != 0 )
72  delete process;
73 }
74 
75 
77 {
78  if ( this != &rhs )
79  {
80  if ( process != 0 )
81  delete process;
82 
84 
85  }
86 
87  return *this;
88 }
89 
90 
92 {
93  return new SimulatedReferenceTrajectory( *this );
94 }
95 
96 
98  const DVector& _x,
99  const DVector& _xa,
100  const DVector& _u,
101  const DVector& _p,
102  const DVector& _w
103  )
104 {
106 }
107 
108 
110  const DVector& _y,
111  const DVector& _x,
112  const DVector& _xa,
113  const DVector& _u,
114  const DVector& _p,
115  const DVector& _w
116  )
117 {
119 }
120 
121 
123  const VariablesGrid& _u,
124  const VariablesGrid& _p,
125  const VariablesGrid& _w
126  )
127 {
128 
129 
130  return SUCCESSFUL_RETURN;
131 }
132 
133 
135  double tEnd,
136  VariablesGrid& _yRef
137  ) const
138 {
140 }
141 
142 
143 
145 {
146  if ( process != 0 )
147  return process->getNY( );
148  else
149  return 0;
150 }
151 
152 
153 //
154 // PROTECTED MEMBER FUNCTIONS:
155 //
156 
157 
158 
159 
161 
162 // end of file.
Abstract base class to define a reference trajectory that the ControlLaw aims to track.
Stores a DifferentialEquation together with an OutputFcn.
virtual returnValue init(double startTime=0.0, const DVector &_x=emptyConstVector, const DVector &_xa=emptyConstVector, const DVector &_u=emptyConstVector, const DVector &_p=emptyConstVector, const DVector &_w=emptyConstVector)
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
#define CLOSE_NAMESPACE_ACADO
IntegratorType
Allows to define a simulated reference trajectory that the ControlLaw aims to track.
virtual returnValue getReference(double tStart, double tEnd, VariablesGrid &_yRef) const
void rhs(const real_t *x, real_t *f)
SimulatedReferenceTrajectory & operator=(const SimulatedReferenceTrajectory &rhs)
virtual returnValue step(double _currentTime, const DVector &_y, const DVector &_x=emptyConstVector, const DVector &_xa=emptyConstVector, const DVector &_u=emptyConstVector, const DVector &_p=emptyConstVector, const DVector &_w=emptyConstVector)
Allows to define an adaptive reference trajectory that the ControlLaw aims to track.
Simulates the process to be controlled based on a dynamic model.
Definition: process.hpp:71
#define BEGIN_NAMESPACE_ACADO
uint getNY(uint stageIdx=0) const
virtual ReferenceTrajectory * clone() const
AdaptiveReferenceTrajectory & operator=(const AdaptiveReferenceTrajectory &rhs)
#define ACADOERROR(retval)


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:06