external_packages/qpOASES-3.0beta/include/qpOASES/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-2011 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 
56 class SubjectTo
57 {
58  /*
59  * PUBLIC MEMBER FUNCTIONS
60  */
61  public:
63  SubjectTo( );
64 
66  SubjectTo( int _n
67  );
68 
70  SubjectTo( const SubjectTo& rhs
71  );
72 
74  virtual ~SubjectTo( );
75 
78  );
79 
80 
84  returnValue init( int _n = 0
85  );
86 
87 
90  inline int getNumberOfType( SubjectToType _type
91  ) const;
92 
93 
97  inline SubjectToType getType( int i
98  ) const;
99 
103  inline SubjectToStatus getStatus( int i
104  ) const;
105 
106 
110  inline returnValue setType( int i,
111  SubjectToType value
112  );
113 
117  inline returnValue setStatus( int 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 offset
152  ) = 0;
153 
161  virtual returnValue rotate( int offset
162  ) = 0;
163 
164 
165  /*
166  * PROTECTED MEMBER FUNCTIONS
167  */
168  protected:
171  returnValue clear( );
172 
175  returnValue copy( const SubjectTo& rhs
176  );
177 
178 
183  returnValue addIndex( Indexlist* const indexlist,
184  int newnumber,
185  SubjectToStatus newstatus
186  );
187 
192  returnValue removeIndex( Indexlist* const indexlist,
193  int removenumber
194  );
195 
200  returnValue swapIndex( Indexlist* const indexlist,
201  int number1,
202  int number2
203  );
204 
205 
206  /*
207  * PROTECTED MEMBER VARIABLES
208  */
209  protected:
210  int n;
217 };
218 
219 
221 
222 #include <qpOASES/SubjectTo.ipp>
223 
224 #endif /* QPOASES_SUBJECTTO_HPP */
225 
226 
227 /*
228  * end of file
229  */
void setNoLower(BooleanType _status)
returnValue setType(int i, SubjectToType value)
int getNumberOfType(SubjectToType _type) const
Allows to pass back messages to the calling function.
Base class for managing working sets of bounds and constraints.
returnValue swapIndex(Indexlist *const indexlist, int number1, int number2)
returnValue addIndex(Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
virtual returnValue rotate(int offset)=0
SubjectToStatus getStatus(int i) const
returnValue copy(const SubjectTo &rhs)
virtual returnValue shift(int offset)=0
returnValue removeIndex(Indexlist *const indexlist, int removenumber)
void rhs(const real_t *x, real_t *f)
SubjectToType getType(int i) const
void setNoUpper(BooleanType _status)
returnValue setStatus(int i, SubjectToStatus value)
BooleanType hasNoUpper() const
BooleanType hasNoLower() const


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