Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "model_test_ginac.hpp"
00019 #include <cmath>
00020 #include <ginac/ginac.h>
00021
00022 #define MU 0.0
00023 #define SIGMA 0.5
00024
00025
00026 CPPUNIT_TEST_SUITE_REGISTRATION( ModelTestGinac );
00027
00028 using namespace BFL;
00029
00030 void
00031 ModelTestGinac::setUp()
00032 {
00033 }
00034
00035 void
00036 ModelTestGinac::tearDown()
00037 {
00038 }
00039
00040 void
00041 ModelTestGinac::testNonLinearAnalyticSystemModelGaussianUncertaintyGinac()
00042 {
00043 GiNaC::symbol x0("x0"), x1("x1"), x2("x2"), x3("x3"), x4("x4"), x5("x5");
00044 GiNaC::symbol u0("u0"), u1("u1");
00045
00046
00047 GiNaC::matrix f_sym(6,1);
00048 f_sym(0,0) = x0*x1+sin(u0);
00049 f_sym(1,0) = u1*x3*x2+u0*x0*x3;
00050 f_sym(2,0) = 2;
00051 f_sym(3,0) = x3*x3;
00052 f_sym(4,0) = x1;
00053 f_sym(5,0) = u0*x1;
00054
00055
00056 vector<GiNaC::symbol> x_sym(6);
00057 ColumnVector x_num(6);
00058 x_num = 3;
00059 x_sym[0] = x0;
00060 x_sym[1] = x1;
00061 x_sym[2] = x2;
00062 x_sym[3] = x3;
00063 x_sym[4] = x4;
00064 x_sym[5] = x5;
00065
00066
00067 vector<GiNaC::symbol> u_sym(2);
00068 ColumnVector u_num(2);
00069 u_num = 3.4;
00070 u_sym[0] = u0;
00071 u_sym[1] = u1;
00072
00073
00074 ColumnVector mu(6); SymmetricMatrix sigma(6);
00075 mu = MU;
00076 for (int index_sigma_rows=0; index_sigma_rows < 6; index_sigma_rows++)
00077 {
00078 for (int index_sigma_cols=0; index_sigma_cols < 6; index_sigma_cols++)
00079 {
00080 if (index_sigma_cols == index_sigma_rows)
00081 sigma(index_sigma_rows+1,index_sigma_cols+1)=SIGMA;
00082 }
00083 }
00084 Gaussian My_Noise(mu,sigma);
00085
00086
00087
00088 NonLinearAnalyticConditionalGaussian_Ginac pdf(f_sym, u_sym, x_sym, My_Noise);
00089 NonLinearAnalyticSystemModelGaussianUncertainty_Ginac a_nonLinSysModel(&pdf);
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115 }
00116
00117 void
00118 ModelTestGinac::testNonLinearAnalyticMeasurementModelGaussianUncertaintyGinac()
00119 {
00120 }
bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Feb 11 2019 03:45:12