user_interaction.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 {
47 }
48 
49 
51 {
52  setStatus( rhs.status );
53 }
54 
55 
57 {
58 }
59 
60 
62 {
63  if ( this != &rhs )
64  {
65  Options::operator=( rhs );
66  Logging::operator=( rhs );
67  Plotting::operator=( rhs );
68 
69  setStatus( rhs.status );
70  }
71 
72  return *this;
73 }
74 
75 
76 
78  )
79 {
80  return UserInteraction::addPlotWindow( _window );
81 }
82 
83 
85  )
86 {
87  LogRecord tmp;
88 
89  _window.getPlotDataRecord( tmp );
90  Logging::addLogRecord( tmp );
91  _window.setPlotDataRecord( tmp ); // do not forget to update _window's alias index!
92 
93  return Plotting::addPlotWindow( _window );
94 }
95 
96 
98  )
99 {
100  return Logging::operator<<( _record );
101 }
102 
103 
104 
105 
106 //
107 // PROTECTED MEMBER FUNCTIONS:
108 //
109 
110 
112  ) const
113 {
114  LogRecord tmp;
115 
116  _window.getPlotDataRecord( tmp );
118  _window.setPlotDataRecord( tmp );
119 
120  return SUCCESSFUL_RETURN;
121 }
122 
123 
124 
126 {
127  return status;
128 }
129 
130 
132  )
133 {
134  status = _status;
135  return SUCCESSFUL_RETURN;
136 }
137 
138 
140 
141 
142 /*
143  * end of file
144  */
virtual int addPlotWindow(PlotWindow &_window)
UserInteraction & operator=(const UserInteraction &rhs)
BlockStatus
Plotting & operator=(const Plotting &rhs)
returnValue setStatus(BlockStatus _status)
Provides a generic way to plot algorithmic outputs during runtime.
Definition: plotting.hpp:61
int addLogRecord(LogRecord &record)
Definition: logging.cpp:58
Allows to pass back messages to the calling function.
Provides a generic way to store algorithmic information during runtime.
Definition: logging.hpp:55
int operator<<(LogRecord &record)
Definition: logging.cpp:52
#define CLOSE_NAMESPACE_ACADO
virtual returnValue getPlotDataFromMemberLoggings(PlotWindow &_window) const
BlockStatus getStatus() const
Allows to setup and plot user-specified plot windows for algorithmic outputs.
Definition: plot_window.hpp:76
int addPlotWindow(PlotWindow &_window)
Provides a generic way to set and pass user-specified options.
Definition: options.hpp:65
virtual ~UserInteraction()
Options & operator=(const Options &rhs)
returnValue updateLogRecord(LogRecord &_record) const
Definition: logging.cpp:89
returnValue getPlotDataRecord(LogRecord &_record) const
Encapsulates all user interaction for setting options, logging data and plotting results.
void rhs(const real_t *x, real_t *f)
returnValue setPlotDataRecord(LogRecord &_record)
Allows to setup and store user-specified log records of algorithmic information.
Definition: log_record.hpp:72
#define BEGIN_NAMESPACE_ACADO
virtual int operator<<(PlotWindow &_window)


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