algorithmic_base.cpp
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 
34 
35 
37 
38 
39 //
40 // PUBLIC MEMBER FUNCTIONS:
41 //
42 
43 
45 {
48 
49  outputLoggingIdx = -1;
50 }
51 
52 
54  )
55 {
56  if ( _userInteraction == 0 )
57  {
60  }
61  else
62  {
63  userInteraction = _userInteraction;
65  }
66 
67  outputLoggingIdx = -1;
68 }
69 
70 
72 {
73  if ( rhs.useModuleStandalone == BT_TRUE )
74  {
77  }
78  else
79  {
82  }
83 
85 }
86 
87 
89 {
91  {
92  if ( userInteraction != 0 )
93  delete userInteraction;
94  }
95 }
96 
97 
99 {
100  if ( this != &rhs )
101  {
102  if ( rhs.useModuleStandalone == BT_TRUE )
103  {
106  }
107  else
108  {
111  }
112 
114  }
115 
116  return *this;
117 }
118 
119 
121 {
122  return userInteraction->addOptionsList( );
123 }
124 
125 
127  int value
128  )
129 {
130  return userInteraction->set( name,value );
131 }
132 
133 
135  double value
136  )
137 {
138  return userInteraction->set( name,value );
139 }
140 
142  const std::string& value
143  )
144 {
145  return userInteraction->set( name,value );
146 }
147 
148 
151  int value
152  )
153 {
154  return userInteraction->set( idx,name,value );
155 }
156 
157 
160  double value
161  )
162 {
163  return userInteraction->set( idx,name,value );
164 }
165 
166 
168 {
169  return userInteraction->setOptions( arg );
170 }
171 
172 
174  const Options &arg
175  )
176 {
177  return userInteraction->setOptions( idx,arg );
178 }
179 
180 
182  ) const
183 {
184  return userInteraction->getOptions( idx );
185 }
186 
187 
188 //
189 // PROTECTED MEMBER FUNCTIONS:
190 //
191 
192 
193 
194 
196 
197 
198 /*
199  * end of file
200  */
returnValue setOptions(const Options &arg)
Options getOptions(uint idx) const
Definition: options.cpp:204
returnValue setOptions(const Options &arg)
Definition: options.cpp:183
returnValue set(OptionsName name, int value)
UserInteraction * userInteraction
Allows to pass back messages to the calling function.
AlgorithmicBase & operator=(const AlgorithmicBase &rhs)
Base class for all algorithmic modules within the ACADO Toolkit providing some basic functionality...
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
#define CLOSE_NAMESPACE_ACADO
returnValue addOptionsList()
Definition: options.cpp:61
returnValue addOptionsList()
returnValue set(OptionsName name, int value)
Definition: options.cpp:126
Provides a generic way to set and pass user-specified options.
Definition: options.hpp:65
virtual ~AlgorithmicBase()
Encapsulates all user interaction for setting options, logging data and plotting results.
void rhs(const real_t *x, real_t *f)
#define BT_TRUE
Definition: acado_types.hpp:47
Options getOptions(uint idx) const
#define BEGIN_NAMESPACE_ACADO
#define BT_FALSE
Definition: acado_types.hpp:49
BooleanType useModuleStandalone
OptionsName


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