ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::mad::Zonotope< T, D, K > Class Template Reference

#include <zonotope.h>

Collaboration diagram for adore::mad::Zonotope< T, D, K >:
Collaboration graph

Public Member Functions

 Zonotope ()
 
void reduce (int n)
 
Zonotope< T, D, K > & operator+= (const Zonotope< T, D, k > &right)
 
Zonotope< T, D, K > & operator+= (const adoreMatrix< T, D, 1 > &offset)
 
Zonotope< T, D, K > & operator*= (const adoreMatrix< T, D, D > &A)
 
Zonotope< T, D, K > & operator*= (const adoreMatrix< T, 0, 0 > &A)
 
Zonotope< T, D, K > & stack_below (const adoreMatrix< T, 0, 0 > &A)
 
const adoreMatrix< T, D, 0 > & getGenerators () const
 

Private Types

typedef adoreMatrix< T, D, 1 > Tvec
 
typedef adoreMatrix< T, D, K *2+1 > Tvecset
 
typedef std::pair< int, T > Tsortpair
 
typedef std::vector< TsortpairTsortset
 

Private Attributes

Tvec center_
 
Tvecset generators_
 
Tsortset sortset_
 
Tvecset sortbuf_
 
Tvec aggvec_
 
int n_
 

Friends

template<typename T , int D, int K>
Zonotope< T, D, K > & operator<< (Zonotope< T, D, K > &left, const adoreMatrix< T, d, 0 > &right)
 
template<typename T , int D, int K>
Zonotope< T, D, K > & operator<< (Zonotope< T, D, K > &left, const Zonotope< T, d, k > &right)
 
template<typename T , int D, int K, int k>
Zonotope< T, D, K > operator+ (Zonotope< T, D, K > left, const Zonotope< T, D, k > &right)
 
template<typename T , int D, int K>
Zonotope< T, D, K > operator+ (Zonotope< T, D, K > z, const adoreMatrix< T, D, 1 > &offset)
 
template<typename T , int D, int K>
Zonotope< T, D, K > operator+ (const adoreMatrix< T, D, 1 > &offset, Zonotope< T, D, K > z)
 
template<typename T , int D, int K>
Zonotope< T, D, K > operator* (const adoreMatrix< T, D, D > &A, Zonotope< T, D, K > z)
 
template<typename T , int D, int K>
Zonotope< T, D, K > operator* (const adoreMatrix< T, 0, 0 > &A, Zonotope< T, D, K > z)
 
template<T , int nx, int nu, int nd, int K, int Km, int Kd>
void linear_step (Zonotope< T, nx+nu, K > &Zxu, const adoreMatrix< T, nx+nu+nd, nx+nu+nd > &AdBdCd, const adoreMatrix< T, nx, nu > &Kfb, const Zonotope< T, nx, Km > &Zm, const Zonotope< T, nd, Kd > &Zd)
 

Detailed Description

template<typename T, int D, int K>
class adore::mad::Zonotope< T, D, K >

A geometric object representing a volume. A zonotope is described by a vector center and a set of vectors called generators. The zonotope is the volume of space given by the Minkowski-sum of all generators starting at center.

Template Parameters
Tis the numeric type, e.g. float or double
Dis the number of dimensions
Kis the maximum number of generators

Member Typedef Documentation

◆ Tsortpair

template<typename T , int D, int K>
typedef std::pair<int,T> adore::mad::Zonotope< T, D, K >::Tsortpair
private

◆ Tsortset

template<typename T , int D, int K>
typedef std::vector<Tsortpair> adore::mad::Zonotope< T, D, K >::Tsortset
private

◆ Tvec

template<typename T , int D, int K>
typedef adoreMatrix<T,D,1> adore::mad::Zonotope< T, D, K >::Tvec
private

◆ Tvecset

template<typename T , int D, int K>
typedef adoreMatrix<T,D,K*2+1> adore::mad::Zonotope< T, D, K >::Tvecset
private

Constructor & Destructor Documentation

◆ Zonotope()

template<typename T , int D, int K>
adore::mad::Zonotope< T, D, K >::Zonotope ( )
inline

empty constructor creates zero generators

Member Function Documentation

◆ getGenerators()

template<typename T , int D, int K>
const adoreMatrix<T,D,0>& adore::mad::Zonotope< T, D, K >::getGenerators ( ) const
inline

return generator matrix subcomponent, which is currently valid

◆ operator*=() [1/2]

template<typename T , int D, int K>
Zonotope<T,D,K>& adore::mad::Zonotope< T, D, K >::operator*= ( const adoreMatrix< T, 0, 0 > &  A)
inline

linear transformation Z*=A, dynamic matrix

◆ operator*=() [2/2]

template<typename T , int D, int K>
Zonotope<T,D,K>& adore::mad::Zonotope< T, D, K >::operator*= ( const adoreMatrix< T, D, D > &  A)
inline

