matrix_variable.hpp
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 
33 #ifndef ACADO_TOOLKIT_MATRIX_VARIABLE_HPP
34 #define ACADO_TOOLKIT_MATRIX_VARIABLE_HPP
35 
36 
39 
40 
42 
43 
44 
55 class MatrixVariable : public DMatrix, public VariableSettings
56 {
57  //
58  // PUBLIC MEMBER FUNCTIONS:
59  //
60  public:
63  MatrixVariable( );
64 
78  MatrixVariable( uint _nRows,
79  uint _nCols,
80  VariableType _type = VT_UNKNOWN,
81  const char** const _names = 0,
82  const char** const _units = 0,
83  DVector _scaling = emptyVector,
84  DVector _lb = emptyVector,
85  DVector _ub = emptyVector,
86  BooleanType _autoInit = defaultAutoInit
87  );
88 
94  );
95 
101  MatrixVariable( const DMatrix& _matrix,
102  VariableType _type = VT_UNKNOWN
103  );
104 
107  ~MatrixVariable( );
108 
114  );
115 
120  MatrixVariable& operator=( const DMatrix& rhs
121  );
122 
123 
140  returnValue init( uint _nRows,
141  uint _nCols,
142  VariableType _type = VT_UNKNOWN,
143  const char** const _names = 0,
144  const char** const _units = 0,
145  DVector _scaling = emptyVector,
146  DVector _lb = emptyVector,
147  DVector _ub = emptyVector,
148  BooleanType _autoInit = defaultAutoInit
149  );
150 
151 
156  inline DMatrix getMatrix( ) const;
157 
158 
169  MatrixVariable getRows( uint startIdx,
170  uint endIdx
171  ) const;
172 
183  MatrixVariable getCols( uint startIdx,
184  uint endIdx
185  ) const;
186 
187 
188  //
189  // PROTECTED MEMBER FUNCTIONS:
190  //
191  protected:
192 
193 
194  //
195  // DATA MEMBERS:
196  //
197  protected:
198 
199 };
200 
201 
203 
204 
205 
206 #include <acado/variables_grid/matrix_variable.ipp>
207 
208 
209 #endif // ACADO_TOOLKIT_MATRIX_VARIABLE_HPP
210 
211 /*
212  * end of file
213  */
MatrixVariable getCols(uint startIdx, uint endIdx) const
Allows to pass back messages to the calling function.
MatrixVariable & operator=(const MatrixVariable &rhs)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
#define CLOSE_NAMESPACE_ACADO
VariableType
Definition: acado_types.hpp:95
const BooleanType defaultAutoInit
DMatrix getMatrix() const
Provides matrix-valued optimization variables.
Provides variable-specific settings for vector- or matrix-valued optimization variables (for internal...
void rhs(const real_t *x, real_t *f)
MatrixVariable getRows(uint startIdx, uint endIdx) const
static DVector emptyVector
Definition: vector.hpp:335
#define BEGIN_NAMESPACE_ACADO


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