25 #define _USE_MATH_DEFINES
36 template<
typename T,
int M>
45 virtual void f(T t,
const adoreMatrix<T, 0, 1>& x_in, adoreMatrix<T, 0, 1>& dx_out)
47 dlib::set_all_elements(dx_out, (T)0);
51 for (
int i = 0; i <= M; i++)dx_out(3 + i) = x_in(3 + i + 1);
68 adoreMatrix<T, 1, 0> time = adore::mad::sequence<T>(0, ds, S);
70 adoreMatrix<T, 3 + M + 2, 1>
x0;
74 for (
int i = 0; i <= M + 1; i++)
x0(3 + i) =
p0(i);
92 ds = acos((T)1 - emax*kappa_max) / (kappa_max*(T)
M_PI);
94 adoreMatrix<T, 1, 0> time = adore::mad::sequence<T>(0, ds, S);
96 adoreMatrix<T, 3 + M + 2, 1>
x0;
100 for (
int i = 0; i <= M + 1; i++)
x0(3 + i) =
p0(i);
110 T kappa_max = (
std::max)((std::abs)(kappa0), (std::abs)(kappa1));
119 ds = acos((T)1 - emax*kappa_max) / (kappa_max*(T)
M_PI);
121 adoreMatrix<T, 1, 0> time = adore::mad::sequence<T>(0, ds, S);
123 adoreMatrix<T, 3 + M + 2, 1>
x0;
129 x0(5) = (kappa1 - kappa0) / S;
140 adoreMatrix<T, M + 2, 1> ic = dlib::subm(
m_linear_data->
getData(), dlib::range(3, M + 4), dlib::range(0, 0));
142 poly_parameter_for_initial_condition<T, M + 1>(ic),
148 virtual adoreMatrix<T, 2, 1>
f(T
x)
const override
150 adoreMatrix<T, 2, 1>
y;
176 adoreMatrix<T, 2, 1> v;
180 virtual void bound(
const T& xmin,
const T& xmax, adoreMatrix<T, 2, 1> & ymin, adoreMatrix<T, 2, 1> & ymax)
override
182 adoreMatrix<T, 3 + M + 1, 1> lymin, lymax;
184 ymin = rowm(lymin, dlib::range(0, 1));
185 ymax = rowm(lymax, dlib::range(0, 1));
192 virtual T
fi(T
x,
int dim)
const override
196 virtual void multiply(adoreMatrix<T, 0, 0> A,
int rowi,
int rowj)
200 virtual void add(adoreMatrix<T, 0, 1> b,
int rowi,
int rowj)
Definition: aodemodel.h:30
Definition: alfunction.h:214
Definition: alfunction.h:287
virtual ALFunction< DT, CT > * clone() override
Definition: llinearpiecewisefunction.h:548
virtual void bound(const DT &xmin, const DT &xmax, CT &ymin, CT &ymax) override
Definition: llinearpiecewisefunction.h:278
virtual ALFunction< DT, T > * dimension(int i) override
Definition: llinearpiecewisefunction.h:470
virtual T fi(DT x, int row) const override
Definition: llinearpiecewisefunction.h:391
virtual DT limitLo() const override
Definition: llinearpiecewisefunction.h:264
virtual void add(adoreMatrix< T, 0, 1 > b, int rowi, int rowj) override
Definition: llinearpiecewisefunction.h:601
virtual void setLimits(DT lo, DT hi) override
Definition: llinearpiecewisefunction.h:270
adoreMatrix< T, n+1, 0 > & getData()
Definition: llinearpiecewisefunction.h:147
virtual DT limitHi() const override
Definition: llinearpiecewisefunction.h:259
virtual void multiply(adoreMatrix< T, 0, 0 > A, int rowi, int rowj) override
Definition: llinearpiecewisefunction.h:589
Definition: lpolynomial.h:140
Definition: lspiralfunction.h:42
virtual void f(T t, const adoreMatrix< T, 0, 1 > &x_in, adoreMatrix< T, 0, 1 > &dx_out)
Definition: lspiralfunction.h:45
diffspiral()
Definition: lspiralfunction.h:44
Definition: lspiralfunction.h:38
LSpiralFunction(T S, T X0, T Y0, T ds, const adoreMatrix< T, 1, M+2 > &p0)
Definition: lspiralfunction.h:66
virtual T limitHi() const override
Definition: lspiralfunction.h:156
LSpiralFunction(LLinearPiecewiseFunctionM< T, 3+M+1 > *linear_data)
Definition: lspiralfunction.h:57
virtual ALFunction< T, T > * create_heading()
Definition: lspiralfunction.h:138
LSpiralFunction(T S, T X0, T Y0, T kappa_max, T emax, const adoreMatrix< T, 1, M+2 > &p0)
Definition: lspiralfunction.h:82
virtual void setLimits(T lo, T hi) override
Definition: lspiralfunction.h:166
virtual void multiply(adoreMatrix< T, 0, 0 > A, int rowi, int rowj)
Definition: lspiralfunction.h:196
virtual ALFunction< T, T > * dimension(int i) override
Definition: lspiralfunction.h:188
virtual T limitLo() const override
Definition: lspiralfunction.h:161
virtual ~LSpiralFunction()
Definition: lspiralfunction.h:58
virtual ALFunction< T, adoreMatrix< T, 2, 1 > > * create_derivative() override
Definition: lspiralfunction.h:174
LSpiralFunction(T S, T X0, T Y0, T PSI0, T kappa0, T kappa1, T emax)
Definition: lspiralfunction.h:107
virtual ALFunction< T, adoreMatrix< T, 2, 1 > > * clone() override
Definition: lspiralfunction.h:170
LSpiralFunction()
Definition: lspiralfunction.h:56
virtual T fi(T x, int dim) const override
Definition: lspiralfunction.h:192
virtual adoreMatrix< T, 2, 1 > f(T x) const override
Definition: lspiralfunction.h:148
virtual void add(adoreMatrix< T, 0, 1 > b, int rowi, int rowj)
Definition: lspiralfunction.h:200
virtual void bound(const T &xmin, const T &xmax, adoreMatrix< T, 2, 1 > &ymin, adoreMatrix< T, 2, 1 > &ymax) override
Definition: lspiralfunction.h:180
LLinearPiecewiseFunctionM< T, 3+M+1 > * m_linear_data
Definition: lspiralfunction.h:40
virtual adoreMatrix< T > solve(AOdeModel< T > *model, const adoreMatrix< double, 1, 0 > &time, const adoreMatrix< double, 0, 1 > &x0) override
Definition: oderk4.h:37
interval< T > cos(interval< T > x)
Definition: intervalarithmetic.h:225
interval< T > sin(interval< T > x)
Definition: intervalarithmetic.h:204
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
x0
Definition: adore_set_goal.py:25
x
Definition: adore_set_goal.py:30
y
Definition: adore_set_goal.py:31
p0
Definition: adore_set_pose.py:32
Definition: areaofeffectconverter.h:20