qpOASES  3.2.1
An Implementation of the Online Active Set Strategy
Bounds.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of qpOASES.
3  *
4  * qpOASES -- An Implementation of the Online Active Set Strategy.
5  * Copyright (C) 2007-2017 by Hans Joachim Ferreau, Andreas Potschka,
6  * Christian Kirches et al. All rights reserved.
7  *
8  * qpOASES is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * qpOASES is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with qpOASES; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23 
24 
36 #ifndef QPOASES_BOUNDS_HPP
37 #define QPOASES_BOUNDS_HPP
38 
39 
40 #include <qpOASES/SubjectTo.hpp>
41 
42 
44 
45 
56 class Bounds : public SubjectTo
57 {
58  /*
59  * PUBLIC MEMBER FUNCTIONS
60  */
61  public:
63  Bounds( );
64 
66  Bounds( int_t _n
67  );
68 
70  Bounds( const Bounds& rhs
71  );
72 
74  virtual ~Bounds( );
75 
77  Bounds& operator=( const Bounds& rhs
78  );
79 
80 
84  returnValue init( int_t _n = 0
85  );
86 
87 
94  returnValue setupBound( int_t number,
95  SubjectToStatus _status
96  );
97 
104 
111 
118 
119 
125  );
126 
132  SubjectToStatus _status
133  );
134 
139  returnValue flipFixed( int_t number );
140 
144  returnValue swapFree( int_t number1,
145  int_t number2
146  );
147 
148 
151  inline int_t getNV( ) const;
152 
155  inline int_t getNFV( ) const;
156 
159  inline int_t getNBV( ) const;
160 
163  inline int_t getNUV( ) const;
164 
167  inline int_t getNFR( ) const;
168 
171  inline int_t getNFX( ) const;
172 
173 
176  inline Indexlist* getFree( );
177 
180  inline Indexlist* getFixed( );
181 
182 
194  virtual returnValue shift( int_t offset
195  );
196 
204  virtual returnValue rotate( int_t offset
205  );
206 
207 
212  returnValue print( );
213 
214 
215  /*
216  * PROTECTED MEMBER FUNCTIONS
217  */
218  protected:
221  returnValue clear( );
222 
225  returnValue copy( const Bounds& rhs
226  );
227 
228 
235  );
236 
237 
238  /*
239  * PROTECTED MEMBER VARIABLES
240  */
241  protected:
244 };
245 
246 
248 
249 #include <qpOASES/Bounds.ipp>
250 
251 #endif /* QPOASES_BOUNDS_HPP */
252 
253 
254 /*
255  * end of file
256  */
#define BEGIN_NAMESPACE_QPOASES
Definition: Types.hpp:107
virtual ~Bounds()
Definition: Bounds.cpp:76
#define END_NAMESPACE_QPOASES
Definition: Types.hpp:110
returnValue print()
Definition: Bounds.cpp:400
int int_t
Definition: Types.hpp:180
Indexlist fixed
Definition: Bounds.hpp:243
Base class for managing working sets of bounds and constraints.
Definition: SubjectTo.hpp:56
Bounds()
Definition: Bounds.cpp:50
returnValue setupAllUpper()
Definition: Bounds.cpp:178
SubjectToStatus
Definition: Types.hpp:272
int_t getNV() const
Definition: Bounds.ipp:46
int_t getNBV() const
Definition: Bounds.ipp:64
returnValue setupAll(SubjectToStatus _status)
Definition: Bounds.cpp:461
Indexlist * getFree()
Definition: Bounds.ipp:100
returnValue moveFixedToFree(int_t number)
Definition: Bounds.cpp:187
returnValue flipFixed(int_t number)
Definition: Bounds.cpp:228
Bounds & operator=(const Bounds &rhs)
Definition: Bounds.cpp:85
returnValue copy(const Bounds &rhs)
Definition: Bounds.cpp:447
Indexlist * getFixed()
Definition: Bounds.ipp:109
returnValue setupAllFree()
Definition: Bounds.cpp:160
int_t getNFV() const
Definition: Bounds.ipp:55
returnValue
Defines all symbols for global return values.
Definition: MessageHandling.hpp:64
Indexlist freee
Definition: Bounds.hpp:242
int_t getNFX() const
Definition: Bounds.ipp:91
virtual returnValue rotate(int_t offset)
Definition: Bounds.cpp:325
int_t getNFR() const
Definition: Bounds.ipp:82
Stores and manages index lists.
Definition: Indexlist.hpp:55
returnValue setupAllLower()
Definition: Bounds.cpp:169
returnValue init(int_t _n=0)
Definition: Bounds.cpp:102
int_t getNUV() const
Definition: Bounds.ipp:73
returnValue moveFreeToFixed(int_t number, SubjectToStatus _status)
Definition: Bounds.cpp:207
virtual returnValue shift(int_t offset)
Definition: Bounds.cpp:264
Manages working sets of bounds (i.e. box constraints).
Definition: Bounds.hpp:56
returnValue setupBound(int_t number, SubjectToStatus _status)
Definition: Bounds.cpp:124
returnValue clear()
Definition: Bounds.cpp:438
returnValue swapFree(int_t number1, int_t number2)
Definition: Bounds.cpp:249