smooth_operator.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 
27 
39 
40 
42 
43 
45 {
46 }
47 
49 {
50 }
51 
52 
53 Operator& SmoothOperator::operator=( const double &arg ){
54 
56  ASSERT( 1 == 0 );
57  return emptyTreeProjection;
58 }
59 
61 
63  ASSERT( 1 == 0 );
64  return emptyTreeProjection;
65 }
66 
68 
70  ASSERT( 1 == 0 );
71  return emptyTreeProjection;
72 }
73 
75 
77  ASSERT( 1 == 0 );
78  return emptyTreeProjection;
79 }
80 
82 
84  ASSERT( 1 == 0 );
85  return emptyTreeProjection;
86 }
87 
88 
90 
91  // if this routine is ever called something went
92  // really wrong ....
93 
95  ASSERT( 1 == 0 );
96  return new TreeProjection();
97 }
98 
99 
100 
101 
102 Operator& SmoothOperator::operator+=( const double & arg ){ return operator=( this->operator+(arg) ); }
103 Operator& SmoothOperator::operator+=( const DVector & arg ){ return operator=( this->operator+(arg) ); }
104 Operator& SmoothOperator::operator+=( const DMatrix & arg ){ return operator=( this->operator+(arg) ); }
105 Operator& SmoothOperator::operator+=( const Expression& arg ){ return operator=( this->operator+(arg) ); }
106 
107 Operator& SmoothOperator::operator-=( const double & arg ){ return operator=( this->operator-(arg) ); }
108 Operator& SmoothOperator::operator-=( const DVector & arg ){ return operator=( this->operator-(arg) ); }
109 Operator& SmoothOperator::operator-=( const DMatrix & arg ){ return operator=( this->operator-(arg) ); }
110 Operator& SmoothOperator::operator-=( const Expression & arg ){ return operator=( this->operator-(arg) ); }
111 
112 Operator& SmoothOperator::operator*=( const double & arg ){ return operator=( this->operator*(arg) ); }
113 Operator& SmoothOperator::operator*=( const DVector & arg ){ return operator=( this->operator*(arg) ); }
114 Operator& SmoothOperator::operator*=( const DMatrix & arg ){ return operator=( this->operator*(arg) ); }
115 Operator& SmoothOperator::operator*=( const Expression & arg ){ return operator=( this->operator*(arg) ); }
116 
117 Operator& SmoothOperator::operator/=( const double & arg ){ return operator=( this->operator/(arg) ); }
118 Operator& SmoothOperator::operator/=( const Expression & arg ){ return operator=( this->operator/(arg) ); }
119 
120 
121 
122 
123 Expression SmoothOperator::operator+( const double & arg ) const{ return Expression(*this)+arg; }
124 Expression SmoothOperator::operator+( const DVector & arg ) const{ return Expression(*this)+arg; }
125 Expression SmoothOperator::operator+( const DMatrix & arg ) const{ return Expression(*this)+arg; }
126 Expression SmoothOperator::operator+( const Operator& arg ) const{ return Expression(*this)+arg; }
127 Expression SmoothOperator::operator+( const Expression & arg ) const{ return Expression(*this)+arg; }
128 
129 Expression SmoothOperator::operator-( const double & arg ) const{ return Expression(*this)-arg; }
130 Expression SmoothOperator::operator-( const DVector & arg ) const{ return Expression(*this)-arg; }
131 Expression SmoothOperator::operator-( const DMatrix & arg ) const{ return Expression(*this)-arg; }
132 Expression SmoothOperator::operator-( const Operator& arg ) const{ return Expression(*this)-arg; }
133 Expression SmoothOperator::operator-( const Expression & arg ) const{ return Expression(*this)-arg; }
134 
136 
137 Expression SmoothOperator::operator*( const double & arg ) const{ return Expression(*this)*arg; }
138 Expression SmoothOperator::operator*( const DVector & arg ) const{ return Expression(*this)*arg; }
139 Expression SmoothOperator::operator*( const DMatrix & arg ) const{ return Expression(*this)*arg; }
140 
141 
143 
144  Expression tmp2(arg);
145 
146 
147  Expression tmp1(*this);
148 
149 
150  return tmp1*tmp2;
151 }
152 
153 
154 Expression SmoothOperator::operator*( const Expression & arg ) const{ return Expression(*this)*arg; }
155 
156 Expression SmoothOperator::operator/( const double & arg ) const{ return Expression(*this)/arg; }
157 Expression SmoothOperator::operator/( const Operator& arg ) const{ return Expression(*this)/arg; }
158 Expression SmoothOperator::operator/( const Expression & arg ) const{ return Expression(*this)/arg; }
159 
160 ConstraintComponent SmoothOperator::operator<=( const double& ub ) const{ return Expression(*this) <= ub; }
161 ConstraintComponent SmoothOperator::operator>=( const double& lb ) const{ return Expression(*this) >= lb; }
162 ConstraintComponent SmoothOperator::operator==( const double& b ) const{ return Expression(*this) == b; }
163 
166 ConstraintComponent SmoothOperator::operator==( const DVector& b ) const{ return Expression(*this) == b; }
167 
171 
172 
174 {
175  return BT_TRUE;
176 }
177 
178 
179 double SmoothOperator::getValue() const{ return INFTY; }
180 
182 
184  return -1;
185 }
186 
187 
189 
190  return 0;
191 }
192 
194 
195 
196 // end of file.
Abstract base class for all scalar-valued symbolic operators.
Definition: operator.hpp:60
virtual int getGlobalIndex() const
Expression operator-() const
const double INFTY
Operator & operator-=(const double &arg)
Provides a time grid consisting of vector-valued optimization variables at each grid point...
#define CLOSE_NAMESPACE_ACADO
Data class for symbolically formulating constraints within optimal control problems.
ConstraintComponent operator<=(const double &ub) const
ConstraintComponent operator>=(const double &lb) const
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
Expression operator*(const double &arg) const
Operator & operator/=(const double &arg)
Expression operator/(const double &arg) const
Expression operator+(const double &arg) const
static TreeProjection emptyTreeProjection
ConstraintComponent operator==(const double &b) const
#define ASSERT(x)
#define BT_TRUE
Definition: acado_types.hpp:47
Operator & operator*=(const double &arg)
virtual Operator * passArgument() const
Implements the tree-projection operator within the family of SymbolicOperators.
virtual TreeProjection * cloneTreeProjection() const
#define BEGIN_NAMESPACE_ACADO
virtual double getValue() const
Operator & operator+=(const double &arg)
virtual Operator & operator=(const double &arg)
virtual BooleanType isSmooth() const
#define ACADOERROR(retval)
virtual ~SmoothOperator()


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