linear transformation Z*=A

◆ operator+=() [1/2]

template<typename T , int D, int K>
Zonotope<T,D,K>& adore::mad::Zonotope< T, D, K >::operator+= ( const adoreMatrix< T, D, 1 > &  offset)
inline

shift the center Z+=offset

◆ operator+=() [2/2]

template<typename T , int D, int K>
Zonotope<T,D,K>& adore::mad::Zonotope< T, D, K >::operator+= ( const Zonotope< T, D, k > &  right)
inline

over-approximative union of two zonotopes

◆ reduce()

template<typename T , int D, int K>
void adore::mad::Zonotope< T, D, K >::reduce ( int  n)
inline

order reduction: over-approximate generators until number of generators is smaller than n

◆ stack_below()

template<typename T , int D, int K>
Zonotope<T,D,K>& adore::mad::Zonotope< T, D, K >::stack_below ( const adoreMatrix< T, 0, 0 > &  A)
inline

operation useful for feedback: stack matrix in lower part of generators

Friends And Related Function Documentation

◆ linear_step

template<typename T , int D, int K>
template<T , int nx, int nu, int nd, int K, int Km, int Kd>
void linear_step ( Zonotope< T, nx+nu, K > &  Zxu,
const adoreMatrix< T, nx+nu+nd, nx+nu+nd > &  AdBdCd,
const adoreMatrix< T, nx, nu > &  Kfb,
const Zonotope< T, nx, Km > &  Zm,
const Zonotope< T, nd, Kd > &  Zd 
)
friend

execute reach step for linear system with Zxu the zonotope containing the reachable set Ad discrete time system matrix Bd discrete time input matrix Cd discrete time disturbance matrix Kfb feedback matrix Zm measurement error set Zd disturbance error set

◆ operator* [1/2]

template<typename T , int D, int K>
template<typename T , int D, int K>
Zonotope<T,D,K> operator* ( const adoreMatrix< T, 0, 0 > &  A,
Zonotope< T, D, K >  z 
)
friend

linear transformation Z1=A*Z2, dynamic matrix

◆ operator* [2/2]

template<typename T , int D, int K>
template<typename T , int D, int K>
Zonotope<T,D,K> operator* ( const adoreMatrix< T, D, D > &  A,
Zonotope< T, D, K >  z 
)
friend

linear transformation Z1=A*Z2

◆ operator+ [1/3]

template<typename T , int D, int K>
template<typename T , int D, int K>
Zonotope<T,D,K> operator+ ( const adoreMatrix< T, D, 1 > &  offset,
Zonotope< T, D, K >  z 
)
friend

shift the center Z1=offset + Z2

◆ operator+ [2/3]

template<typename T , int D, int K>
template<typename T , int D, int K, int k>
Zonotope<T,D,K> operator+ ( Zonotope< T, D, K >  left,
const Zonotope< T, D, k > &  right 
)
friend

over-approximative union of two zonotopes

◆ operator+ [3/3]

template<typename T , int D, int K>
template<typename T , int D, int K>
Zonotope<T,D,K> operator+ ( Zonotope< T, D, K >  z,
const adoreMatrix< T, D, 1 > &  offset 
)
friend

shift the center Z1=Z2+offset

◆ operator<< [1/2]

template<typename T , int D, int K>
template<typename T , int D, int K>
Zonotope<T,D,K>& operator<< ( Zonotope< T, D, K > &  left,
const adoreMatrix< T, d, 0 > &  right 
)
friend

Minkowski addition with a set of generators represented as a matrix: append generators to a zonotope

◆ operator<< [2/2]

template<typename T , int D, int K>
template<typename T , int D, int K>
Zonotope<T,D,K>& operator<< ( Zonotope< T, D, K > &  left,
const Zonotope< T, d, k > &  right 
)
friend

Minkowski addition with another zonotope: center information is not evaluated or changed, only generators of right are added to left generator set

Member Data Documentation

◆ aggvec_

template<typename T , int D, int K>
Tvec adore::mad::Zonotope< T, D, K >::aggvec_
private

◆ center_

template<typename T , int D, int K>
Tvec adore::mad::Zonotope< T, D, K >::center_
private

◆ generators_

template<typename T , int D, int K>
Tvecset adore::mad::Zonotope< T, D, K >::generators_
private

◆ n_

template<typename T , int D, int K>
int adore::mad::Zonotope< T, D, K >::n_
private

◆ sortbuf_

template<typename T , int D, int K>
Tvecset adore::mad::Zonotope< T, D, K >::sortbuf_
private

◆ sortset_

template<typename T , int D, int K>
Tsortset adore::mad::Zonotope< T, D, K >::sortset_
private

The documentation for this class was generated from the following file: