34 #ifndef ACADO_TOOLKIT_TAYLOR_MODEL_HPP 35 #define ACADO_TOOLKIT_TAYLOR_MODEL_HPP 63 (
const unsigned int nvar_,
const unsigned int nord_ )
64 {
_size( nvar_, nord_ ); }
110 BOUNDER_TYPE(LSB), PROPAGATE_BNDT(false), INTER_WITH_BNDT(false),
111 SCALE_VARIABLES(true), CENTER_REMAINDER(true), REF_MIDPOINT(true)
116 : BOUNDER_TYPE( _options.BOUNDER_TYPE ),
117 PROPAGATE_BNDT( _options.PROPAGATE_BNDT ),
118 INTER_WITH_BNDT( _options.INTER_WITH_BNDT ),
119 SCALE_VARIABLES( _options.SCALE_VARIABLES ),
120 CENTER_REMAINDER( _options.CENTER_REMAINDER ),
121 REF_MIDPOINT( _options.REF_MIDPOINT )
123 template <
typename U>
Options&
operator =
126 PROPAGATE_BNDT = _options.PROPAGATE_BNDT;
127 INTER_WITH_BNDT = _options.INTER_WITH_BNDT;
128 SCALE_VARIABLES = _options.SCALE_VARIABLES;
129 CENTER_REMAINDER = _options.CENTER_REMAINDER;
130 REF_MIDPOINT = _options.REF_MIDPOINT;
188 (
const unsigned int nvar,
const unsigned int nord );
196 (
const unsigned int ix,
const T&X,
const double scaling );
209 (
unsigned int *iexp,
const unsigned int iord );
216 (
const unsigned int *iexp );
223 (
const unsigned int n,
const unsigned int k )
const;
232 template<
typename U >
static void _display 233 (
const unsigned int m,
const unsigned int n,
U*&a,
const unsigned int lda,
234 const std::string&stra, std::ostream&os );
241 #include <acado/set_arithmetics/taylor_model.ipp> 242 #include <acado/set_arithmetics/taylor_variable.ipp> 244 #endif // ACADO_TOOLKIT_TAYLOR_MODEL_HPP static void _display(const unsigned int m, const unsigned int n, U *&a, const unsigned int lda, const std::string &stra, std::ostream &os)
Display the elements of a 2D array.
Exceptions(TYPE ierr_)
Constructor for error ierr
Error due to an inconsistent number of variables (zero variables)
USING_NAMESPACE_ACADO typedef TaylorVariable< Interval > T
C++ template class for definition of and operation on variables in a Taylor model.
void _set_prodmon()
Populate array _prodmon w/ exponents resulting from the product of two monomial terms 1...
double * _refpoint
Reference point.
Error due to calling a function/feature not yet implemented.
unsigned int * _posord
Positions of terms of degrees 1,...,_nord.
Eigenvalue decomposition-based bounder.
unsigned int _loc_expmon(const unsigned int *iexp)
Locates position in _posord of monomial term with variable exponents iexp.
unsigned int nvar() const
Get number of variables in the TaylorModel.
unsigned int * _binom
Binomial coefficients.
double * _scaling
Variable scaling.
unsigned int _get_binom(const unsigned int n, const unsigned int k) const
Return binomial coefficient .
Error during calculation of a TaylorVariable for a division term (division by zero) ...
~TaylorModel()
Destructor.
T ** _bndpow
Bounds on the terms for given .
void _set_posord()
Populate array _posord w/ positions of terms of degrees 1,...,nord.
void _reset()
Reset the variable bound arrays.
bool REF_MIDPOINT
Flag indicating whether the reference in Taylor expansion of univariate function is taken as the mid-...
T * _bndmon
Bounds on all the monomial terms 1,...,_nmon for given interval vector .
int ierr()
Inline function returning the error flag.
#define CLOSE_NAMESPACE_ACADO
Error due to inconsistency between the Taylor model and T bounders.
struct TaylorModel::Options options
unsigned int _nord
Model order of the model.
bool PROPAGATE_BNDT
Flag indicating whether interval bound are to be propagated in T arithmetic.
Error during eigenvalue decomposition in range bounder.
bool _modvar
Have any of the model variables been modified?
BOUNDER
Taylor model range bounders.
unsigned int _nmon
Number of monomial terms.
void _cleanup()
Clean up the arrays.
bool SCALE_VARIABLES
Flag indicating whether the variables are to be scaled to [-1,1] internally – this requires proper i...
Error due to invalid initialization of a TaylorVariable.
void _set_binom()
Populate array _binom w/ binomial coefficients.
Error during scaling (degenerate variable range)
unsigned int * _expmon
Variable exponents for monomial terms 1,...,_nmon.
void _set_expmon()
Populate array _expmon w/ exponents for monomial terms 1,...,nmon.
unsigned int _nvar
Number of independent variables.
TaylorVariable< T > * _TV
Taylor variable to speed-up computations and reduce dynamic allocation.
TYPE
Enumeration type for TaylorModel exception handling.
Lin & Stadtherr range bounder.
static void pause()
Pause the program execution and prompt the user.
Error during intersection of two sets of bounds (empty intersection)
unsigned int nord() const
Get order of the TaylorModel.
void _set_bndpow(const unsigned int ix, const T &X, const double scaling)
Populate _bndpow[ix] w/ bounds on the terms .
#define BEGIN_NAMESPACE_ACADO
bool CENTER_REMAINDER
Flag indicating whether the remainder term is to be centered after each operation.
void reset()
Reset the TaylorModel.
Error due to an operation between TaylorVariable linked to different TaylorModel. ...
void _next_expmon(unsigned int *iexp, const unsigned int iord)
Generate exponent configuration for subsequent monomial terms.
bool INTER_WITH_BNDT
Flag indicating whether interval bound for the Taylor model and T arithmetic are to be intersected...
void _set_bndmon()
Populate _bndmon w/ bounds on all possible monomial terms.
unsigned int ** _prodmon
Variable exponents resulting from the product of two monomial terms 1,...,_nmon.
int BOUNDER_TYPE
Flag indicating the Taylor model range bounder.
void _size(const unsigned int nvar, const unsigned int nord)
Set the order (nord) and number of variables (nvar)
C++ class supporting the definition and computation of Taylor models for factorable functions...