acado/user_interaction/plotting.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 
36 
37 
39 
40 
41 
42 //
43 // PUBLIC MEMBER FUNCTIONS:
44 //
45 
46 
48 {
49 }
50 
51 
53 {
55 }
56 
57 
59 {
60 }
61 
62 
64 {
65  if ( this != &rhs )
66  {
68  }
69 
70  return *this;
71 }
72 
73 
75  )
76 {
77  if ( _frequency == PLOT_NEVER )
78  return SUCCESSFUL_RETURN;
79 
81 
82  while ( window != 0 )
83  {
84  // update plot data and ...
85  getPlotWindow( *window );
86 
87  // ... plot the window
88  if ( window->plot( _frequency ) != SUCCESSFUL_RETURN )
90 
91  window = window->getNext( );
92  }
93 
94  return SUCCESSFUL_RETURN;
95 }
96 
97 
99  )
100 {
101  if ( _frequency == PLOT_NEVER )
102  return SUCCESSFUL_RETURN;
103 
104  PlotWindow* window = plotCollection.first;
105 
106  while ( window != 0 )
107  {
108  // update plot data and ...
109  getPlotWindow( *window );
110 
111  // ... plot the window
112  if ( window->replot( _frequency ) != SUCCESSFUL_RETURN )
114 
115  window = window->getNext( );
116  }
117 
118  return SUCCESSFUL_RETURN;
119 }
120 
121 
122 
123 //
124 // PROTECTED MEMBER FUNCTIONS:
125 //
126 
127 
129  ) const
130 {
131  return SUCCESSFUL_RETURN;
132 }
133 
134 
135 
137 
138 
139 /*
140  * end of file
141  */
virtual returnValue plot(PlotFrequency _frequency=PLOT_IN_ANY_CASE)
virtual returnValue replot(PlotFrequency _frequency=PLOT_IN_ANY_CASE)
virtual returnValue replot(PlotFrequency _frequency=PLOT_IN_ANY_CASE)
virtual returnValue plot(PlotFrequency _frequency=PLOT_IN_ANY_CASE)
returnValue getPlotWindow(uint idx, PlotWindow &_window) const
Plotting & operator=(const Plotting &rhs)
virtual returnValue getPlotDataFromMemberLoggings(PlotWindow &_window) const
Provides a generic way to plot algorithmic outputs during runtime.
Definition: plotting.hpp:61
Allows to pass back messages to the calling function.
PlotCollection plotCollection
Definition: plotting.hpp:194
#define CLOSE_NAMESPACE_ACADO
PlotFrequency
PlotWindow * first
Allows to setup and plot user-specified plot windows for algorithmic outputs.
Definition: plot_window.hpp:76
PlotWindow * getNext() const
void rhs(const real_t *x, real_t *f)
#define BEGIN_NAMESPACE_ACADO
#define ACADOERROR(retval)


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