qpOASES 3.2.1
An Implementation of the Online Active Set Strategy
SubjectTo.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_SUBJECTTO_HPP
37#define QPOASES_SUBJECTTO_HPP
38
39
40#include <qpOASES/Indexlist.hpp>
41
42
44
45
57{
58 /*
59 * PUBLIC MEMBER FUNCTIONS
60 */
61 public:
63 SubjectTo( );
64
66 SubjectTo( int_t _n
67 );
68
70 SubjectTo( const SubjectTo& rhs
71 );
72
74 virtual ~SubjectTo( );
75
77 SubjectTo& operator=( const SubjectTo& rhs
78 );
79
80
84 returnValue init( int_t _n = 0
85 );
86
87
91 ) const;
92
93
97 inline SubjectToType getType( int_t i
98 ) const;
99
104 ) const;
105
106
110 inline returnValue setType( int_t i,
111 SubjectToType value
112 );
113
117 inline returnValue setStatus( int_t i,
118 SubjectToStatus value
119 );
120
121
123 inline void setNoLower( BooleanType _status
124 );
125
127 inline void setNoUpper( BooleanType _status
128 );
129
130
133 inline BooleanType hasNoLower( ) const;
134
137 inline BooleanType hasNoUpper( ) const;
138
139
151 virtual returnValue shift( int_t offset
152 ) = 0;
153
161 virtual returnValue rotate( int_t offset
162 ) = 0;
163
164
165 /*
166 * PROTECTED MEMBER FUNCTIONS
167 */
168 protected:
172
175 returnValue copy( const SubjectTo& rhs
176 );
177
178
183 returnValue addIndex( Indexlist* const indexlist,
184 int_t newnumber,
185 SubjectToStatus newstatus
186 );
187
192 returnValue removeIndex( Indexlist* const indexlist,
193 int_t removenumber
194 );
195
200 returnValue swapIndex( Indexlist* const indexlist,
201 int_t number1,
202 int_t number2
203 );
204
205
206 /*
207 * PROTECTED MEMBER VARIABLES
208 */
209 protected:
217};
218
219
221
222#include <qpOASES/SubjectTo.ipp>
223
224#endif /* QPOASES_SUBJECTTO_HPP */
225
226
227/*
228 * end of file
229 */
returnValue
Defines all symbols for global return values.
Definition: MessageHandling.hpp:65
BooleanType
Definition: Types.hpp:204
SubjectToType
Definition: Types.hpp:262
SubjectToStatus
Definition: Types.hpp:273
int int_t
Definition: Types.hpp:180
#define END_NAMESPACE_QPOASES
Definition: Types.hpp:110
#define BEGIN_NAMESPACE_QPOASES
Definition: Types.hpp:107
Stores and manages index lists.
Definition: Indexlist.hpp:56
Base class for managing working sets of bounds and constraints.
Definition: SubjectTo.hpp:57
int_t n
Definition: SubjectTo.hpp:210
returnValue clear()
Definition: SubjectTo.cpp:145
int_t getNumberOfType(SubjectToType _type) const
Definition: SubjectTo.ipp:47
returnValue removeIndex(Indexlist *const indexlist, int_t removenumber)
Definition: SubjectTo.cpp:229
SubjectToType getType(int_t i) const
Definition: SubjectTo.ipp:66
void setNoUpper(BooleanType _status)
Definition: SubjectTo.ipp:129
returnValue setStatus(int_t i, SubjectToStatus value)
Definition: SubjectTo.ipp:105
BooleanType noUpper
Definition: SubjectTo.hpp:216
void setNoLower(BooleanType _status)
Definition: SubjectTo.ipp:120
BooleanType hasNoLower() const
Definition: SubjectTo.ipp:138
virtual returnValue rotate(int_t offset)=0
SubjectToStatus * status
Definition: SubjectTo.hpp:213
returnValue addIndex(Indexlist *const indexlist, int_t newnumber, SubjectToStatus newstatus)
Definition: SubjectTo.cpp:199
BooleanType hasNoUpper() const
Definition: SubjectTo.ipp:147
BooleanType noLower
Definition: SubjectTo.hpp:215
returnValue copy(const SubjectTo &rhs)
Definition: SubjectTo.cpp:166
SubjectTo & operator=(const SubjectTo &rhs)
Definition: SubjectTo.cpp:92
returnValue swapIndex(Indexlist *const indexlist, int_t number1, int_t number2)
Definition: SubjectTo.cpp:253
virtual ~SubjectTo()
Definition: SubjectTo.cpp:83
SubjectToType * type
Definition: SubjectTo.hpp:212
returnValue setType(int_t i, SubjectToType value)
Definition: SubjectTo.ipp:90
returnValue init(int_t _n=0)
Definition: SubjectTo.cpp:107
SubjectToStatus getStatus(int_t i) const
Definition: SubjectTo.ipp:78
SubjectTo()
Definition: SubjectTo.cpp:50
virtual returnValue shift(int_t offset)=0