qpOASES  3.2.1
An Implementation of the Online Active Set Strategy
Constraints.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_CONSTRAINTS_HPP
37 #define QPOASES_CONSTRAINTS_HPP
38 
39 
40 #include <qpOASES/SubjectTo.hpp>
41 
42 
44 
45 
56 class Constraints : public SubjectTo
57 {
58  /*
59  * PUBLIC MEMBER FUNCTIONS
60  */
61  public:
63  Constraints( );
64 
66  Constraints( int_t _n
67  );
68 
70  Constraints( const Constraints& rhs
71  );
72 
74  virtual ~Constraints( );
75 
77  Constraints& operator=( const Constraints& rhs
78  );
79 
80 
84  returnValue init( int_t _n = 0
85  );
86 
87 
95  SubjectToStatus _status
96  );
97 
104 
111 
118 
119 
124  );
125 
130  SubjectToStatus _status
131  );
132 
137  returnValue flipFixed( int_t number );
138 
139 
142  inline int_t getNC( ) const;
143 
146  inline int_t getNEC( ) const;
147 
150  inline int_t getNIC( ) const;
151 
154  inline int_t getNUC( ) const;
155 
158  inline int_t getNAC( ) const;
159 
162  inline int_t getNIAC( ) const;
163 
164 
167  inline Indexlist* getActive( );
168 
171  inline Indexlist* getInactive( );
172 
173 
185  virtual returnValue shift( int_t offset
186  );
187 
195  virtual returnValue rotate( int_t offset
196  );
197 
198 
203  returnValue print( );
204 
205 
206  /*
207  * PROTECTED MEMBER FUNCTIONS
208  */
209  protected:
212  returnValue clear( );
213 
216  returnValue copy( const Constraints& rhs
217  );
218 
219 
226  );
227 
228 
229  /*
230  * PROTECTED MEMBER VARIABLES
231  */
232  protected:
235 };
236 
238 
239 #include <qpOASES/Constraints.ipp>
240 
241 #endif /* QPOASES_CONSTRAINTS_HPP */
242 
243 
244 /*
245  * end of file
246  */
returnValue setupAllUpper()
Definition: Constraints.cpp:177
Constraints & operator=(const Constraints &rhs)
Definition: Constraints.cpp:85
#define BEGIN_NAMESPACE_QPOASES
Definition: Types.hpp:107
int_t getNC() const
Definition: Constraints.ipp:47
#define END_NAMESPACE_QPOASES
Definition: Types.hpp:110
int_t getNUC() const
Definition: Constraints.ipp:74
returnValue clear()
Definition: Constraints.cpp:422
Manages working sets of constraints.
Definition: Constraints.hpp:56
virtual ~Constraints()
Definition: Constraints.cpp:76
returnValue init(int_t _n=0)
Definition: Constraints.cpp:101
returnValue copy(const Constraints &rhs)
Definition: Constraints.cpp:431
int int_t
Definition: Types.hpp:180
int_t getNIC() const
Definition: Constraints.ipp:65
returnValue moveInactiveToActive(int_t number, SubjectToStatus _status)
Definition: Constraints.cpp:206
Indexlist inactive
Definition: Constraints.hpp:234
Base class for managing working sets of bounds and constraints.
Definition: SubjectTo.hpp:56
SubjectToStatus
Definition: Types.hpp:272
returnValue flipFixed(int_t number)
Definition: Constraints.cpp:227
returnValue setupAllInactive()
Definition: Constraints.cpp:159
Indexlist active
Definition: Constraints.hpp:233
int_t getNEC() const
Definition: Constraints.ipp:56
returnValue setupAllLower()
Definition: Constraints.cpp:168
int_t getNIAC() const
Definition: Constraints.ipp:92
returnValue moveActiveToInactive(int_t number)
Definition: Constraints.cpp:186
virtual returnValue shift(int_t offset)
Definition: Constraints.cpp:248
virtual returnValue rotate(int_t offset)
Definition: Constraints.cpp:309
returnValue setupAll(SubjectToStatus _status)
Definition: Constraints.cpp:445
returnValue print()
Definition: Constraints.cpp:384
returnValue
Defines all symbols for global return values.
Definition: MessageHandling.hpp:64
Stores and manages index lists.
Definition: Indexlist.hpp:55
int_t getNAC() const
Definition: Constraints.ipp:83
returnValue setupConstraint(int_t number, SubjectToStatus _status)
Definition: Constraints.cpp:123
Indexlist * getActive()
Definition: Constraints.ipp:102
Constraints()
Definition: Constraints.cpp:50
Indexlist * getInactive()
Definition: Constraints.ipp:111