scp_step_fullstep.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 
35 
36 
37 
39 
40 
41 //
42 // PUBLIC MEMBER FUNCTIONS:
43 //
44 
46 {
47 }
48 
49 
50 SCPstepFullstep::SCPstepFullstep( UserInteraction* _userInteraction ) : SCPstep( _userInteraction )
51 {
52 }
53 
54 
56 {
57 }
58 
59 
61 {
62 }
63 
64 
66 {
67  if ( this != &rhs )
68  {
69  SCPstep::operator=( rhs );
70  }
71 
72  return *this;
73 }
74 
75 
76 
77 
79 {
80  return new SCPstepFullstep( *this );
81 }
82 
83 
84 
86  BandedCP& cp,
87  SCPevaluation* eval
88  )
89 {
90 // RealClock clock;
91 // clock.reset();
92 // clock.start();
93 
94  double meritFcnValue;
95  meritFcn->evaluate( 1.0,iter,cp,*eval, meritFcnValue );
97  setLast( LOG_MERIT_FUNCTION_VALUE,meritFcnValue );
98 // clock.stop();
99 // printf("meritFcn time = %e\n", clock.getTime());
100 
101 
102 // clock.reset();
103 // clock.start();
104  returnValue returnvalue = applyStep( iter,cp,1.0 );
105  if( returnvalue != SUCCESSFUL_RETURN )
106  ACADOERROR( returnvalue );
107 // clock.stop();
108 // printf("applyStep time = %e\n", clock.getTime());
109 
110 
111  return SUCCESSFUL_RETURN;
112 }
113 
114 
115 
116 
117 //
118 // PROTECTED MEMBER FUNCTIONS:
119 //
120 
121 
122 
123 
125 
126 // end of file.
returnValue setLast(LogName _name, int lastValue, double time=-INFTY)
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
SCPmeritFunction * meritFcn
Definition: scp_step.hpp:124
virtual SCPstep * clone() const
virtual ~SCPstepFullstep()
Allows to pass back messages to the calling function.
virtual returnValue evaluate(double alpha, const OCPiterate &iter, BandedCP &cp, SCPevaluation &eval, double &result)
Base class for different ways to perform a step of an SCPmethod for solving NLPs. ...
Definition: scp_step.hpp:62
virtual returnValue applyStep(OCPiterate &iter, BandedCP &cp, double alpha) const
Definition: scp_step.cpp:116
SCPstep & operator=(const SCPstep &rhs)
Definition: scp_step.cpp:82
#define CLOSE_NAMESPACE_ACADO
Implements a fullstep to perform a step of an SCPmethod for solving NLPs.
virtual returnValue performStep(OCPiterate &iter, BandedCP &cp, SCPevaluation *eval)
Encapsulates all user interaction for setting options, logging data and plotting results.
void rhs(const real_t *x, real_t *f)
Base class for different ways to evaluate functions and derivatives within an SCPmethod for solving N...
#define BEGIN_NAMESPACE_ACADO
SCPstepFullstep & operator=(const SCPstepFullstep &rhs)
#define ACADOERROR(retval)
Data class for storing conic programs arising from optimal control.
Definition: banded_cp.hpp:56


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