<?xml version="1.0" encoding="UTF-8"?>
<Document>
 <Model version="4.8" build="4.8.2.10124">
  <Sidops><![CDATA[model 128 184
 description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>0</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>C:\users\wouter\My Documents\studie\ma\mahd\implementation\SCARA\03_motor\MR_dynamics.emx</LibraryPath>
  <TimeStamp>2020-7-17 13:58:25</TimeStamp>
</Description>
</Information>';
 type Mainmodel
 end;
 implementation bg
  submodels
   Base 392 296
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
    <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx</LibraryPath>
  <TimeStamp>2020-7-16 14:21:54</TimeStamp>
<Description>Base</Description>
 </Description>
</Information>';
    type Submodel
     ports
      power out p [6,1];
      signal in Hin [4,4];
      power in p1 [6,1];
      signal out Hout [4,4];
     parameters
      real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
      real m = 0.00455 {kg};
      real COMdim[3,1] = [0.0; 0.0325; 0.0] {m};
      real dim[3,1] = [0.0; 0.065; 0.0] {m};
    end;
    icon bg bottom
     figures
      rectangle 360 224 424 368 color 0 fill 10025880;
      text 'Link' 392 296 color 0;
     terminals
      p 360 256 fixed;
      Hin 360 336 fixed;
      p1 424 256 fixed;
      Hout 424 336 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 416
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power in p1 [6,1];
         power out p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg left
        figures
         text 'MTF' 544 416 color 0 18 bold;
       end;
       implementation eq
variables
 	real onlyRotH[4,4];
code
	//Only rotations with respect to the inertial system matter!
	onlyRotH = H;
	onlyRotH[1,4] = 0;
	onlyRotH[2,4] = 0;
	onlyRotH[3,4] = 0;
						
	p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
	p1.f = Adjoint(onlyRotH) * p2.f;
implementation_end;
      AdHij 864 304
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power out p1 [6,1];
         power in p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg top
        figures
         text 'MTF' 864 304 color 0 18 bold;
       end;
       implementation eq
equations
	//Only rotations with respect to the inertial system matter!
						
	p1.e = transpose(Adjoint(H)) * p2.e;
	p2.f = Adjoint(H) * p1.f;
implementation_end;
      AdHik 544 248
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\TF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:4:2</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type TF
        ports
         power in p1 [6,1];
         power out p2 [6,1];
        restrictions
         causality constraint not_equal p1 p2;
        parameters
         real COMdim[3,1] = [0.0; 0.0325; 0.0];
       end;
       icon bg left
        figures
         text 'TF' 544 248 color 0 18 bold;
       end;
       implementation eq
//Frame in joint connected to port 1
//Principal inertial frame connected in port 2
variables
	real d[3]; //distance between frames
	real R[3,3]; //rotation between frames

	real H[4,4]; //homogeneous matrix
	real AdH[6,6]; //Adjoint of homogeneous matrix
equations
	d = COMdim; //distance of 1 in z direction of frames
	R = eye(3); //no rotation

	H = homogeneous(R,d);
	AdH = Adjoint(H);

	p1.f = AdH * p2.f; 
	p2.e = transpose(AdH) * p1.e;
implementation_end;
      AdHik1 544 360
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\TF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:4:2</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type TF
        ports
         power in p1 [6,1];
         power out p2 [6,1];
        restrictions
         causality constraint not_equal p1 p2;
        parameters
         real COMdim[3,1] = [0.0; 0.0325; 0.0];
       end;
       icon bg left
        figures
         text 'TF' 544 360 color 0 18 bold;
       end;
       implementation eq
//Frame in joint connected to port 1
//Principal inertial frame connected in port 2
variables
	real d[3]; //distance between frames
	real R[3,3]; //rotation between frames

	real H[4,4]; //homogeneous matrix
	real AdH[6,6]; //Adjoint of homogeneous matrix
equations
	d = COMdim; //distance of 1 in z direction of frames
	R = eye(3); //no rotation

	H = homogeneous(R,d);
	AdH = Adjoint(H);

	p1.f = AdH * p2.f; 
	p2.e = transpose(AdH) * p1.e;
implementation_end;
      EJS 608 184
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
 <TimeStamp>2007-10-31 11:43:6</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MGY
        ports
         power in p1 [6,1];
        parameters
         real I[3,1] = [20.0; 20.0; 20.0];
         real m = 20.0;
       end;
       icon bg top
        figures
         text 'MGY' 608 184 color 0 18 bold;
       end;
       implementation eq
//EJS / Gyroscopic effects
variables
	real II[6,6]; //Inertial tensor
	real Q[6,6];
	real QI[6,6];
	real v[3];
	real omega[3];
equations
	II = [	I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];
	v[1:3] = p1.f[4:6];
	omega[1:3] = p1.f[1:3];

	Q[1:3,1:3] = -skew(omega);
	Q[1:3,4:6] = -skew(v);
	Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros
	Q[4:6,4:6] = -skew(omega);
	QI = Q*II;

	p1.e = QI*p1.f;implementation_end;
      Gravity 656 416
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\Se.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:26</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
        parameters
         real m = 20.0;
       end;
       icon bg bottom
        figures
         text 'Se' 656 416 color 0 18 bold;
       end;
       implementation eq
variables
	real effort[6];
equations
	effort = [0;0;0;0;0;-9.8*m];
	p.e = effort;
implementation_end;
      Hij 864 496
       description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>H.emx</LibraryPath>
  <TimeStamp>2010-9-21 15:03:50</TimeStamp>
<AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Gain
        ports
         signal in input [4,4];
         signal out output [4,4];
         signal out Hab [4,4];
        parameters
         real dim[3,1] = [0.024; 0.0; 0.096];
       end;
       icon bg bottom
        figures
         rectangle 848.1 480 879.9 512 color 0 fill 15132390;
         text 'H' 864 496 color 16711680 16 bold;
       end;
       implementation eq
parameters
	real baseoffset[3]=[0.143;  0;  0.046]; //coordinates of joint_1
equations
	Hab = homogeneous(eye(3),dim+baseoffset);
	output = input * Hab;
    implementation_end;
      InertialTensor 480 184
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\I.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:2:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type I
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
        parameters
         real m = 1.0;
         real I[3,1] = [20.0; 20.0; 20.0];
       end;
       icon bg top
        figures
         text 'I' 480 184 color 0 18 bold;
       end;
       implementation eq
variables
	real II[6,6]; //Inertial tensor
equations
	II = [I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];

    state = int(p.e); //state = generalized momentum
    p.f = inverse(II)*state;
implementation_end;
      plug Hout 984 496;
      plug p1 984 304;
      plug Hin 472 496;
      plug p 472 304;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 540.8 492.8 547.2 499.2 color -1 fill 0;
         ellipse 539.7 491.7 548.3 500.3 color -1;
        terminals
         input 544 496 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Ta00 600 416
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg bottom
        figures
         text '1' 600 416 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Ta0j 544 304
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg bottom
        figures
         text '1' 544 304 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Ta0k 544 184
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg top
        figures
         text '1' 544 184 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
     end;
     connections
      AdHi0\p2 => AdHik1\p1;
      AdHij\p1 => Ta0j\p;
      AdHik\p2 => Ta0k\p;
      AdHik1\p2 => Ta0j\p;
      Gravity\p => Ta00\p;
      Hij\Hab -> AdHij\H;
      Hij\output -> Hout;
      Hin -> Splitter1\input;
      p <= Ta0j\p;
      p1 => AdHij\p2;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hij\input;
      Ta00\p => AdHi0\p1;
      Ta0j\p => AdHik\p1;
      Ta0k\p => EJS\p1;
      Ta0k\p => InertialTensor\p;
     end;
     parameterrelations
InertialTensor\I = I;
InterialTensor\m = m;
EJS\I = I;
EJS\m = m;
AdHik\COMdim = COMdim;
AdHik1\COMdim = COMdim;
Hij\dim = dim;
Gravity\m=m;parameterrelations_end;
     figures
      text 'b = current link (body)
a = previous link (body)
i = Body fixed frame, fixed in joint with previous link
j = Body fixed frame, fixed in joint with next link
k = Body fixed frame, principal inertial frame
0 = inertial system
 ' 288 280 color 0;
    implementation_end;
   Base1 584 296
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
    <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx</LibraryPath>
  <TimeStamp>2020-7-16 14:21:54</TimeStamp>
<Description>Base</Description>
 </Description>
</Information>';
    type Submodel
     ports
      power out p [6,1];
      signal in Hin [4,4];
      power in p1 [6,1];
      signal out Hout [4,4];
     parameters
      real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
      real m = 0.00455 {kg};
      real COMdim[3,1] = [0.0; 0.025; 0.0] {m};
      real dim[3,1] = [0.0; 0.05; 0.0] {m};
    end;
    icon bg bottom
     figures
      rectangle 552 224 616 368 color 0 fill 10025880;
      text 'Link' 584 296 color 0;
     terminals
      p 552 256 fixed;
      Hin 552 336 fixed;
      p1 616 256 fixed;
      Hout 616 336 fixed;
    end;
    implementation bg
     submodels
      AdHi0 664 416
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power in p1 [6,1];
         power out p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg left
        figures
         text 'MTF' 664 416 color 0 18 bold;
       end;
       implementation eq
variables
 	real onlyRotH[4,4];
code
	//Only rotations with respect to the inertial system matter!
	onlyRotH = H;
	onlyRotH[1,4] = 0;
	onlyRotH[2,4] = 0;
	onlyRotH[3,4] = 0;
						
	p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
	p1.f = Adjoint(onlyRotH) * p2.f;
implementation_end;
      AdHij 816 304
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power out p1 [6,1];
         power in p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg top
        figures
         text 'MTF' 816 304 color 0 18 bold;
       end;
       implementation eq
equations
	//Only rotations with respect to the inertial system matter!
						
	p1.e = transpose(Adjoint(H)) * p2.e;
	p2.f = Adjoint(H) * p1.f;
implementation_end;
      AdHik 664 248
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\TF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:4:2</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type TF
        ports
         power in p1 [6,1];
         power out p2 [6,1];
        restrictions
         causality constraint not_equal p1 p2;
        parameters
         real COMdim[3,1] = [0.01489; 0.00213; 0.00213];
       end;
       icon bg left
        figures
         text 'TF' 664 248 color 0 18 bold;
       end;
       implementation eq
//Frame in joint connected to port 1
//Principal inertial frame connected in port 2
variables
	real d[3]; //distance between frames
	real R[3,3]; //rotation between frames

	real H[4,4]; //homogeneous matrix
	real AdH[6,6]; //Adjoint of homogeneous matrix
equations
	d = COMdim; //distance of 1 in z direction of frames
	R = eye(3); //no rotation

	H = homogeneous(R,d);
	AdH = Adjoint(H);

	p1.f = AdH * p2.f; 
	p2.e = transpose(AdH) * p1.e;
implementation_end;
      AdHik1 664 360
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\TF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:4:2</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type TF
        ports
         power out p1 [6,1];
         power in p2 [6,1];
        restrictions
         causality constraint not_equal p1 p2;
        parameters
         real COMdim[3,1] = [0.01489; 0.00213; 0.00213];
       end;
       icon bg left
        figures
         text 'TF' 664 360 color 0 18 bold;
       end;
       implementation eq
//Principal inertial frame connected in port 2
variables
	real d[3]; //distance between frames
	real R[3,3]; //rotation between frames

	real H[4,4]; //homogeneous matrix
	real AdH[6,6]; //Adjoint of homogeneous matrix
equations
	d = COMdim; //distance of 1 in z direction of frames
	R = eye(3); //no rotation

	H = homogeneous(R,d);
	AdH = Adjoint(H);

	p1.f = AdH * p2.f; 
	p2.e = transpose(AdH) * p1.e;
implementation_end;
      EJS 728 184
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
 <TimeStamp>2007-10-31 11:43:6</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MGY
        ports
         power in p1 [6,1];
        parameters
         real I[3,1] = [20.0; 20.0; 20.0];
         real m = 20.0;
       end;
       icon bg top
        figures
         text 'MGY' 728 184 color 0 18 bold;
       end;
       implementation eq
//EJS / Gyroscopic effects
variables
	real II[6,6]; //Inertial tensor
	real Q[6,6];
	real QI[6,6];
	real v[3];
	real omega[3];
equations
	II = [	I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];
	v[1:3] = p1.f[4:6];
	omega[1:3] = p1.f[1:3];

	Q[1:3,1:3] = -skew(omega);
	Q[1:3,4:6] = -skew(v);
	Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros
	Q[4:6,4:6] = -skew(omega);
	QI = Q*II;

	p1.e = QI*p1.f;implementation_end;
      Gravity 776 416
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\Se.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:26</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
        parameters
         real m = 20.0;
       end;
       icon bg bottom
        figures
         text 'Se' 776 416 color 0 18 bold;
       end;
       implementation eq
variables
	real effort[6];
equations
	effort = [0;0;0;0;0;-9.8*m];
	p.e = effort;
implementation_end;
      Hij 816 496
       description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>H.emx</LibraryPath>
  <TimeStamp>2010-9-21 15:03:50</TimeStamp>
<AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Gain
        ports
         signal in input [4,4];
         signal out output [4,4];
         signal out Hab [4,4];
        parameters
         real dim[3,1] = [0.024; 0.0; 0.096];
       end;
       icon bg bottom
        figures
         rectangle 800.1 480 831.9 512 color 0 fill 15132390;
         text 'H' 816 496 color 16711680 16 bold;
       end;
       implementation eq
parameters
	real baseoffset[3]=[0.143;  0;  0.046]; //coordinates of joint_1 
equations
	Hab = homogeneous(eye(3),dim+baseoffset);
	output = input * Hab;
    implementation_end;
      InertialTensor 600 184
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\I.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:2:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type I
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
        parameters
         real m = 1.0;
         real I[3,1] = [20.0; 20.0; 20.0];
       end;
       icon bg top
        figures
         text 'I' 600 184 color 0 18 bold;
       end;
       implementation eq
variables
	real II[6,6]; //Inertial tensor
equations
	II = [I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];

    state = int(p.e); //state = generalized momentum
    p.f = inverse(II)*state;
implementation_end;
      plug Hout 896 496;
      plug p1 904 304;
      plug Hin 592 496;
      plug p 592 304;
      Splitter1 664 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 660.8 492.8 667.2 499.2 color -1 fill 0;
         ellipse 659.7 491.7 668.3 500.3 color -1;
        terminals
         input 664 496 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Ta00 720 416
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg bottom
        figures
         text '1' 720 416 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Ta0j 664 304
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg bottom
        figures
         text '1' 664 304 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Ta0k 664 184
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg top
        figures
         text '1' 664 184 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
     end;
     connections
      AdHi0\p2 => AdHik1\p2;
      AdHik\p2 => Ta0k\p;
      Gravity\p => Ta00\p;
      Hij\Hab -> AdHij\H;
      Hij\output -> Hout;
      Hin -> Splitter1\input;
      p <= Ta0j\p;
      p1 => AdHij\p2;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hij\input;
      Ta00\p => AdHi0\p1;
      Ta0j\p <= AdHij\p1;
      Ta0j\p <= AdHik1\p1;
      Ta0j\p => AdHik\p1;
      Ta0k\p => EJS\p1;
      Ta0k\p => InertialTensor\p;
     end;
     parameterrelations
InertialTensor\I = I;
InterialTensor\m = m;
EJS\I = I;
EJS\m = m;
AdHik\COMdim = COMdim;
AdHik1\COMdim = COMdim;
Hij\dim = dim;
Gravity\m=m;parameterrelations_end;
     figures
      text 'b = current link (body)
a = previous link (body)
i = Body fixed frame, fixed in joint with previous link
j = Body fixed frame, fixed in joint with next link
k = Body fixed frame, principal inertial frame
0 = inertial system
 ' 288 280 color 0;
    implementation_end;
   Base2 520 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
    <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx</LibraryPath>
  <TimeStamp>2020-7-16 14:21:54</TimeStamp>
<Description>Base</Description>
 </Description>
</Information>';
    type Submodel
     ports
      power out p [6,1];
      signal in Hin [4,4];
      power in p1 [6,1];
      signal out Hout [4,4];
     parameters
      real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
      real m = 0.00455 {kg};
      real COMdim[3,1] = [0.0; 0.0325; 0.0] {m};
      real dim[3,1] = [0.0; 0.065; 0.0] {m};
    end;
    icon bg bottom
     figures
      rectangle 488 472 552 552 color 0 fill 255;
      text 'COM' 520 496 color 0;
     terminals
      p 488 488 fixed;
      Hin 488 536 fixed;
      p1 552 488 fixed;
      Hout 552 536 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 400
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power in p1 [6,1];
         power out p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg left
        figures
         text 'MTF' 544 400 color 0 18 bold;
       end;
       implementation eq
variables
 	real onlyRotH[4,4];
code
	//Only rotations with respect to the inertial system matter!
	onlyRotH = H;
	onlyRotH[1,4] = 0;
	onlyRotH[2,4] = 0;
	onlyRotH[3,4] = 0;
						
	p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
	p1.f = Adjoint(onlyRotH) * p2.f;
implementation_end;
      EJS 616 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
 <TimeStamp>2007-10-31 11:43:6</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MGY
        ports
         power in p1 [6,1];
        parameters
         real I[3,1] = [20.0; 20.0; 20.0];
         real m = 20.0;
       end;
       icon bg top
        figures
         text 'MGY' 616 256 color 0 18 bold;
       end;
       implementation eq
//EJS / Gyroscopic effects
variables
	real II[6,6]; //Inertial tensor
	real Q[6,6];
	real QI[6,6];
	real v[3];
	real omega[3];
equations
	II = [	I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];
	v[1:3] = p1.f[4:6];
	omega[1:3] = p1.f[1:3];

	Q[1:3,1:3] = -skew(omega);
	Q[1:3,4:6] = -skew(v);
	Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros
	Q[4:6,4:6] = -skew(omega);
	QI = Q*II;

	p1.e = QI*p1.f;implementation_end;
      Gravity 616 400
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\Se.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:26</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
        parameters
         real m = 20.0;
       end;
       icon bg bottom
        figures
         text 'Se' 616 400 color 0 18 bold;
       end;
       implementation eq
variables
	real effort[6];
equations
	effort = [0;0;0;0;0;-g_n*m];
	p.e = effort;
implementation_end;
      InertialTensor 480 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\I.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:2:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type I
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
        parameters
         real m = 1.0;
         real I[3,1] = [20.0; 20.0; 20.0];
       end;
       icon bg top
        figures
         text 'I' 480 256 color 0 18 bold;
       end;
       implementation eq
variables
	real II[6,6]; //Inertial tensor
equations
	II = [I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];

    state = int(p.e); //state = generalized momentum
    p.f = inverse(II)*state;
implementation_end;
      plug Hin 472 496;
      plug p1 752 304;
      plug Hout 768 496;
      plug p 472 304;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 540.8 492.8 547.2 499.2 color -1 fill 0;
         ellipse 539.7 491.7 548.3 500.3 color -1;
        terminals
         input 544 496 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Ta0j 544 304
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg bottom
        figures
         text '1' 544 304 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Ta0k 544 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg top
        figures
         text '1' 544 256 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
     end;
     connections
      AdHi0\p2 => Ta0j\p;
      Gravity\p => AdHi0\p1;
      Hin -> Splitter1\input;
      p <= Ta0j\p;
      p1 => Ta0j\p;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hout;
      Ta0j\p => Ta0k\p;
      Ta0k\p => EJS\p1;
      Ta0k\p => InertialTensor\p;
     end;
     parameterrelations
InertialTensor\I = I;
InterialTensor\m = m;
EJS\I = I;
EJS\m = m;
AdHik\COMdim = COMdim;
AdHik1\COMdim = COMdim;
Hij\dim = dim;
Gravity\m=m;parameterrelations_end;
     figures
      text 'b = current link (body)
a = previous link (body)
i = Body fixed frame, fixed in joint with previous link
j = Body fixed frame, fixed in joint with next link
k = Body fixed frame, principal inertial frame
0 = inertial system
 ' 288 280 color 0;
    implementation_end;
   Base3 1024 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
    <LibraryPath>Bond Graph\MR\center_of_mass.emx</LibraryPath>
  <TimeStamp>2020-7-17 13:52:18</TimeStamp>
<Description>Base</Description>
 </Description>
</Information>';
    type Submodel
     ports
      power out p [6,1];
      signal in Hin [4,4];
      power in p1 [6,1];
      signal out Hout [4,4];
     parameters
      real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
      real m = 0.00455 {kg};
      real COMdim[3,1] = [0.0; 0.0325; 0.0] {m};
      real dim[3,1] = [0.0; 0.065; 0.0] {m};
    end;
    icon bg bottom
     figures
      rectangle 992 472 1056 552 color 0 fill 255;
      text 'COM' 1024 496 color 0;
     terminals
      p 992 488 fixed;
      Hin 992 536 fixed;
      p1 1056 488 fixed;
      Hout 1056 536 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 400
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power in p1 [6,1];
         power out p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg left
        figures
         text 'MTF' 544 400 color 0 18 bold;
       end;
       implementation eq
variables
 	real onlyRotH[4,4];
code
	//Only rotations with respect to the inertial system matter!
	onlyRotH = H;
	onlyRotH[1,4] = 0;
	onlyRotH[2,4] = 0;
	onlyRotH[3,4] = 0;
						
	p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
	p1.f = Adjoint(onlyRotH) * p2.f;
implementation_end;
      EJS 616 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
 <TimeStamp>2007-10-31 11:43:6</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MGY
        ports
         power in p1 [6,1];
        parameters
         real I[3,1] = [20.0; 20.0; 20.0];
         real m = 20.0;
       end;
       icon bg top
        figures
         text 'MGY' 616 256 color 0 18 bold;
       end;
       implementation eq
//EJS / Gyroscopic effects
variables
	real II[6,6]; //Inertial tensor
	real Q[6,6];
	real QI[6,6];
	real Ia[6];
initialequations
	Ia[1:3] = I;
	Ia[4:6] = m;
	II = diag(Ia);
equations
	Q = transpose(adjoint(p1.f));
	QI = Q*II;
	p1.e = QI*p1.f;implementation_end;
      Gravity 616 400
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\Se.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:26</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
        parameters
         real m = 20.0;
       end;
       icon bg bottom
        figures
         text 'Se' 616 400 color 0 18 bold;
       end;
       implementation eq
variables
	real effort[6];
equations
	effort = [0;0;0;0;0;-g_n*m];
	p.e = effort;
implementation_end;
      InertialTensor 480 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\I.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:2:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type I
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
        parameters
         real m = 1.0;
         real I[3,1] = [20.0; 20.0; 20.0];
       end;
       icon bg top
        figures
         text 'I' 480 256 color 0 18 bold;
       end;
       implementation eq
variables
	real II[6,6]; //Inertial tensor
equations
	II = [I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];

    state = int(p.e); //state = generalized momentum
    p.f = inverse(II)*state;
implementation_end;
      plug Hin 472 496;
      plug p1 752 304;
      plug Hout 768 496;
      plug p 472 304;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 540.8 492.8 547.2 499.2 color -1 fill 0;
         ellipse 539.7 491.7 548.3 500.3 color -1;
        terminals
         input 544 496 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Ta0j 544 304
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg bottom
        figures
         text '1' 544 304 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Ta0k 544 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg top
        figures
         text '1' 544 256 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
     end;
     connections
      AdHi0\p2 => Ta0j\p;
      Gravity\p => AdHi0\p1;
      Hin -> Splitter1\input;
      p <= Ta0j\p;
      p1 => Ta0j\p;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hout;
      Ta0j\p => Ta0k\p;
      Ta0k\p => EJS\p1;
      Ta0k\p => InertialTensor\p;
     end;
     parameterrelations
InertialTensor\I = I;
InterialTensor\m = m;
EJS\I = I;
EJS\m = m;
AdHik\COMdim = COMdim;
AdHik1\COMdim = COMdim;
Hij\dim = dim;
Gravity\m=m;parameterrelations_end;
     figures
      text 'b = current link (body)
a = previous link (body)
i = Body fixed frame, fixed in joint with previous link
j = Body fixed frame, fixed in joint with next link
k = Body fixed frame, principal inertial frame
0 = inertial system
 ' 288 280 color 0;
    implementation_end;
   Base4 1432 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
    <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link.emx</LibraryPath>
  <TimeStamp>2020-7-16 14:21:54</TimeStamp>
<Description>Base</Description>
 </Description>
</Information>';
    type Submodel
     ports
      power out p [6,1];
      signal in Hin [4,4];
      power in p1 [6,1];
      signal out Hout [4,4];
     parameters
      real I[3,1] = [1.6399999999999998e-6; 4.7e-8; 1.61e-6] {N.m.s};
      real m = 0.00455 {kg};
      real COMdim[3,1] = [0.0; 0.0325; 0.0] {m};
      real dim[3,1] = [0.0; 0.065; 0.0] {m};
    end;
    icon bg bottom
     figures
      rectangle 1400 472 1464 552 color 0 fill 255;
      text 'COM' 1432 496 color 0;
     terminals
      p 1400 488 fixed;
      Hin 1400 536 fixed;
      p1 1464 488 fixed;
      Hout 1464 536 fixed;
    end;
    implementation bg
     submodels
      AdHi0 544 400
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power in p1 [6,1];
         power out p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg left
        figures
         text 'MTF' 544 400 color 0 18 bold;
       end;
       implementation eq
variables
 	real onlyRotH[4,4];
code
	//Only rotations with respect to the inertial system matter!
	onlyRotH = H;
	onlyRotH[1,4] = 0;
	onlyRotH[2,4] = 0;
	onlyRotH[3,4] = 0;
						
	p2.e = transpose(Adjoint(onlyRotH)) * p1.e;
	p1.f = Adjoint(onlyRotH) * p2.f;
implementation_end;
      EJS 616 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MGY.emx</LibraryPath>
 <TimeStamp>2007-10-31 11:43:6</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MGY
        ports
         power in p1 [6,1];
        parameters
         real I[3,1] = [20.0; 20.0; 20.0];
         real m = 20.0;
       end;
       icon bg top
        figures
         text 'MGY' 616 256 color 0 18 bold;
       end;
       implementation eq
//EJS / Gyroscopic effects
variables
	real II[6,6]; //Inertial tensor
	real Q[6,6];
	real QI[6,6];
	real v[3];
	real omega[3];
equations
	II = [	I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];
	v[1:3] = p1.f[4:6];
	omega[1:3] = p1.f[1:3];

	Q[1:3,1:3] = -skew(omega);
	Q[1:3,4:6] = -skew(v);
	Q[4:6,1:3] = [0,0,0;0,0,0;0,0,0];//matrix filled with zeros
	Q[4:6,4:6] = -skew(omega);
	QI = Q*II;

	p1.e = QI*p1.f;implementation_end;
      Gravity 616 400
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\Se.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:26</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Se
        ports
         power out p [6,1];
        restrictions
         causality fixed out p;
        parameters
         real m = 20.0;
       end;
       icon bg bottom
        figures
         text 'Se' 616 400 color 0 18 bold;
       end;
       implementation eq
variables
	real effort[6];
equations
	effort = [0;0;0;0;0;-g_n*m];
	p.e = effort;
implementation_end;
      InertialTensor 480 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\I.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:2:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type I
        ports
         power in p [6,1];
         signal out state [6,1];
        restrictions
         causality preferred in p;
        parameters
         real m = 1.0;
         real I[3,1] = [20.0; 20.0; 20.0];
       end;
       icon bg top
        figures
         text 'I' 480 256 color 0 18 bold;
       end;
       implementation eq
variables
	real II[6,6]; //Inertial tensor
equations
	II = [I[1],0,	0,	0,	0,	0;
			0,	I[2],0,	0,	0,	0;
			0,	0,	I[3],0,	0,	0;
			0,	0,	0,	m,	0,	0;
			0,	0,	0,	0,	m,	0;
			0,	0,	0,	0,	0,	m];

    state = int(p.e); //state = generalized momentum
    p.f = inverse(II)*state;
implementation_end;
      plug Hin 472 496;
      plug p1 752 304;
      plug Hout 768 496;
      plug p 472 304;
      Splitter1 544 496
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 540.8 492.8 547.2 499.2 color -1 fill 0;
         ellipse 539.7 491.7 548.3 500.3 color -1;
        terminals
         input 544 496 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Ta0j 544 304
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg bottom
        figures
         text '1' 544 304 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Ta0k 544 256
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <Description></Description>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg top
        figures
         text '1' 544 256 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
     end;
     connections
      AdHi0\p2 => Ta0j\p;
      Gravity\p => AdHi0\p1;
      Hin -> Splitter1\input;
      p <= Ta0j\p;
      p1 => Ta0j\p;
      Splitter1\output -> AdHi0\H;
      Splitter1\output -> Hout;
      Ta0j\p => Ta0k\p;
      Ta0k\p => EJS\p1;
      Ta0k\p => InertialTensor\p;
     end;
     parameterrelations
InertialTensor\I = I;
InterialTensor\m = m;
EJS\I = I;
EJS\m = m;
AdHik\COMdim = COMdim;
AdHik1\COMdim = COMdim;
Hij\dim = dim;
Gravity\m=m;parameterrelations_end;
     figures
      text 'b = current link (body)
a = previous link (body)
i = Body fixed frame, fixed in joint with previous link
j = Body fixed frame, fixed in joint with next link
k = Body fixed frame, principal inertial frame
0 = inertial system
 ' 288 280 color 0;
    implementation_end;
   Constant 168 336
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Sources\Constant.emx</LibraryPath>
 <TimeStamp>2007-10-19 14:48:44</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
    type Constant
     ports
      signal out output [4,4];
    end;
    icon bg bottom
     figures
      rectangle 152.1 320 183.9 352 color 0 fill 15132390;
      line 156.9 331.6 178.9 331.6 color 16711680 width 2;
      line 154.2 342.7 179.9 342.7 color 0;
      line 156.5 326.7 156.5 345 color 0;
    end;
    implementation eq
equations
	output = eye(4);
     implementation_end;
   Constant1 296 48
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Sources\Constant.emx</LibraryPath>
  <TimeStamp>2007-10-19 14:48:44</TimeStamp>
</Description>';
    type Constant
     ports
      signal out output;
    end;
    icon bg bottom
     figures
      rectangle 280.1 32 311.9 64 color 0 fill 15132390;
      line 284.9 43.6 306.9 43.6 color 16711680 width 2;
      line 282.2 54.7 307.9 54.7 color 0;
      line 284.5 38.7 284.5 57 color 0;
    end;
    implementation eq
parameters
	real C = 1.0;		// output value
equations
	output = C;
     implementation_end;
   Joint 1224.1 510
    description '<Information>
 <Description>
    <Version>4.8</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
  <AllowLibraryUpdate>True</AllowLibraryUpdate>
    <LibraryPath>Bond Graph\MR\joint-v2.emx</LibraryPath>
  <TimeStamp>2020-7-17 13:36:30</TimeStamp>
</Description>
</Information>';
    type 'Submodel-rotz'
     ports
      power out p [6,1];
      power in p1;
      power in p2 [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
     parameters
      real Rendstop = 1000.0;
      real Cendstop = 1.0e-4;
      real InitialPos = -2.9496;
      real MinEndstopPos = -2.95;
      real MaxEndstopPos = 2.95;
      real Rconstraint = 1000.0;
      real Cconstraint = 1.0e-4;
      real Rjoint = 0.1;
    end;
    icon bg bottom
     figures
      rectangle 1192.2 472 1256 548 color 0 fill 14745599;
      text 'Joint' 1224 504 color 0;
     terminals
      p 1192 488 fixed;
      p1 1224 472 fixed;
      p2 1256 488 fixed;
      Hin 1192 536 fixed;
      Hout 1256 536 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power out p1 [6,1];
         power in p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg bottom
        figures
         text 'MTF' 424 424 color 0 18 bold;
       end;
       implementation eq
equations					
	p2.e = transpose(Adjoint(H)) * p1.e;
	p1.f = Adjoint(H) * p2.f;implementation_end;
      EndstopMax 352 216
       description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <LibraryPath>EndstopMax.emx</LibraryPath>
  <TimeStamp>2011-1-18 16:54:54</TimeStamp>
</Description>';
       type Submodel
        ports
         power out p2;
         signal boolean out collision;
        parameters
         real Rendstop = 1000.0;
         real Cendstop = 1.0e-4;
         real InitialPos = -2.9496;
         real EndstopPos = 2.95;
       end;
       icon bg bottom
        figures
         rectangle 303 193 401 239 color 0 fill 14013909;
         text 'EndstopMax' 353 215 color 0 16;
       end;
       implementation bg
        submodels
         Cendstop 704 144
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\C.emx</LibraryPath>
 <TimeStamp>2007-10-31 10:43:59</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
           parameters
            real Cendstop = 1.0e-4;
          end;
          icon bg right
           figures
            text 'C' 704 144 color 0 18 bold;
          end;
          implementation eq
equations
    state = int(p.f);
    p.e = state / Cendstop;
implementation_end;
         Collision 704 216
          description '<Description>
 <Version>No Version Info</Version>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type X0e
           ports
            power in p1;
            power out p2;
            power out p12;
            signal boolean out Collision;
           restrictions
            causality fixed out p2;
            causality fixed out p1;
            causality fixed in p12;
           parameters
            real InitialPos = -2.9496;
            real EndstopPos = 2.95;
          end;
          icon bg
           figures
            text 'X0e' 704 216 color 0 18 bold;
          end;
          implementation bg
           submodels
            Condition1 224.9 231.5
             type Condition
              ports
               signal in dx;
               signal boolean out contact;
             end;
             icon bg
              figures
               rectangle 197.2 215 252.6 248 color 0 fill 15132390;
               text 'Condition' 224 231.5 color 0;
              terminals
               dx 224 248 fixed;
               contact 224 215 fixed;
             end;
             implementation eq
parameters
	real global epsilon;
variables
	boolean bounce;
equations
	contact = if dx - epsilon  < 0 then true else false end;
	bounce = event (dx - epsilon);implementation_end;
            plug p1 96 176;
            plug p2 352 176;
            plug p12 224 64;
            plug Collision 408 192;
            Splitter1 224 200
             description '<Description><Version>4.0</Version>
   <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  <TimeStamp>2007-10-31 11:27:48</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot boolean duplicatable out output [1];
               signal knot boolean in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
               ellipse 219.7 195.7 228.3 204.3 color -1;
              terminals
               input 224 200 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            v1 160 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 160 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v12 224 120
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg right
              figures
               text '1' 224 120 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v2 296 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 296 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            X0 224 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type X0
              ports
               mechanical in p1;
               mechanical out p2;
               mechanical out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg
              figures
               text 'X0' 224 176 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
            x1 160 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = 2.95;
             end;
             icon bg left
              figures
               rectangle 145 289 175 319 color 0 fill 15132390;
               text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
            x12 224 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot PlusMinus
              ports
               signal knot duplicatable in plus [1];
               signal knot duplicatable in minus [1];
               signal knot out output [1];
             end;
             icon bg ellipse bottom
              figures
               ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            x2 296 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -2.9496;
             end;
             icon bg right
              figures
               rectangle 281 289 311 319 color 0 fill 15132390;
               text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
           end;
           connections
            Condition1\contact -> Splitter1\input;
            p1 => v1\p;
            Splitter1\output -> Collision;
            Splitter1\output -> X0\condition;
            v1\flow -> x1\input;
            v1\p => X0\p1;
            v12\p => p12;
            v2\flow -> x2\input;
            v2\p => p2;
            X0\p12 => v12\p;
            X0\p2 => v2\p;
            x1\output -> x12\plus;
            x12\output -> Condition1\dx;
            x2\output -> x12\minus;
           end;
           parameterrelations
x1\Initial = EndstopPos;
x2\Initial = InitialPos;parameterrelations_end;
          implementation_end;
         plug p2 648 216;
         plug collision 800 216;
         OneJunction5 704 176
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
          knot OneJunction
           ports
            mechanical knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 704 176 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         Rendstop 736 176
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type R
           ports
            power in p;
           parameters
            real Rendstop = 1000.0;
          end;
          icon bg bottom
           figures
            text 'R' 736 176 color 0 18 bold;
          end;
          implementation eq
equations					
	p.e = Rendstop * p.f;
implementation_end;
         Sf1 704 264
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:3:35</TimeStamp>
</Description>';
          type Sf
           ports
            power out p;
           restrictions
            causality fixed in p;
          end;
          icon bg bottom
           figures
            text 'Sf' 704 264 color 0 18 bold;
          end;
          implementation eq
parameters
	real flow = 0.0;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
        end;
        connections
         Collision\Collision -> collision;
         Collision\p12 => OneJunction5\p;
         Collision\p2 => p2;
         OneJunction5\p => Cendstop\p;
         OneJunction5\p => Rendstop\p;
         Sf1\p => Collision\p1;
        end;
        parameterrelations
Collision\InitialPos = InitialPos;
Collision\EndstopPos = EndstopPos;
Rendstop\Rendstop = Rendstop;
Cendstop\Cendstop = Cendstop;parameterrelations_end;
       implementation_end;
      EndstopMin 352 136
       description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <LibraryPath>EndstopMin.emx</LibraryPath>
  <TimeStamp>2011-1-18 16:54:44</TimeStamp>
</Description>';
       type Submodel
        ports
         power out p2;
         signal boolean out collision;
        parameters
         real Cendstop = 1.0e-4;
         real Rendstop = 1000.0;
         real InitialPos = -2.9496;
         real EndstopPos = -2.95;
       end;
       icon bg bottom
        figures
         rectangle 303 113 401 159 color 0 fill 14013909;
         text 'EndstopMin' 353 135 color 0 16;
       end;
       implementation bg
        submodels
         Cendstop 248 208
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\C.emx</LibraryPath>
 <TimeStamp>2007-10-31 10:43:59</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
           parameters
            real Cendstop = 1.0e-4;
          end;
          icon bg right
           figures
            text 'C' 248 208 color 0 18 bold;
          end;
          implementation eq
equations
    state = int(p.f);
    p.e = state / Cendstop;
implementation_end;
         Collision 248 120
          description '<Description>
 <Version>No Version Info</Version>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type X0e
           ports
            power in p1;
            power out p2;
            power out p12;
            signal boolean out collision;
           restrictions
            causality fixed out p1;
            causality fixed out p2;
            causality fixed in p12;
           parameters
            real InitialPos = -2.9496;
            real EndstopLocation = -2.95;
          end;
          icon bg
           figures
            text 'X0e' 248 120 color 0 18 bold;
          end;
          implementation bg
           submodels
            Condition1 224.9 231.5
             type Condition
              ports
               signal in dx;
               signal boolean out contact;
             end;
             icon bg
              figures
               rectangle 197.2 215 252.6 248 color 0 fill 15132390;
               text 'Condition' 224 231.5 color 0;
              terminals
               dx 224 248 fixed;
               contact 224 215 fixed;
             end;
             implementation eq
parameters
	real global epsilon;
variables
	boolean bounce;
equations
	contact = if dx - epsilon  > 0 then true else false end;
	bounce = event (dx - epsilon);implementation_end;
            plug p1 96 176;
            plug p2 352 176;
            plug p12 224 64;
            plug collision 400 200;
            Splitter1 224 200
             description '<Description><Version>4.0</Version>
   <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  <TimeStamp>2007-10-31 11:27:48</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot boolean duplicatable out output [1];
               signal knot boolean in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
               ellipse 219.7 195.7 228.3 204.3 color -1;
              terminals
               input 224 200 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            v1 160 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 160 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v12 224 120
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg right
              figures
               text '1' 224 120 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v2 296 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 296 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            X0 224 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type X0
              ports
               power in p1;
               power out p2;
               power out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg
              figures
               text 'X0' 224 176 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
            x1 160 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -2.95;
             end;
             icon bg left
              figures
               rectangle 145 289 175 319 color 0 fill 15132390;
               text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
            x12 224 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot PlusMinus
              ports
               signal knot duplicatable in plus [1];
               signal knot duplicatable in minus [1];
               signal knot out output [1];
             end;
             icon bg ellipse bottom
              figures
               ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            x2 296 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -2.9496;
             end;
             icon bg right
              figures
               rectangle 281 289 311 319 color 0 fill 15132390;
               text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
           end;
           connections
            Condition1\contact -> Splitter1\input;
            p1 => v1\p;
            Splitter1\output -> collision;
            Splitter1\output -> X0\condition;
            v1\flow -> x1\input;
            v1\p => X0\p1;
            v12\p => p12;
            v2\flow -> x2\input;
            v2\p => p2;
            X0\p12 => v12\p;
            X0\p2 => v2\p;
            x1\output -> x12\plus;
            x12\output -> Condition1\dx;
            x2\output -> x12\minus;
           end;
           parameterrelations
x1\Initial = EndstopLocation;
x2\Initial = InitialPos;parameterrelations_end;
          implementation_end;
         plug p2 152 120;
         plug collision 360 120;
         OneJunction 248 160
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
          knot OneJunction
           ports
            power knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 248 160 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         Rendstop 288 160
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type R
           ports
            power in p;
           parameters
            real Rendstop = 1000.0;
          end;
          icon bg bottom
           figures
            text 'R' 288 160 color 0 18 bold;
          end;
          implementation eq
equations					
	p.e = Rendstop * p.f;
implementation_end;
         Sf2 248 64
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:3:35</TimeStamp>
</Description>';
          type Sf
           ports
            power out p;
           restrictions
            causality fixed in p;
          end;
          icon bg bottom
           figures
            text 'Sf' 248 64 color 0 18 bold;
          end;
          implementation eq
parameters
	real flow = 0.0;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
        end;
        connections
         Collision\collision -> collision;
         Collision\p12 => OneJunction\p;
         Collision\p2 => p2;
         OneJunction\p => Cendstop\p;
         OneJunction\p => Rendstop\p;
         Sf2\p => Collision\p1;
        end;
        parameterrelations
Cendstop\Cendstop = Cendstop;
Rendstop\Rendstop = Rendstop;
Collision\InitialPos = InitialPos;
Collision\EndstopLocation = EndstopPos;parameterrelations_end;
       implementation_end;
      JointType 240 312
       description '<Information><Description><Version>4.8</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues><AllowLibraryUpdate>True</AllowLibraryUpdate></Description><Attributes><GlobalRelations>parameters
	real joint = 2;</GlobalRelations></Attributes></Information>';
       type Submodel
        ports
         mechanical in p1;
         signal out output [4,4];
         power out p2 [6,1];
       end;
       implementation bg
        submodels
         Integrate 320 272
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:3:23</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type Integrate
           ports
            signal in input;
            signal out output [4,4];
           parameters
            real init = -2.9496;
          end;
          icon bg
           figures
            rectangle 304 256 336 288 color 0 fill 15132390;
            text 'ò' 320 269.3 color 16711680 'SymbolProp BT' 21 symbol;
          end;
          implementation eq
parameters
	real global joint;
variables
	real R[3,3];
	real p[3];
	real q;
	real qa[6];
	real temp [4,4];
initialequations
	qa = 0;
equations
q = -int(input,init);
qa[joint] = q;
R =  dll('EulerAngles.dll','RotationMatrixFromEulXYZs',qa);
output = homogeneous(R,qa[4:6]);implementation_end;
         plug p1 240 188;
         plug output 320 368;
         plug p2 240 412;
         OneJunction2 240 272
          description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\FlowSensor.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:50:53</TimeStamp>
</Description>
</Information>';
          knot FlowSensor
           ports
            mechanical knot in p1 [1];
            power knot out p2 [1];
            signal knot out flow [1];
           restrictions
            causality constraint not_equal p1 p2;
          end;
          icon bg ellipse
           figures
            ellipse 233.1 264.8 246.9 279.1 color 0 fill 16777215;
            text 'f' 240 271.2 color 0;
          end;
          implementation eq
equations
	p2.f = p1.f;
	p1.e = p2.e;
	flow = p1.f;
implementation_end;
         uTbai 240 328
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\TF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:4:2</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type TF
           ports
            power in p1;
            power out p2 [6,1];
           restrictions
            causality constraint not_equal p1 p2;
            causality fixed in p1;
            causality fixed out p2;
           parameters
            real Cconstraint = 1.0e-4;
            real Rconstraint = 1000.0;
          end;
          icon bg left
           figures
            text 'TF' 240 328 color 0 18 bold;
          end;
          implementation eq
parameters
	real global joint;
variables
	real i;
	real state[6];
equations
	/*p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint);
	p2.e[2] = (Rconstraint*-p2.f[2] + int(-p2.f[2])/Cconstraint);
	p2.e[3] = p1.e;
	p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint);
	p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint);
	p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint);

	p1.f = p2.f[3];*/
	state = int(p2.f);
	for i = 1 to 6 do		
		if i == joint then
			p1.f = p2.f[i];	
			p2.e[i] = p1.e;
		else
			p2.e[i] = (Rconstraint*-p2.f[i] + -state[i]/Cconstraint);
		end;
	end;
implementation_end;
        end;
        connections
         Integrate\output -> output;
         OneJunction2\flow -> Integrate\input;
         OneJunction2\p2 => uTbai\p1;
         p1 => OneJunction2\p1;
         uTbai\p2 => p2;
        end;
       implementation_end;
      MultiplyDivide1 320 576
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\MultiplyDivide.emx</LibraryPath>
  <TimeStamp>2007-9-27 10:14:59</TimeStamp>
</Description>';
       knot MultiplyDivide
        ports
         signal knot duplicatable in multiply [4,4];
         signal knot duplicatable in divide [4,4];
         signal knot out output [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 312 568 328 584 color 0 fill 16777215;
       end;
       implementation eq
equations
	output = mul (collect (multiply)) ./ mul (collect (divide));
     implementation_end;
      plug Hout 504 576;
      plug Hin 112 576;
      plug p2 496 424;
      plug p 112 424;
      plug p1 240 40;
      OneJunction 240 176
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
       knot OneJunction
        ports
         mechanical knot duplicatable none p [1];
         signal knot out flow [1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg
        figures
         text '1' 240 176 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Or 456 176
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Logical\Discrete\Or.emx</LibraryPath>
  <TimeStamp>2007-12-18 23:20:57</TimeStamp>
</Description>';
       type 'Or-Or'
        ports
         signal boolean in input1;
         signal boolean out output;
         signal boolean in input2;
       end;
       icon bg bottom
        figures
         rectangle 440.1 160 471.9 192 color 0 fill 15132390;
         group
          line 442.3 169.3 452.8 169.3 color 16711680 fill 16711680;
          line 442.3 183.1 452.8 183.1 color 16711680 fill 16711680;
         end;
         spline 451.9 164.8 453.9 176.5 451.9 187.7 color 16711680 fill 16711680;
         line 460.7 176 469.5 176 color 16711680 fill 16711680;
         spline 451.7 164.3 457.9 166.6 460.8 176.4 457.6 185.4 451.7 187.7 color 16711680 fill 15132390;
       end;
       implementation eq
equations
	output = if input1 or input2 then 
		true
	else
		false
	end;

      implementation_end;
      Rjoint 168 176
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type R
        ports
         power in p;
        parameters
         real Rjoint = 0.1;
       end;
       icon bg bottom
        figures
         text 'R' 168 176 color 0 18 bold;
       end;
       implementation eq
equations					
	p.e = Rjoint * p.f;
implementation_end;
      Splitter2 320 312
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 316.8 308.8 323.2 315.2 color -1 fill 0;
         ellipse 315.7 307.7 324.3 316.3 color -1;
        terminals
         input 320 312 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Wbai 240 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot ZeroJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out effort [6,1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg bottom
        figures
         text '0' 240 424 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
      ZeroJunction 240 104
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:43</TimeStamp>
</Description>';
       knot ZeroJunction
        ports
         mechanical knot duplicatable none p [1];
         signal knot out effort [1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg
        figures
         text '0' 240 104 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
     end;
     connections
      EndstopMax\collision -> Or\input1;
      EndstopMin\collision -> Or\input2;
      Hin -> MultiplyDivide1\multiply;
      JointType\output -> Splitter2\input;
      JointType\p2 => Wbai\p;
      MultiplyDivide1\output -> Hout;
      OneJunction\p <= EndstopMax\p2;
      OneJunction\p <= EndstopMin\p2;
      OneJunction\p => JointType\p1;
      p <= Wbai\p;
      p1 => ZeroJunction\p;
      p2 => AdHji\p2;
      Rjoint\p <= OneJunction\p;
      Splitter2\output -> AdHji\H 424 312;
      Splitter2\output -> MultiplyDivide1\multiply;
      Wbai\p <= AdHji\p1;
      ZeroJunction\p => OneJunction\p;
     end;
     parameterrelations
EndstopMin\Rendstop = Rendstop;
EndstopMin\Cendstop = Cendstop;
EndstopMin\InitialPos = InitialPos;
EndstopMin\EndstopPos = MinEndstopPos;
EndstopMax\Rendstop = Rendstop;
EndstopMax\Cendstop = Cendstop;
EndstopMax\InitialPos = InitialPos;
EndstopMax\EndstopPos = MaxEndstopPos;
Rjoint\Rjoint= Rjoint;
Integrate\init = InitialPos;
uTbai\Rconstraint = Rconstraint;
uTbai\Cconstraint = Cconstraint;

parameterrelations_end;
     figures
      text 'b = next link (body)
a = previous link (body)
i = Frame fixed in previous body, fixed in joint
j = Frame fixed in next body, fixed in joint
 ' 680 488 color 0;
    implementation_end;
   JointBase1 488.2 296
    description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <LibraryPath>Joint-roty.emx</LibraryPath>
  <TimeStamp>2011-1-18 17:30:05</TimeStamp>
</Description>';
    type 'Submodel-roty'
     ports
      power out p [6,1];
      power in p1;
      power in p2 [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
     parameters
      real Rconstraint = 1000.0;
      real Cconstraint = 1.0e-4;
      real Rendstop = 1000.0;
      real Cendstop = 1.0e-4;
      real InitialPos = -1.13;
      real MaxEndstopPos = 1.57;
      real MinEndstopPos = -1.131;
      real Rjoint = 0.1;
    end;
    icon bg bottom
     figures
      rectangle 456.5 224 520 368 color 0 fill 14745599;
      text 'Joint-roty' 488.5 299 color 0;
     terminals
      p 456 256 fixed;
      p1 487.5 224 fixed;
      p2 520 256 fixed;
      Hin 456 336 fixed;
      Hout 520 336 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power out p1 [6,1];
         power in p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg bottom
        figures
         text 'MTF' 424 424 color 0 18 bold;
       end;
       implementation eq
equations					
	p2.e = transpose(Adjoint(H)) * p1.e;
	p1.f = Adjoint(H) * p2.f;implementation_end;
      EndstopMax 471 217
       description '<Description>
 <Version>4.1</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Submodel
        ports
         power out p2;
         signal boolean out collision;
        parameters
         real Rendstop = 1000.0;
         real Cendstop = 1.0e-4;
         real InitialPos = -1.13;
         real EndstopPos = 1.57;
       end;
       icon bg bottom
        figures
         rectangle 422 194 520 240 color 0 fill 14013909;
         text 'EndstopMax' 472 216 color 0 16;
        terminals
         p2 472 240 fixed;
       end;
       implementation bg
        submodels
         Cendstop 704 144
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\C.emx</LibraryPath>
 <TimeStamp>2007-10-31 10:43:59</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
           parameters
            real Cendstop = 1.0e-4;
          end;
          icon bg right
           figures
            text 'C' 704 144 color 0 18 bold;
          end;
          implementation eq
equations
    state = int(p.f);
    p.e = state / Cendstop;
implementation_end;
         Collision 704 216
          description '<Description>
 <Version>No Version Info</Version>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type X0e
           ports
            power in p1;
            power out p2;
            power out p12;
            signal boolean out Collision;
           restrictions
            causality fixed in p12;
            causality fixed out p2;
            causality fixed out p1;
           parameters
            real InitialPos = -1.13;
            real EndstopPos = 1.57;
          end;
          icon bg
           figures
            text 'X0e' 704 216 color 0 18 bold;
          end;
          implementation bg
           submodels
            Condition1 224.9 231.5
             type Condition
              ports
               signal in dx;
               signal boolean out contact;
             end;
             icon bg
              figures
               rectangle 197.2 215 252.6 248 color 0 fill 15132390;
               text 'Condition' 224 231.5 color 0;
              terminals
               dx 224 248 fixed;
               contact 224 215 fixed;
             end;
             implementation eq
parameters
	real global epsilon;
variables
	boolean bounce;
equations
	contact = if dx - epsilon  < 0 then true else false end;
	bounce = event (dx - epsilon);implementation_end;
            plug p1 96 176;
            plug p2 352 176;
            plug p12 224 64;
            plug Collision 408 192;
            Splitter1 224 200
             description '<Description><Version>4.0</Version>
   <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  <TimeStamp>2007-10-31 11:27:48</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot boolean duplicatable out output [1];
               signal knot boolean in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
               ellipse 219.7 195.7 228.3 204.3 color -1;
              terminals
               input 224 200 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            v1 160 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 160 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v12 224 120
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg right
              figures
               text '1' 224 120 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v2 296 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 296 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            X0 224 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type X0
              ports
               mechanical in p1;
               mechanical out p2;
               mechanical out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg
              figures
               text 'X0' 224 176 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
            x1 160 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = 1.57;
             end;
             icon bg left
              figures
               rectangle 145 289 175 319 color 0 fill 15132390;
               text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
            x12 224 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot PlusMinus
              ports
               signal knot duplicatable in plus [1];
               signal knot duplicatable in minus [1];
               signal knot out output [1];
             end;
             icon bg ellipse bottom
              figures
               ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            x2 296 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.13;
             end;
             icon bg right
              figures
               rectangle 281 289 311 319 color 0 fill 15132390;
               text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
           end;
           connections
            Condition1\contact -> Splitter1\input;
            p1 => v1\p;
            Splitter1\output -> Collision;
            Splitter1\output -> X0\condition;
            v1\flow -> x1\input;
            v1\p => X0\p1;
            v12\p => p12;
            v2\flow -> x2\input;
            v2\p => p2;
            X0\p12 => v12\p;
            X0\p2 => v2\p;
            x1\output -> x12\plus;
            x12\output -> Condition1\dx;
            x2\output -> x12\minus;
           end;
           parameterrelations
x1\Initial = EndstopPos;
x2\Initial = InitialPos;parameterrelations_end;
          implementation_end;
         plug p2 648 216;
         plug collision 800 216;
         OneJunction5 704 176
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
          knot OneJunction
           ports
            mechanical knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 704 176 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         Rendstop 736 176
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type R
           ports
            power in p;
           parameters
            real Rendstop = 1000.0;
          end;
          icon bg bottom
           figures
            text 'R' 736 176 color 0 18 bold;
          end;
          implementation eq
equations					
	p.e = Rendstop * p.f;
implementation_end;
         Sf1 704 264
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:3:35</TimeStamp>
</Description>';
          type Sf
           ports
            power out p;
           restrictions
            causality fixed in p;
          end;
          icon bg bottom
           figures
            text 'Sf' 704 264 color 0 18 bold;
          end;
          implementation eq
parameters
	real flow = 0.0;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
        end;
        connections
         Collision\Collision -> collision;
         Collision\p12 => OneJunction5\p;
         Collision\p2 => p2;
         OneJunction5\p => Cendstop\p;
         OneJunction5\p => Rendstop\p;
         Sf1\p => Collision\p1;
        end;
        parameterrelations
Collision\InitialPos = InitialPos;
Collision\EndstopPos = EndstopPos;
Rendstop\Rendstop = Rendstop;
Cendstop\Cendstop = Cendstop;parameterrelations_end;
       implementation_end;
      EndstopMin 312 216
       description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <LibraryPath>EndstopMin.emx</LibraryPath>
  <TimeStamp>2011-1-18 14:37:57</TimeStamp>
</Description>';
       type Submodel
        ports
         power out p2;
         signal boolean out collision;
        parameters
         real Cendstop = 1.0e-4;
         real Rendstop = 1000.0;
         real InitialPos = -1.13;
         real EndstopPos = -1.131;
       end;
       icon bg bottom
        figures
         rectangle 263 193 361 239 color 0 fill 14013909;
         text 'EndstopMin' 313 215 color 0 16;
       end;
       implementation bg
        submodels
         Cendstop 248 208
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\C.emx</LibraryPath>
 <TimeStamp>2007-10-31 10:43:59</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
           parameters
            real Cendstop = 1.0e-4;
          end;
          icon bg right
           figures
            text 'C' 248 208 color 0 18 bold;
          end;
          implementation eq
equations
    state = int(p.f);
    p.e = state / Cendstop;
implementation_end;
         Collision 248 120
          description '<Description>
 <Version>No Version Info</Version>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type X0e
           ports
            power in p1;
            power out p2;
            power out p12;
            signal boolean out collision;
           restrictions
            causality fixed out p1;
            causality fixed out p2;
            causality fixed in p12;
           parameters
            real InitialPos = -1.13;
            real EndstopLocation = -1.131;
          end;
          icon bg
           figures
            text 'X0e' 248 120 color 0 18 bold;
          end;
          implementation bg
           submodels
            Condition1 224.9 231.5
             type Condition
              ports
               signal in dx;
               signal boolean out contact;
             end;
             icon bg
              figures
               rectangle 197.2 215 252.6 248 color 0 fill 15132390;
               text 'Condition' 224 231.5 color 0;
              terminals
               dx 224 248 fixed;
               contact 224 215 fixed;
             end;
             implementation eq
parameters
	real global epsilon;
variables
	boolean bounce;
equations
	contact = if dx - epsilon  > 0 then true else false end;
	bounce = event (dx - epsilon);implementation_end;
            plug p1 96 176;
            plug p2 352 176;
            plug p12 224 64;
            plug collision 400 200;
            Splitter1 224 200
             description '<Description><Version>4.0</Version>
   <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  <TimeStamp>2007-10-31 11:27:48</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot boolean duplicatable out output [1];
               signal knot boolean in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
               ellipse 219.7 195.7 228.3 204.3 color -1;
              terminals
               input 224 200 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            v1 160 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 160 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v12 224 120
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg right
              figures
               text '1' 224 120 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v2 296 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 296 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            X0 224 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type X0
              ports
               power in p1;
               power out p2;
               power out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg
              figures
               text 'X0' 224 176 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
            x1 160 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.131;
             end;
             icon bg left
              figures
               rectangle 145 289 175 319 color 0 fill 15132390;
               text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
            x12 224 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot PlusMinus
              ports
               signal knot duplicatable in plus [1];
               signal knot duplicatable in minus [1];
               signal knot out output [1];
             end;
             icon bg ellipse bottom
              figures
               ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            x2 296 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.13;
             end;
             icon bg right
              figures
               rectangle 281 289 311 319 color 0 fill 15132390;
               text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
           end;
           connections
            Condition1\contact -> Splitter1\input;
            p1 => v1\p;
            Splitter1\output -> collision;
            Splitter1\output -> X0\condition;
            v1\flow -> x1\input;
            v1\p => X0\p1;
            v12\p => p12;
            v2\flow -> x2\input;
            v2\p => p2;
            X0\p12 => v12\p;
            X0\p2 => v2\p;
            x1\output -> x12\plus;
            x12\output -> Condition1\dx;
            x2\output -> x12\minus;
           end;
           parameterrelations
x1\Initial = EndstopLocation;
x2\Initial = InitialPos;parameterrelations_end;
          implementation_end;
         plug p2 152 120;
         plug collision 360 120;
         OneJunction 248 160
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
          knot OneJunction
           ports
            power knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 248 160 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         Rendstop 288 160
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type R
           ports
            power in p;
           parameters
            real Rendstop = 1000.0;
          end;
          icon bg bottom
           figures
            text 'R' 288 160 color 0 18 bold;
          end;
          implementation eq
equations					
	p.e = Rendstop * p.f;
implementation_end;
         Sf2 248 64
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:3:35</TimeStamp>
</Description>';
          type Sf
           ports
            power out p;
           restrictions
            causality fixed in p;
          end;
          icon bg bottom
           figures
            text 'Sf' 248 64 color 0 18 bold;
          end;
          implementation eq
parameters
	real flow = 0.0;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
        end;
        connections
         Collision\collision -> collision;
         Collision\p12 => OneJunction\p;
         Collision\p2 => p2;
         OneJunction\p => Cendstop\p;
         OneJunction\p => Rendstop\p;
         Sf2\p => Collision\p1;
        end;
        parameterrelations
Cendstop\Cendstop = Cendstop;
Rendstop\Rendstop = Rendstop;
Collision\InitialPos = InitialPos;
Collision\EndstopLocation = EndstopPos;parameterrelations_end;
       implementation_end;
      Integrate 320 336
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:3:23</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Integrate
        ports
         signal in input;
         signal out output [4,4];
        parameters
         real init = -1.13;
       end;
       icon bg
        figures
         rectangle 304 320 336 352 color 0 fill 15132390;
         text 'ò' 320 333.3 color 16711680 'SymbolProp BT' 21 symbol;
       end;
       implementation eq
variables
	real R[3,3];
	real p[3];
	real q;
equations
q = int(input,init);
R = [	cos(q),	0,	sin(q);
			0,				1,	0;
			-sin(q),	0,	cos(q)];
p = [0;0;0];
output = homogeneous(R,p);
	
     implementation_end;
      MatrixMul 320 496
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Gain
        ports
         signal in input1 [4,4];
         signal out output [4,4];
         signal in input2 [4,4];
       end;
       icon bg bottom
        figures
         rectangle 304.1 480 335.9 512 color 0 fill 15132390;
         text 'X' 320 496 color 16711680 16 bold;
       end;
       implementation eq
equations
	output = input2*input1;    implementation_end;
      plug p1 240 56;
      plug p2 496 424;
      plug Hin 112 496;
      plug Hout 504 496;
      plug p 112 424;
      OneJunction 240 272
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [1];
         signal knot out flow [1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg
        figures
         text '1' 240 272 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Or 392 216
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Logical\Discrete\Or.emx</LibraryPath>
  <TimeStamp>2007-12-18 23:20:57</TimeStamp>
</Description>';
       type 'Or-Or'
        ports
         signal boolean in input1;
         signal boolean out output;
         signal boolean in input2;
       end;
       icon bg bottom
        figures
         rectangle 376.1 200 407.9 232 color 0 fill 15132390;
         group
          line 378.3 209.3 388.8 209.3 color 16711680 fill 16711680;
          line 378.3 223.1 388.8 223.1 color 16711680 fill 16711680;
         end;
         spline 387.9 204.8 389.9 216.5 387.9 227.7 color 16711680 fill 16711680;
         line 396.7 216 405.5 216 color 16711680 fill 16711680;
         spline 387.7 204.3 393.9 206.6 396.8 216.4 393.6 225.4 387.7 227.7 color 16711680 fill 15132390;
       end;
       implementation eq
equations
	output = if input1 or input2 then 
		true
	else
		false
	end;

      implementation_end;
      Rjoint 192 272
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type R
        ports
         power in p;
        parameters
         real Rjoint = 0.1;
       end;
       icon bg bottom
        figures
         text 'R' 192 272 color 0 18 bold;
       end;
       implementation eq
equations					
	p.e = Rjoint * p.f;
implementation_end;
      Splitter2 320 368
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 316.8 364.8 323.2 371.2 color -1 fill 0;
         ellipse 315.7 363.7 324.3 372.3 color -1;
        terminals
         input 320 368 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Tbai 240 384
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg left
        figures
         text '1' 240 384 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      uTbai 240 328
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\TF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:4:2</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type TF
        ports
         power in p1;
         power out p2 [6,1];
        restrictions
         causality constraint not_equal p1 p2;
        parameters
         real Rconstraint = 1000.0;
         real Cconstraint = 1.0e-4;
       end;
       icon bg left
        figures
         text 'TF' 240 328 color 0 18 bold;
       end;
       implementation eq
equations
	p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint);
	p2.e[2] = p1.e;
	p2.e[3] = (Rconstraint*-p2.f[3] + int(-p2.f[3])/Cconstraint);
	p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint);
	p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint);
	p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint);

	p1.f = p2.f[2];
implementation_end;
      Wbai 240 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot ZeroJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out effort [6,1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg bottom
        figures
         text '0' 240 424 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
      ZeroJunction 240 104
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:43</TimeStamp>
</Description>';
       knot ZeroJunction
        ports
         power knot duplicatable none p [1];
         signal knot out effort [1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg
        figures
         text '0' 240 104 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
     end;
     connections
      EndstopMax\collision -> Or\input1;
      EndstopMin\collision -> Or\input2;
      Hin -> MatrixMul\input2;
      Integrate\output -> Splitter2\input;
      MatrixMul\output -> Hout;
      OneJunction\flow -> Integrate\input 320 272;
      OneJunction\p <= EndstopMax\p2;
      OneJunction\p <= EndstopMin\p2;
      OneJunction\p => Rjoint\p;
      OneJunction\p => uTbai\p1;
      p <= Wbai\p;
      p1 => ZeroJunction\p;
      p2 => AdHji\p2;
      Splitter2\output -> AdHji\H 424 368;
      Splitter2\output -> MatrixMul\input1;
      Tbai\p => Wbai\p;
      uTbai\p2 => Tbai\p;
      Wbai\p <= AdHji\p1;
      ZeroJunction\p => OneJunction\p;
     end;
     parameterrelations
EndstopMin\Rendstop = Rendstop;
EndstopMin\Cendstop = Cendstop;
EndstopMin\InitialPos = InitialPos;
EndstopMin\EndstopPos = MinEndstopPos;
EndstopMax\Rendstop = Rendstop;
EndstopMax\Cendstop = Cendstop;
EndstopMax\InitialPos = InitialPos;
EndstopMax\EndstopPos = MaxEndstopPos;
Rjoint\Rjoint= Rjoint;
Integrate\init = InitialPos;
uTbai\Rconstraint = Rconstraint;
uTbai\Cconstraint = Cconstraint;parameterrelations_end;
     figures
      text 'b = next link (body)
a = previous link (body)
i = Frame fixed in previous body, fixed in joint
j = Frame fixed in next body, fixed in joint
 ' 744 400 color 0;
    implementation_end;
   JointBase2 296.2 296
    description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <LibraryPath>Joint-roty.emx</LibraryPath>
  <TimeStamp>2011-1-18 17:30:05</TimeStamp>
</Description>';
    type 'Submodel-roty'
     ports
      power out p [6,1];
      power in p1;
      power in p2 [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
     parameters
      real Rconstraint = 1000.0;
      real Cconstraint = 1.0e-4;
      real Rendstop = 1000.0;
      real Cendstop = 1.0e-4;
      real InitialPos = 0.0;
      real MaxEndstopPos = 1.57;
      real MinEndstopPos = -1.131;
      real Rjoint = 0.1;
    end;
    icon bg bottom
     figures
      rectangle 264.5 224 328 368 color 0 fill 14745599;
      text 'Joint-roty' 296.5 299 color 0;
     terminals
      p 264 256 fixed;
      p1 295.5 224 fixed;
      p2 328 256 fixed;
      Hin 264 336 fixed;
      Hout 328 336 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power out p1 [6,1];
         power in p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg bottom
        figures
         text 'MTF' 424 424 color 0 18 bold;
       end;
       implementation eq
equations					
	p2.e = transpose(Adjoint(H)) * p1.e;
	p1.f = Adjoint(H) * p2.f;implementation_end;
      EndstopMax 471 217
       description '<Description>
 <Version>4.1</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Submodel
        ports
         power out p2;
         signal boolean out collision;
        parameters
         real Rendstop = 1000.0;
         real Cendstop = 1.0e-4;
         real InitialPos = -1.13;
         real EndstopPos = 1.57;
       end;
       icon bg bottom
        figures
         rectangle 422 194 520 240 color 0 fill 14013909;
         text 'EndstopMax' 472 216 color 0 16;
        terminals
         p2 472 240 fixed;
       end;
       implementation bg
        submodels
         Cendstop 704 144
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\C.emx</LibraryPath>
 <TimeStamp>2007-10-31 10:43:59</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
           parameters
            real Cendstop = 1.0e-4;
          end;
          icon bg right
           figures
            text 'C' 704 144 color 0 18 bold;
          end;
          implementation eq
equations
    state = int(p.f);
    p.e = state / Cendstop;
implementation_end;
         Collision 704 216
          description '<Description>
 <Version>No Version Info</Version>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type X0e
           ports
            power in p1;
            power out p2;
            power out p12;
            signal boolean out Collision;
           restrictions
            causality fixed in p12;
            causality fixed out p2;
            causality fixed out p1;
           parameters
            real InitialPos = -1.13;
            real EndstopPos = 1.57;
          end;
          icon bg
           figures
            text 'X0e' 704 216 color 0 18 bold;
          end;
          implementation bg
           submodels
            Condition1 224.9 231.5
             type Condition
              ports
               signal in dx;
               signal boolean out contact;
             end;
             icon bg
              figures
               rectangle 197.2 215 252.6 248 color 0 fill 15132390;
               text 'Condition' 224 231.5 color 0;
              terminals
               dx 224 248 fixed;
               contact 224 215 fixed;
             end;
             implementation eq
parameters
	real global epsilon;
variables
	boolean bounce;
equations
	contact = if dx - epsilon  < 0 then true else false end;
	bounce = event (dx - epsilon);implementation_end;
            plug p1 96 176;
            plug p2 352 176;
            plug p12 224 64;
            plug Collision 408 192;
            Splitter1 224 200
             description '<Description><Version>4.0</Version>
   <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  <TimeStamp>2007-10-31 11:27:48</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot boolean duplicatable out output [1];
               signal knot boolean in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
               ellipse 219.7 195.7 228.3 204.3 color -1;
              terminals
               input 224 200 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            v1 160 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 160 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v12 224 120
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg right
              figures
               text '1' 224 120 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v2 296 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 296 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            X0 224 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type X0
              ports
               mechanical in p1;
               mechanical out p2;
               mechanical out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg
              figures
               text 'X0' 224 176 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
            x1 160 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = 1.57;
             end;
             icon bg left
              figures
               rectangle 145 289 175 319 color 0 fill 15132390;
               text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
            x12 224 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot PlusMinus
              ports
               signal knot duplicatable in plus [1];
               signal knot duplicatable in minus [1];
               signal knot out output [1];
             end;
             icon bg ellipse bottom
              figures
               ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            x2 296 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.13;
             end;
             icon bg right
              figures
               rectangle 281 289 311 319 color 0 fill 15132390;
               text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
           end;
           connections
            Condition1\contact -> Splitter1\input;
            p1 => v1\p;
            Splitter1\output -> Collision;
            Splitter1\output -> X0\condition;
            v1\flow -> x1\input;
            v1\p => X0\p1;
            v12\p => p12;
            v2\flow -> x2\input;
            v2\p => p2;
            X0\p12 => v12\p;
            X0\p2 => v2\p;
            x1\output -> x12\plus;
            x12\output -> Condition1\dx;
            x2\output -> x12\minus;
           end;
           parameterrelations
x1\Initial = EndstopPos;
x2\Initial = InitialPos;parameterrelations_end;
          implementation_end;
         plug p2 648 216;
         plug collision 800 216;
         OneJunction5 704 176
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
          knot OneJunction
           ports
            mechanical knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 704 176 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         Rendstop 736 176
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type R
           ports
            power in p;
           parameters
            real Rendstop = 1000.0;
          end;
          icon bg bottom
           figures
            text 'R' 736 176 color 0 18 bold;
          end;
          implementation eq
equations					
	p.e = Rendstop * p.f;
implementation_end;
         Sf1 704 264
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:3:35</TimeStamp>
</Description>';
          type Sf
           ports
            power out p;
           restrictions
            causality fixed in p;
          end;
          icon bg bottom
           figures
            text 'Sf' 704 264 color 0 18 bold;
          end;
          implementation eq
parameters
	real flow = 0.0;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
        end;
        connections
         Collision\Collision -> collision;
         Collision\p12 => OneJunction5\p;
         Collision\p2 => p2;
         OneJunction5\p => Cendstop\p;
         OneJunction5\p => Rendstop\p;
         Sf1\p => Collision\p1;
        end;
        parameterrelations
Collision\InitialPos = InitialPos;
Collision\EndstopPos = EndstopPos;
Rendstop\Rendstop = Rendstop;
Cendstop\Cendstop = Cendstop;parameterrelations_end;
       implementation_end;
      EndstopMin 312 216
       description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <LibraryPath>EndstopMin.emx</LibraryPath>
  <TimeStamp>2011-1-18 14:37:57</TimeStamp>
</Description>';
       type Submodel
        ports
         power out p2;
         signal boolean out collision;
        parameters
         real Cendstop = 1.0e-4;
         real Rendstop = 1000.0;
         real InitialPos = -1.13;
         real EndstopPos = -1.131;
       end;
       icon bg bottom
        figures
         rectangle 263 193 361 239 color 0 fill 14013909;
         text 'EndstopMin' 313 215 color 0 16;
       end;
       implementation bg
        submodels
         Cendstop 248 208
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\C.emx</LibraryPath>
 <TimeStamp>2007-10-31 10:43:59</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
           parameters
            real Cendstop = 1.0e-4;
          end;
          icon bg right
           figures
            text 'C' 248 208 color 0 18 bold;
          end;
          implementation eq
equations
    state = int(p.f);
    p.e = state / Cendstop;
implementation_end;
         Collision 248 120
          description '<Description>
 <Version>No Version Info</Version>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type X0e
           ports
            power in p1;
            power out p2;
            power out p12;
            signal boolean out collision;
           restrictions
            causality fixed out p1;
            causality fixed out p2;
            causality fixed in p12;
           parameters
            real InitialPos = -1.13;
            real EndstopLocation = -1.131;
          end;
          icon bg
           figures
            text 'X0e' 248 120 color 0 18 bold;
          end;
          implementation bg
           submodels
            Condition1 224.9 231.5
             type Condition
              ports
               signal in dx;
               signal boolean out contact;
             end;
             icon bg
              figures
               rectangle 197.2 215 252.6 248 color 0 fill 15132390;
               text 'Condition' 224 231.5 color 0;
              terminals
               dx 224 248 fixed;
               contact 224 215 fixed;
             end;
             implementation eq
parameters
	real global epsilon;
variables
	boolean bounce;
equations
	contact = if dx - epsilon  > 0 then true else false end;
	bounce = event (dx - epsilon);implementation_end;
            plug p1 96 176;
            plug p2 352 176;
            plug p12 224 64;
            plug collision 400 200;
            Splitter1 224 200
             description '<Description><Version>4.0</Version>
   <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  <TimeStamp>2007-10-31 11:27:48</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot boolean duplicatable out output [1];
               signal knot boolean in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
               ellipse 219.7 195.7 228.3 204.3 color -1;
              terminals
               input 224 200 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            v1 160 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 160 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v12 224 120
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg right
              figures
               text '1' 224 120 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v2 296 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 296 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            X0 224 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type X0
              ports
               power in p1;
               power out p2;
               power out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg
              figures
               text 'X0' 224 176 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
            x1 160 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.131;
             end;
             icon bg left
              figures
               rectangle 145 289 175 319 color 0 fill 15132390;
               text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
            x12 224 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot PlusMinus
              ports
               signal knot duplicatable in plus [1];
               signal knot duplicatable in minus [1];
               signal knot out output [1];
             end;
             icon bg ellipse bottom
              figures
               ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            x2 296 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.13;
             end;
             icon bg right
              figures
               rectangle 281 289 311 319 color 0 fill 15132390;
               text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
           end;
           connections
            Condition1\contact -> Splitter1\input;
            p1 => v1\p;
            Splitter1\output -> collision;
            Splitter1\output -> X0\condition;
            v1\flow -> x1\input;
            v1\p => X0\p1;
            v12\p => p12;
            v2\flow -> x2\input;
            v2\p => p2;
            X0\p12 => v12\p;
            X0\p2 => v2\p;
            x1\output -> x12\plus;
            x12\output -> Condition1\dx;
            x2\output -> x12\minus;
           end;
           parameterrelations
x1\Initial = EndstopLocation;
x2\Initial = InitialPos;parameterrelations_end;
          implementation_end;
         plug p2 152 120;
         plug collision 360 120;
         OneJunction 248 160
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
          knot OneJunction
           ports
            power knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 248 160 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         Rendstop 288 160
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type R
           ports
            power in p;
           parameters
            real Rendstop = 1000.0;
          end;
          icon bg bottom
           figures
            text 'R' 288 160 color 0 18 bold;
          end;
          implementation eq
equations					
	p.e = Rendstop * p.f;
implementation_end;
         Sf2 248 64
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:3:35</TimeStamp>
</Description>';
          type Sf
           ports
            power out p;
           restrictions
            causality fixed in p;
          end;
          icon bg bottom
           figures
            text 'Sf' 248 64 color 0 18 bold;
          end;
          implementation eq
parameters
	real flow = 0.0;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
        end;
        connections
         Collision\collision -> collision;
         Collision\p12 => OneJunction\p;
         Collision\p2 => p2;
         OneJunction\p => Cendstop\p;
         OneJunction\p => Rendstop\p;
         Sf2\p => Collision\p1;
        end;
        parameterrelations
Cendstop\Cendstop = Cendstop;
Rendstop\Rendstop = Rendstop;
Collision\InitialPos = InitialPos;
Collision\EndstopLocation = EndstopPos;parameterrelations_end;
       implementation_end;
      Integrate 320 328
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:3:23</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Integrate
        ports
         signal in input;
         signal out output [4,4];
        parameters
         real init = -1.13;
       end;
       icon bg
        figures
         rectangle 304 312 336 344 color 0 fill 15132390;
         text 'ò' 320 325.3 color 16711680 'SymbolProp BT' 21 symbol;
       end;
       implementation eq
variables
	real R[3,3];
	real p[3];
	real q;
equations
q = int(input,init);
R = [	cos(q),	0,	sin(q);
			0,				1,	0;
			-sin(q),	0,	cos(q)];
p = [0;0;0];
output = homogeneous(R,p);
	
     implementation_end;
      MatrixMul 320 496
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Gain
        ports
         signal in input1 [4,4];
         signal out output [4,4];
         signal in input2 [4,4];
       end;
       icon bg bottom
        figures
         rectangle 304.1 480 335.9 512 color 0 fill 15132390;
         text 'X' 320 496 color 16711680 16 bold;
       end;
       implementation eq
equations
	output = input2*input1;    implementation_end;
      plug p1 240 56;
      plug p2 496 424;
      plug Hin 112 496;
      plug Hout 504 496;
      plug p 112 424;
      OneJunction 240 272
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [1];
         signal knot out flow [1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg
        figures
         text '1' 240 272 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Or 392 216
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Logical\Discrete\Or.emx</LibraryPath>
  <TimeStamp>2007-12-18 23:20:57</TimeStamp>
</Description>';
       type 'Or-Or'
        ports
         signal boolean in input1;
         signal boolean out output;
         signal boolean in input2;
       end;
       icon bg bottom
        figures
         rectangle 376.1 200 407.9 232 color 0 fill 15132390;
         group
          line 378.3 209.3 388.8 209.3 color 16711680 fill 16711680;
          line 378.3 223.1 388.8 223.1 color 16711680 fill 16711680;
         end;
         spline 387.9 204.8 389.9 216.5 387.9 227.7 color 16711680 fill 16711680;
         line 396.7 216 405.5 216 color 16711680 fill 16711680;
         spline 387.7 204.3 393.9 206.6 396.8 216.4 393.6 225.4 387.7 227.7 color 16711680 fill 15132390;
       end;
       implementation eq
equations
	output = if input1 or input2 then 
		true
	else
		false
	end;

      implementation_end;
      Rjoint 192 272
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type R
        ports
         power in p;
        parameters
         real Rjoint = 0.1;
       end;
       icon bg bottom
        figures
         text 'R' 192 272 color 0 18 bold;
       end;
       implementation eq
equations					
	p.e = Rjoint * p.f;
implementation_end;
      Splitter2 320 368
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 316.8 364.8 323.2 371.2 color -1 fill 0;
         ellipse 315.7 363.7 324.3 372.3 color -1;
        terminals
         input 320 368 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Tbai 240 376
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg left
        figures
         text '1' 240 376 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      uTbai 240 328
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\TF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:4:2</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type TF
        ports
         power in p1;
         power out p2 [6,1];
        restrictions
         causality constraint not_equal p1 p2;
        parameters
         real Rconstraint = 1000.0;
         real Cconstraint = 1.0e-4;
       end;
       icon bg left
        figures
         text 'TF' 240 328 color 0 18 bold;
       end;
       implementation eq
equations
	p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint);
	p2.e[2] = p1.e;
	p2.e[3] = (Rconstraint*-p2.f[3] + int(-p2.f[3])/Cconstraint);
	p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint);
	p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint);
	p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint);

	p1.f = p2.f[2];
implementation_end;
      Wbai 240 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot ZeroJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out effort [6,1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg bottom
        figures
         text '0' 240 424 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
      ZeroJunction 240 160
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:43</TimeStamp>
</Description>';
       knot ZeroJunction
        ports
         power knot duplicatable none p [1];
         signal knot out effort [1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg
        figures
         text '0' 240 160 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
     end;
     connections
      EndstopMax\collision -> Or\input1;
      EndstopMin\collision -> Or\input2;
      Hin -> MatrixMul\input2;
      Integrate\output -> Splitter2\input;
      MatrixMul\output -> Hout;
      OneJunction\flow -> Integrate\input 320 272;
      OneJunction\p <= EndstopMax\p2;
      OneJunction\p <= EndstopMin\p2;
      OneJunction\p => Rjoint\p;
      OneJunction\p => uTbai\p1;
      p <= Wbai\p;
      p1 => ZeroJunction\p;
      p2 => AdHji\p2;
      Splitter2\output -> AdHji\H 424 368;
      Splitter2\output -> MatrixMul\input1;
      Tbai\p => Wbai\p;
      uTbai\p2 => Tbai\p;
      Wbai\p <= AdHji\p1;
      ZeroJunction\p => OneJunction\p;
     end;
     parameterrelations
EndstopMin\Rendstop = Rendstop;
EndstopMin\Cendstop = Cendstop;
EndstopMin\InitialPos = InitialPos;
EndstopMin\EndstopPos = MinEndstopPos;
EndstopMax\Rendstop = Rendstop;
EndstopMax\Cendstop = Cendstop;
EndstopMax\InitialPos = InitialPos;
EndstopMax\EndstopPos = MaxEndstopPos;
Rjoint\Rjoint= Rjoint;
Integrate\init = InitialPos;
uTbai\Rconstraint = Rconstraint;
uTbai\Cconstraint = Cconstraint;parameterrelations_end;
     figures
      text 'b = next link (body)
a = previous link (body)
i = Frame fixed in previous body, fixed in joint
j = Frame fixed in next body, fixed in joint
 ' 744 400 color 0;
    implementation_end;
   JointBase3 784.2 496
    description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <LibraryPath>Joint-roty.emx</LibraryPath>
  <TimeStamp>2011-1-18 17:30:05</TimeStamp>
</Description>';
    type 'Submodel-roty'
     ports
      power out p [6,1];
      power in p1;
      power in p2 [6,1];
      signal in Hin [4,4];
      signal out Hout [4,4];
     parameters
      real Rconstraint = 1000.0;
      real Cconstraint = 1.0e-4;
      real Rendstop = 1000.0;
      real Cendstop = 1.0e-4;
      real InitialPos = 0.0;
      real MaxEndstopPos = 1.57;
      real MinEndstopPos = -1.131;
      real Rjoint = 0.1;
    end;
    icon bg bottom
     figures
      rectangle 752.5 424 816 568 color 0 fill 14745599;
      text 'Joint-roty' 784.5 499 color 0;
     terminals
      p 752 456 fixed;
      p1 783.5 424 fixed;
      p2 816 456 fixed;
      Hin 752 536 fixed;
      Hout 816 536 fixed;
    end;
    implementation bg
     submodels
      AdHji 424 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\MTF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:3</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type MTF
        ports
         power out p1 [6,1];
         power in p2 [6,1];
         signal in H [4,4];
        restrictions
         causality constraint not_equal p1 p2;
       end;
       icon bg bottom
        figures
         text 'MTF' 424 424 color 0 18 bold;
       end;
       implementation eq
equations					
	p2.e = transpose(Adjoint(H)) * p1.e;
	p1.f = Adjoint(H) * p2.f;implementation_end;
      EndstopMax 471 217
       description '<Description>
 <Version>4.1</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Submodel
        ports
         power out p2;
         signal boolean out collision;
        parameters
         real Rendstop = 1000.0;
         real Cendstop = 1.0e-4;
         real InitialPos = -1.13;
         real EndstopPos = 1.57;
       end;
       icon bg bottom
        figures
         rectangle 422 194 520 240 color 0 fill 14013909;
         text 'EndstopMax' 472 216 color 0 16;
        terminals
         p2 472 240 fixed;
       end;
       implementation bg
        submodels
         Cendstop 704 144
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\C.emx</LibraryPath>
 <TimeStamp>2007-10-31 10:43:59</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
           parameters
            real Cendstop = 1.0e-4;
          end;
          icon bg right
           figures
            text 'C' 704 144 color 0 18 bold;
          end;
          implementation eq
equations
    state = int(p.f);
    p.e = state / Cendstop;
implementation_end;
         Collision 704 216
          description '<Description>
 <Version>No Version Info</Version>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type X0e
           ports
            power in p1;
            power out p2;
            power out p12;
            signal boolean out Collision;
           restrictions
            causality fixed in p12;
            causality fixed out p2;
            causality fixed out p1;
           parameters
            real InitialPos = -1.13;
            real EndstopPos = 1.57;
          end;
          icon bg
           figures
            text 'X0e' 704 216 color 0 18 bold;
          end;
          implementation bg
           submodels
            Condition1 224.9 231.5
             type Condition
              ports
               signal in dx;
               signal boolean out contact;
             end;
             icon bg
              figures
               rectangle 197.2 215 252.6 248 color 0 fill 15132390;
               text 'Condition' 224 231.5 color 0;
              terminals
               dx 224 248 fixed;
               contact 224 215 fixed;
             end;
             implementation eq
parameters
	real global epsilon;
variables
	boolean bounce;
equations
	contact = if dx - epsilon  < 0 then true else false end;
	bounce = event (dx - epsilon);implementation_end;
            plug p1 96 176;
            plug p2 352 176;
            plug p12 224 64;
            plug Collision 408 192;
            Splitter1 224 200
             description '<Description><Version>4.0</Version>
   <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  <TimeStamp>2007-10-31 11:27:48</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot boolean duplicatable out output [1];
               signal knot boolean in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
               ellipse 219.7 195.7 228.3 204.3 color -1;
              terminals
               input 224 200 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            v1 160 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 160 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v12 224 120
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg right
              figures
               text '1' 224 120 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v2 296 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 296 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            X0 224 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type X0
              ports
               mechanical in p1;
               mechanical out p2;
               mechanical out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg
              figures
               text 'X0' 224 176 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
            x1 160 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = 1.57;
             end;
             icon bg left
              figures
               rectangle 145 289 175 319 color 0 fill 15132390;
               text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
            x12 224 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot PlusMinus
              ports
               signal knot duplicatable in plus [1];
               signal knot duplicatable in minus [1];
               signal knot out output [1];
             end;
             icon bg ellipse bottom
              figures
               ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            x2 296 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.13;
             end;
             icon bg right
              figures
               rectangle 281 289 311 319 color 0 fill 15132390;
               text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
           end;
           connections
            Condition1\contact -> Splitter1\input;
            p1 => v1\p;
            Splitter1\output -> Collision;
            Splitter1\output -> X0\condition;
            v1\flow -> x1\input;
            v1\p => X0\p1;
            v12\p => p12;
            v2\flow -> x2\input;
            v2\p => p2;
            X0\p12 => v12\p;
            X0\p2 => v2\p;
            x1\output -> x12\plus;
            x12\output -> Condition1\dx;
            x2\output -> x12\minus;
           end;
           parameterrelations
x1\Initial = EndstopPos;
x2\Initial = InitialPos;parameterrelations_end;
          implementation_end;
         plug p2 648 216;
         plug collision 800 216;
         OneJunction5 704 176
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
          knot OneJunction
           ports
            mechanical knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 704 176 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         Rendstop 736 176
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type R
           ports
            power in p;
           parameters
            real Rendstop = 1000.0;
          end;
          icon bg bottom
           figures
            text 'R' 736 176 color 0 18 bold;
          end;
          implementation eq
equations					
	p.e = Rendstop * p.f;
implementation_end;
         Sf1 704 264
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:3:35</TimeStamp>
</Description>';
          type Sf
           ports
            power out p;
           restrictions
            causality fixed in p;
          end;
          icon bg bottom
           figures
            text 'Sf' 704 264 color 0 18 bold;
          end;
          implementation eq
parameters
	real flow = 0.0;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
        end;
        connections
         Collision\Collision -> collision;
         Collision\p12 => OneJunction5\p;
         Collision\p2 => p2;
         OneJunction5\p => Cendstop\p;
         OneJunction5\p => Rendstop\p;
         Sf1\p => Collision\p1;
        end;
        parameterrelations
Collision\InitialPos = InitialPos;
Collision\EndstopPos = EndstopPos;
Rendstop\Rendstop = Rendstop;
Cendstop\Cendstop = Cendstop;parameterrelations_end;
       implementation_end;
      EndstopMin 312 216
       description '<Description>
   <Version>4.1</Version>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
   <LibraryPath>EndstopMin.emx</LibraryPath>
  <TimeStamp>2011-1-18 14:37:57</TimeStamp>
</Description>';
       type Submodel
        ports
         power out p2;
         signal boolean out collision;
        parameters
         real Cendstop = 1.0e-4;
         real Rendstop = 1000.0;
         real InitialPos = -1.13;
         real EndstopPos = -1.131;
       end;
       icon bg bottom
        figures
         rectangle 263 193 361 239 color 0 fill 14013909;
         text 'EndstopMin' 313 215 color 0 16;
       end;
       implementation bg
        submodels
         Cendstop 248 208
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\C.emx</LibraryPath>
 <TimeStamp>2007-10-31 10:43:59</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type C
           ports
            power in p;
            signal out state;
           restrictions
            causality preferred out p;
           parameters
            real Cendstop = 1.0e-4;
          end;
          icon bg right
           figures
            text 'C' 248 208 color 0 18 bold;
          end;
          implementation eq
equations
    state = int(p.f);
    p.e = state / Cendstop;
implementation_end;
         Collision 248 120
          description '<Description>
 <Version>No Version Info</Version>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type X0e
           ports
            power in p1;
            power out p2;
            power out p12;
            signal boolean out collision;
           restrictions
            causality fixed out p1;
            causality fixed out p2;
            causality fixed in p12;
           parameters
            real InitialPos = -1.13;
            real EndstopLocation = -1.131;
          end;
          icon bg
           figures
            text 'X0e' 248 120 color 0 18 bold;
          end;
          implementation bg
           submodels
            Condition1 224.9 231.5
             type Condition
              ports
               signal in dx;
               signal boolean out contact;
             end;
             icon bg
              figures
               rectangle 197.2 215 252.6 248 color 0 fill 15132390;
               text 'Condition' 224 231.5 color 0;
              terminals
               dx 224 248 fixed;
               contact 224 215 fixed;
             end;
             implementation eq
parameters
	real global epsilon;
variables
	boolean bounce;
equations
	contact = if dx - epsilon  > 0 then true else false end;
	bounce = event (dx - epsilon);implementation_end;
            plug p1 96 176;
            plug p2 352 176;
            plug p12 224 64;
            plug collision 400 200;
            Splitter1 224 200
             description '<Description><Version>4.0</Version>
   <LibraryPath>C:\Program Files\20-sim 4.0\System\SplitterBoolean.emx</LibraryPath>
  <TimeStamp>2007-10-31 11:27:48</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot Splitter
              ports
               signal knot boolean duplicatable out output [1];
               signal knot boolean in input [1];
             end;
             icon bg ellipse
              figures
               ellipse 220.8 196.8 227.2 203.2 color -1 fill 0;
               ellipse 219.7 195.7 228.3 204.3 color -1;
              terminals
               input 224 200 fixed;
             end;
             implementation eq
equations
    collect (output) = input;
implementation_end;
            v1 160 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 160 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v12 224 120
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg right
              figures
               text '1' 224 120 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            v2 296 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot OneJunction
              ports
               mechanical knot duplicatable none p [1];
               signal knot out flow [1];
              restrictions
               causality constraint one_out p;
             end;
             icon bg top
              figures
               text '1' 296 176 color 0 18 bold;
             end;
             implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
  implementation_end;
            X0 224 176
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type X0
              ports
               power in p1;
               power out p2;
               power out p12;
               signal boolean in condition;
              restrictions
               causality fixed out p1;
               causality fixed out p2;
               causality fixed in p12;
             end;
             icon bg
              figures
               text 'X0' 224 176 color 8388608 18 bold;
             end;
             implementation eq
equations
	p1.e = if condition then p12.e else 0 end;
	p2.e = p1.e;
	p12.f = if condition then p1.f-p2.f else 0 end;
 implementation_end;
            x1 160 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.131;
             end;
             icon bg left
              figures
               rectangle 145 289 175 319 color 0 fill 15132390;
               text 'ò' 157.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
            x12 224 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             knot PlusMinus
              ports
               signal knot duplicatable in plus [1];
               signal knot duplicatable in minus [1];
               signal knot out output [1];
             end;
             icon bg ellipse bottom
              figures
               ellipse 216.5 296.5 231.5 311.5 color 0 fill 16777215;
             end;
             implementation eq
equations
    output = sum (collect (plus)) - sum (collect (minus));
    implementation_end;
            x2 296 304
             description '<Description>
 <IsMainModel>0</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
             type Integrate
              ports
               signal in input;
               signal out output;
              parameters
               real Initial = -1.13;
             end;
             icon bg right
              figures
               rectangle 281 289 311 319 color 0 fill 15132390;
               text 'ò' 293.5 304 color 16711680 'SymbolProp BT' 21 symbol;
             end;
             implementation eq
equations
	output = int (input, Initial);
     implementation_end;
           end;
           connections
            Condition1\contact -> Splitter1\input;
            p1 => v1\p;
            Splitter1\output -> collision;
            Splitter1\output -> X0\condition;
            v1\flow -> x1\input;
            v1\p => X0\p1;
            v12\p => p12;
            v2\flow -> x2\input;
            v2\p => p2;
            X0\p12 => v12\p;
            X0\p2 => v2\p;
            x1\output -> x12\plus;
            x12\output -> Condition1\dx;
            x2\output -> x12\minus;
           end;
           parameterrelations
x1\Initial = EndstopLocation;
x2\Initial = InitialPos;parameterrelations_end;
          implementation_end;
         plug p2 152 120;
         plug collision 360 120;
         OneJunction 248 160
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
          knot OneJunction
           ports
            power knot duplicatable none p [1];
            signal knot out flow [1];
           restrictions
            causality constraint one_out p;
          end;
          icon bg
           figures
            text '1' 248 160 color 0 18 bold;
          end;
          implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
         Rendstop 288 160
          description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
          type R
           ports
            power in p;
           parameters
            real Rendstop = 1000.0;
          end;
          icon bg bottom
           figures
            text 'R' 288 160 color 0 18 bold;
          end;
          implementation eq
equations					
	p.e = Rendstop * p.f;
implementation_end;
         Sf2 248 64
          description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\Sf.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:3:35</TimeStamp>
</Description>';
          type Sf
           ports
            power out p;
           restrictions
            causality fixed in p;
          end;
          icon bg bottom
           figures
            text 'Sf' 248 64 color 0 18 bold;
          end;
          implementation eq
parameters
	real flow = 0.0;
variables
	real effort;
equations
	p.f = flow;
	effort = p.e;
implementation_end;
        end;
        connections
         Collision\collision -> collision;
         Collision\p12 => OneJunction\p;
         Collision\p2 => p2;
         OneJunction\p => Cendstop\p;
         OneJunction\p => Rendstop\p;
         Sf2\p => Collision\p1;
        end;
        parameterrelations
Cendstop\Cendstop = Cendstop;
Rendstop\Rendstop = Rendstop;
Collision\InitialPos = InitialPos;
Collision\EndstopLocation = EndstopPos;parameterrelations_end;
       implementation_end;
      Integrate 320 328
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Integrate.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:3:23</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Integrate
        ports
         signal in input;
         signal out output [4,4];
        parameters
         real init = -1.13;
       end;
       icon bg
        figures
         rectangle 304 312 336 344 color 0 fill 15132390;
         text 'ò' 320 325.3 color 16711680 'SymbolProp BT' 21 symbol;
       end;
       implementation eq
variables
	real R[3,3];
	real p[3];
	real q[3];
	real qa;
	real temp [4,4];
initialequations
	q = 0;
equations
qa= int(input,init);
q[2] = qa;
R = [	cos(q[2]),	0,	sin(q[2]);
			0,				1,	0;
			-sin(q[2]),	0,	cos(q[2])];
p = [0;0;0];
output = dll('EulerAngles.dll','HMatrixFromEulXYZr',q);
temp = output - homogeneous(R,p);
	
     implementation_end;
      MatrixMul 320 496
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
 <TimeStamp>2007-9-26 12:15:12</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type Gain
        ports
         signal in input1 [4,4];
         signal out output [4,4];
         signal in input2 [4,4];
       end;
       icon bg bottom
        figures
         rectangle 304.1 480 335.9 512 color 0 fill 15132390;
         text 'X' 320 496 color 16711680 16 bold;
       end;
       implementation eq
equations
	output = input2*input1;    implementation_end;
      plug p1 240 56;
      plug p2 496 424;
      plug Hin 112 496;
      plug Hout 504 496;
      plug p 112 424;
      OneJunction 240 272
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [1];
         signal knot out flow [1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg
        figures
         text '1' 240 272 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      Or 392 216
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Logical\Discrete\Or.emx</LibraryPath>
  <TimeStamp>2007-12-18 23:20:57</TimeStamp>
</Description>';
       type 'Or-Or'
        ports
         signal boolean in input1;
         signal boolean out output;
         signal boolean in input2;
       end;
       icon bg bottom
        figures
         rectangle 376.1 200 407.9 232 color 0 fill 15132390;
         group
          line 378.3 209.3 388.8 209.3 color 16711680 fill 16711680;
          line 378.3 223.1 388.8 223.1 color 16711680 fill 16711680;
         end;
         spline 387.9 204.8 389.9 216.5 387.9 227.7 color 16711680 fill 16711680;
         line 396.7 216 405.5 216 color 16711680 fill 16711680;
         spline 387.7 204.3 393.9 206.6 396.8 216.4 393.6 225.4 387.7 227.7 color 16711680 fill 15132390;
       end;
       implementation eq
equations
	output = if input1 or input2 then 
		true
	else
		false
	end;

      implementation_end;
      Rjoint 192 272
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\R.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type R
        ports
         power in p;
        parameters
         real Rjoint = 0.1;
       end;
       icon bg bottom
        figures
         text 'R' 192 272 color 0 18 bold;
       end;
       implementation eq
equations					
	p.e = Rjoint * p.f;
implementation_end;
      Splitter2 320 368
       description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
       knot Splitter
        ports
         signal knot duplicatable out output [4,4];
         signal knot in input [4,4];
       end;
       icon bg ellipse
        figures
         ellipse 316.8 364.8 323.2 371.2 color -1 fill 0;
         ellipse 315.7 363.7 324.3 372.3 color -1;
        terminals
         input 320 368 fixed;
       end;
       implementation eq
equations
    collect (output) = input;
implementation_end;
      Tbai 240 376
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:18</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot OneJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out flow [6,1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg left
        figures
         text '1' 240 376 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      uTbai 240 328
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\TF.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:4:2</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       type TF
        ports
         power in p1;
         power out p2 [6,1];
        restrictions
         causality constraint not_equal p1 p2;
        parameters
         real Rconstraint = 1000.0;
         real Cconstraint = 1.0e-4;
       end;
       icon bg left
        figures
         text 'TF' 240 328 color 0 18 bold;
       end;
       implementation eq
equations
	p2.e[1] = (Rconstraint*-p2.f[1] + int(-p2.f[1])/Cconstraint);
	p2.e[2] = p1.e;
	p2.e[3] = (Rconstraint*-p2.f[3] + int(-p2.f[3])/Cconstraint);
	p2.e[4] = (Rconstraint*-p2.f[4] + int(-p2.f[4])/Cconstraint);
	p2.e[5] = (Rconstraint*-p2.f[5] + int(-p2.f[5])/Cconstraint);
	p2.e[6] = (Rconstraint*-p2.f[6] + int(-p2.f[6])/Cconstraint);

	p1.f = p2.f[2];
implementation_end;
      Wbai 240 424
       description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
 <TimeStamp>2007-9-27 9:51:43</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
       knot ZeroJunction
        ports
         power knot duplicatable none p [6,1];
         signal knot out effort [6,1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg bottom
        figures
         text '0' 240 424 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
      ZeroJunction 240 160
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:43</TimeStamp>
</Description>';
       knot ZeroJunction
        ports
         power knot duplicatable none p [1];
         signal knot out effort [1];
        restrictions
         causality constraint one_in p;
       end;
       icon bg
        figures
         text '0' 240 160 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
     end;
     connections
      EndstopMax\collision -> Or\input1;
      EndstopMin\collision -> Or\input2;
      Hin -> MatrixMul\input2;
      Integrate\output -> Splitter2\input;
      MatrixMul\output -> Hout;
      OneJunction\flow -> Integrate\input 320 272;
      OneJunction\p <= EndstopMax\p2;
      OneJunction\p <= EndstopMin\p2;
      OneJunction\p => Rjoint\p;
      OneJunction\p => uTbai\p1;
      p <= Wbai\p;
      p1 => ZeroJunction\p;
      p2 => AdHji\p2;
      Splitter2\output -> AdHji\H 424 368;
      Splitter2\output -> MatrixMul\input1;
      Tbai\p => Wbai\p;
      uTbai\p2 => Tbai\p;
      Wbai\p <= AdHji\p1;
      ZeroJunction\p => OneJunction\p;
     end;
     parameterrelations
EndstopMin\Rendstop = Rendstop;
EndstopMin\Cendstop = Cendstop;
EndstopMin\InitialPos = InitialPos;
EndstopMin\EndstopPos = MinEndstopPos;
EndstopMax\Rendstop = Rendstop;
EndstopMax\Cendstop = Cendstop;
EndstopMax\InitialPos = InitialPos;
EndstopMax\EndstopPos = MaxEndstopPos;
Rjoint\Rjoint= Rjoint;
Integrate\init = InitialPos;
uTbai\Rconstraint = Rconstraint;
uTbai\Cconstraint = Cconstraint;parameterrelations_end;
     figures
      text 'b = next link (body)
a = previous link (body)
i = Frame fixed in previous body, fixed in joint
j = Frame fixed in next body, fixed in joint
 ' 744 400 color 0;
    implementation_end;
   Link 408 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-16 17:44:32</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    type 'Submodel-Equation'
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power in Pin [6,1];
      power out Pout [6,1];
     restrictions
      causality constraint not_equal Pin Pout;
    end;
    icon bg
     figures
      rectangle 376 472 440 552 color 0 fill 8454041;
      text 'name' 408 496 color 0 'Clear Sans' 16;
     terminals
      Hin 376 536 fixed;
      Hout 440 536 fixed;
      Pin 440 488 fixed;
      Pout 376 488 fixed;
    end;
    implementation eq
parameters
	real offset[3]= [0.167;  0.00001;  0.142]; //coordinates of joint_1 
variables
	real Hab[4,4];
	real AdHab[6,6];
equations
	Hab = homogeneous(eye(3),offset);
	AdHab = Adjoint(eye(3),offset);
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link1 640 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-16 17:44:32</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    type 'Submodel-Equation'
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power in Pin [6,1];
      power out Pout [6,1];
     restrictions
      causality constraint not_equal Pin Pout;
    end;
    icon bg
     figures
      rectangle 608 472 672 552 color 0 fill 8454041;
      text 'name' 640 496 color 0 'Clear Sans' 16;
     terminals
      Hin 608 536 fixed;
      Hout 672 536 fixed;
      Pin 672 488 fixed;
      Pout 608 488 fixed;
    end;
    implementation eq
parameters
	real offset[3]= [0.167;1e-005;0.142]; //coordinates of joint_1 
variables
	real Hab[4,4];
	real AdHab[6,6];
equations
	Hab = homogeneous(eye(3),offset);
	AdHab = Adjoint(eye(3),offset);
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link2 912 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-16 17:44:32</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    type 'Submodel-Equation'
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power in Pin [6,1];
      power out Pout [6,1];
     restrictions
      causality constraint not_equal Pin Pout;
    end;
    icon bg
     figures
      rectangle 880 472 944 552 color 0 fill 8454041;
      text 'name' 912 496 color 0 'Clear Sans' 16;
     terminals
      Hin 880 536 fixed;
      Hout 944 536 fixed;
      Pin 944 488 fixed;
      Pout 880 488 fixed;
    end;
    implementation eq
parameters
	real offset[3]= [0.167;0.0001;0.142]; //coordinates of joint_1 
variables
	real Hab[4,4];
	real AdHab[6,6];
equations
	Hab = homogeneous(eye(3),offset);
	AdHab = Adjoint(eye(3),offset);
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link3 1120 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-16 17:44:32</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    type 'Submodel-Equation'
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power in Pin [6,1];
      power out Pout [6,1];
     restrictions
      causality constraint not_equal Pin Pout;
    end;
    icon bg
     figures
      rectangle 1088 472 1152 552 color 0 fill 8454041;
      text 'name' 1120 496 color 0 'Clear Sans' 16;
     terminals
      Hin 1088 536 fixed;
      Hout 1152 536 fixed;
      Pin 1152 488 fixed;
      Pout 1088 488 fixed;
    end;
    implementation eq
parameters
	real offset[3]= [0.167;0.0001;0.142]; //coordinates of joint_1 
variables
	real Hab[4,4];
	real AdHab[6,6];
equations
	Hab = homogeneous(eye(3),offset);
	AdHab = Adjoint(eye(3),offset);
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   Link4 1328 512
    description '<Information>
 <Description>
    <Version>4.8</Version>
  <LibraryPath>Z:\home\wouter\Documents\20-sim\library\Bond Graph\MR\link-v2.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <TimeStamp>2020-7-16 17:44:32</TimeStamp>
<AllowLibraryUpdate>False</AllowLibraryUpdate>
 </Description>
</Information>';
    type 'Submodel-Equation'
     ports
      signal in Hin [4,4];
      signal out Hout [4,4];
      power in Pin [6,1];
      power out Pout [6,1];
     restrictions
      causality constraint not_equal Pin Pout;
    end;
    icon bg
     figures
      rectangle 1296 472 1360 552 color 0 fill 8454041;
      text 'name' 1328 496 color 0 'Clear Sans' 16;
     terminals
      Hin 1296 536 fixed;
      Hout 1360 536 fixed;
      Pin 1360 488 fixed;
      Pout 1296 488 fixed;
    end;
    implementation eq
parameters
	real offset[3]= [0.167;0.0001;0.142]; //coordinates of joint_1 
variables
	real Hab[4,4];
	real AdHab[6,6];
equations
	Hab = homogeneous(eye(3),offset);
	AdHab = Adjoint(eye(3),offset);
	Hout = Hin * Hab;
	Pout.e = transpose(AdHab) * Pin.e;
	Pin.f = AdHab * Pout.f;

    implementation_end;
   OneJunction 200 256
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
    knot OneJunction
     ports
      power knot duplicatable none p [6,1];
      signal knot out flow [6,1];
     restrictions
      causality constraint one_out p;
    end;
    icon bg
     figures
      text '1' 200 256 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   OneJunction1 304 488
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2007-9-27 9:51:18</TimeStamp>
</Description>';
    knot OneJunction
     ports
      power knot duplicatable none p [6,1];
      signal knot out flow [6,1];
     restrictions
      causality constraint one_out p;
    end;
    icon bg
     figures
      text '1' 304 488 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
   OneJunction3 488 160
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
    knot ZeroJunction
     ports
      power knot duplicatable none p [1];
      signal knot out effort [1];
     restrictions
      causality constraint one_in p;
    end;
    icon bg
     figures
      text '0' 488 160 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
   Sf 128 256
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\Sf-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:58</TimeStamp>
</Description>';
    type 'Sf-3'
     ports
      power out p [6,1];
     restrictions
      causality fixed in p;
    end;
    icon bg bottom
     figures
      text 'Sf' 128 256 color 0 18 bold;
    end;
    implementation eq
parameters
	real flow[6,1] = 0;
variables
	real effort [6];
equations
	p.f = flow;
	effort = p.e;
implementation_end;
   Sf1 256 488
    description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Bond Graph\3D\Sf-3.emx</LibraryPath>
  <TimeStamp>2007-9-25 12:11:58</TimeStamp>
</Description>';
    type 'Sf-3'
     ports
      power out p [6,1];
     restrictions
      causality fixed in p;
    end;
    icon bg bottom
     figures
      text 'Sf' 256 488 color 0 18 bold;
    end;
    implementation eq
parameters
	real flow[6,1] = 0;
variables
	real effort [6];
equations
	p.f = flow;
	effort = p.e;
implementation_end;
   Splitter1 296 96
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 292.8 92.8 299.2 99.2 color -1 fill 0;
      ellipse 291.7 91.7 300.3 100.3 color -1;
     terminals
      input 296 96 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter2 232 336
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 228.8 332.8 235.2 339.2 color -1 fill 0;
      ellipse 227.7 331.7 236.3 340.3 color -1;
     terminals
      input 232 336 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter3 400 96
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [1];
      signal knot in input [1];
    end;
    icon bg ellipse
     figures
      ellipse 396.8 92.8 403.2 99.2 color -1 fill 0;
      ellipse 395.7 91.7 404.3 100.3 color -1;
     terminals
      input 400 96 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Splitter4 232 536
    description '<Description><Version>4.0</Version>
   <LibraryPath>Signal\Block Diagram\Splitter.emx</LibraryPath>
  <TimeStamp>2008-01-17 11:28:29</TimeStamp>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
</Description>';
    knot Splitter
     ports
      signal knot duplicatable out output [4,4];
      signal knot in input [4,4];
    end;
    icon bg ellipse
     figures
      ellipse 228.8 532.8 235.2 539.2 color -1 fill 0;
      ellipse 227.7 531.7 236.3 540.3 color -1;
     terminals
      input 232 536 fixed;
    end;
    implementation eq
equations
    collect (output) = input;
implementation_end;
   Submodel1 296 144
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      signal in input;
      power out p2;
    end;
    implementation bg
     submodels
      Gain1 552 88
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:15:12</TimeStamp>
</Description>';
       type Gain
        ports
         signal in input;
         signal out output;
       end;
       icon bg bottom
        figures
         rectangle 536.1 72 567.9 104 color 0 fill 15132390;
         text 'K' 552 88 color 16711680 16 bold;
       end;
       implementation eq
parameters
	real K = 12.0;		// gain
equations
	output = K * input;
    implementation_end;
      GY 624 184
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\GY.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:53:45</TimeStamp>
</Description>
</Information>';
       type GY
        ports
         power in p1;
         power out p2;
        restrictions
         causality constraint equal p1 p2;
       end;
       icon bg bottom
        figures
         text 'GY' 624 184 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 0.127;
equations
	p1.e = r * p2.f;
	p2.e = r * p1.f;
implementation_end;
      MSe 624 88
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
       type MSe
        ports
         power out p;
         signal in effort;
        restrictions
         causality fixed out p;
       end;
       icon bg bottom
        figures
         text 'MSe' 624 88 color 0 18 bold;
       end;
       implementation eq
variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
      plug input 424 88;
      plug p2 624 220;
      OneJunction2 624 136
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       knot OneJunction
        ports
         power knot duplicatable none p [1];
         signal knot out flow [1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg
        figures
         text '1' 624 136 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      R 664 136
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
       type R
        ports
         power in p;
       end;
       icon bg bottom
        figures
         text 'R' 664 136 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 0.08;
equations
	p.e = r * p.f;
implementation_end;
      SignalLimiter2 488 88
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
       type 'SignalLimiter-Limit'
        ports
         signal in input;
         signal out output;
       end;
       icon bg bottom
        figures
         group
          rectangle 472 72 504 104 color 0 fill 15132390;
          line 487.9 76.5 487.9 101 color 0 fill 15132390;
          line 475 88.2 500.7 88.2 color 0 fill 15132390;
          spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2;
          spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2;
          spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2;
         end;
       end;
       implementation eq
parameters
	real maximum = 1;
	real minimum = -1;
equations
	output = limit (input, minimum, maximum);
  implementation_end;
     end;
     connections
      Gain1\output -> MSe\effort;
      GY\p2 => p2;
      input -> SignalLimiter2\input;
      MSe\p => OneJunction2\p;
      OneJunction2\p => GY\p1;
      R\p <= OneJunction2\p;
      SignalLimiter2\output -> Gain1\input;
     end;
    implementation_end;
   Submodel2 488 96
    description '<Description>
	<Version>4.8</Version>
	<IsMainModel>1</IsMainModel>
	</Description>';
    type Submodel
     ports
      signal in input;
      power out p2;
    end;
    implementation bg
     submodels
      Gain1 552 88
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram\Gain.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:15:12</TimeStamp>
</Description>';
       type Gain
        ports
         signal in input;
         signal out output;
       end;
       icon bg bottom
        figures
         rectangle 536.1 72 567.9 104 color 0 fill 15132390;
         text 'K' 552 88 color 16711680 16 bold;
       end;
       implementation eq
parameters
	real K = 12.0;		// gain
equations
	output = K * input;
    implementation_end;
      GY 624 184
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\GY.emx</LibraryPath>
  <TimeStamp>2011-11-29 15:53:45</TimeStamp>
</Description>
</Information>';
       type GY
        ports
         power in p1;
         power out p2;
        restrictions
         causality constraint equal p1 p2;
       end;
       icon bg bottom
        figures
         text 'GY' 624 184 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 0.127;
equations
	p1.e = r * p2.f;
	p2.e = r * p1.f;
implementation_end;
      MSe 624 88
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\MSe.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:12:33</TimeStamp>
</Description>
</Information>';
       type MSe
        ports
         power out p;
         signal in effort;
        restrictions
         causality fixed out p;
       end;
       icon bg bottom
        figures
         text 'MSe' 624 88 color 0 18 bold;
       end;
       implementation eq
variables
	real flow;
equations
	p.e = effort;
	flow = p.f;
implementation_end;
      plug input 424 88;
      plug p2 624 220;
      OneJunction2 624 136
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\OneJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:17:51</TimeStamp>
</Description>
</Information>';
       knot OneJunction
        ports
         power knot duplicatable none p [1];
         signal knot out flow [1];
        restrictions
         causality constraint one_out p;
       end;
       icon bg
        figures
         text '1' 624 136 color 0 18 bold;
       end;
       implementation eq
equations
	sum (direct (p.e)) = 0;
	equal (collect (p.f));
	flow = first (p.f);
implementation_end;
      R 664 136
       description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\R.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:35:37</TimeStamp>
</Description>
</Information>';
       type R
        ports
         power in p;
       end;
       icon bg bottom
        figures
         text 'R' 664 136 color 0 18 bold;
       end;
       implementation eq
parameters
	real r = 0.08;
equations
	p.e = r * p.f;
implementation_end;
      SignalLimiter2 488 88
       description '<Description><Version>4.0</Version><IsMainModel>1</IsMainModel><KeepParameterValues>False</KeepParameterValues>
   <LibraryPath>Signal\Block Diagram Non-Linear\SignalLimiter-Limit.emx</LibraryPath>
  <TimeStamp>2007-9-26 12:47:40</TimeStamp>
</Description>';
       type 'SignalLimiter-Limit'
        ports
         signal in input;
         signal out output;
       end;
       icon bg bottom
        figures
         group
          rectangle 472 72 504 104 color 0 fill 15132390;
          line 487.9 76.5 487.9 101 color 0 fill 15132390;
          line 475 88.2 500.7 88.2 color 0 fill 15132390;
          spline 481.9 95.1 493.9 81.4 color 16711680 fill 15132390 width 2;
          spline 493.3 82.2 501.9 81.8 color 16711680 fill 15132390 width 2;
          spline 475 95.6 481.9 95.1 color 16711680 fill 15132390 width 2;
         end;
       end;
       implementation eq
parameters
	real maximum = 1;
	real minimum = -1;
equations
	output = limit (input, minimum, maximum);
  implementation_end;
     end;
     connections
      Gain1\output -> MSe\effort;
      GY\p2 => p2;
      input -> SignalLimiter2\input;
      MSe\p => OneJunction2\p;
      OneJunction2\p => GY\p1;
      R\p <= OneJunction2\p;
      SignalLimiter2\output -> Gain1\input;
     end;
    implementation_end;
   Submodel7 1464 656
    description '<Description><Version>4.0</Version>
   <LibraryPath>Template\Submodel-Equation.emx</LibraryPath>
<IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
   <TimeStamp>2007-11-1 22:32:1</TimeStamp>
   <AllowLibraryUpdate>False</AllowLibraryUpdate>
</Description>';
    type 'Submodel-Equation'
     ports
      signal in input [4,4];
      signal out output;
    end;
    implementation eq
variables
	real position[3];
	real rotation[3];
equations
	// start typing here
	position = input[1:3,4];
	rotation = [input[3,2];input[1,3];input[2,1]];
 implementation_end;
   Wtip0 664 256
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\Se.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:26</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
    type Se
     ports
      power out p [6,1];
     restrictions
      causality fixed out p;
    end;
    icon bg bottom
     figures
      text 'Se' 664 256 color 0 18 bold;
    end;
    implementation eq
parameters
	real effort = 0.0;
variables
	real flow[6];
equations
	p.e = effort;
	flow = p.f;
implementation_end;
   Wtip1 1504 488
    description '<Description>
 <Version>4.0</Version>
 <IsMainModel>1</IsMainModel>
 <KeepParameterValues>False</KeepParameterValues>
 <LibraryPath>Bond Graph\Se.emx</LibraryPath>
 <TimeStamp>2007-9-25 12:3:26</TimeStamp>
 <AllowLibraryUpdate>True</AllowLibraryUpdate>
</Description>';
    type Se
     ports
      power out p [6,1];
     restrictions
      causality fixed out p;
    end;
    icon bg bottom
     figures
      text 'Se' 1504 488 color 0 18 bold;
    end;
    implementation eq
parameters
	real effort = 0.0;
variables
	real flow[6];
equations
	p.e = effort;
	flow = p.f;
implementation_end;
   ZeroJunction2 808 232
    description '<Information>
 <Description>
    <Version>4.2</Version>
<IsMainModel>1</IsMainModel>
  <KeepParameterValues>False</KeepParameterValues>
    <LibraryPath>Bond Graph\ZeroJunction.emx</LibraryPath>
  <TimeStamp>2011-11-29 16:45:16</TimeStamp>
</Description>
</Information>';
    knot ZeroJunction
     ports
      power knot duplicatable none p [1];
      signal knot out effort [1];
     restrictions
      causality constraint one_in p;
    end;
    icon bg
     figures
      text '0' 808 232 color 0 18 bold;
    end;
    implementation eq
equations
	sum (direct (p.f)) = 0;
	equal (collect (p.e));
	effort = first (p.e);
implementation_end;
  end;
  connections
   Base\Hout -> JointBase1\Hin;
   Base\p => JointBase2\p2;
   Base1\p => JointBase1\p2;
   Base2\Hout -> Link1\Hin;
   Base2\p1 <= Link1\Pout;
   Base3\Hin <- Link2\Hout;
   Base3\Hout -> Link3\Hin;
   Base4\Hin <- Link4\Hout;
   Base4\Hout -> Submodel7\input;
   Constant\output -> Splitter2\input;
   Constant1\output -> Splitter1\input;
   Joint\p => Link3\Pin;
   Joint\p2 <= Link4\Pout;
   JointBase1\Hout -> Base1\Hin;
   JointBase1\p => Base\p1;
   JointBase2\Hout -> Base\Hin;
   JointBase2\p => OneJunction\p;
   JointBase3\Hout -> Link2\Hin;
   JointBase3\p => Link1\Pin;
   JointBase3\p1 <= ZeroJunction2\p;
   JointBase3\p2 <= Link2\Pout;
   Link\Hout -> Base2\Hin;
   Link\Pin <= Base2\p;
   Link1\Hout -> JointBase3\Hin;
   Link2\Pin <= Base3\p;
   Link3\Hout -> Joint\Hin;
   Link3\Pout => Base3\p1;
   Link4\Hin <- Joint\Hout;
   Link4\Pin <= Base4\p;
   OneJunction\p <= Sf\p;
   OneJunction1\p <= Link\Pout;
   OneJunction1\p <= Sf1\p;
   OneJunction3\p => JointBase1\p1;
   Splitter1\output -> Splitter3\input;
   Splitter1\output -> Submodel1\input;
   Splitter2\output -> JointBase2\Hin;
   Splitter2\output -> Splitter4\input;
   Splitter3\output -> Submodel2\input;
   Splitter4\output -> Link\Hin;
   Submodel1\p2 => JointBase2\p1;
   Submodel2\p2 => OneJunction3\p;
   Wtip0\p => Base1\p1;
   Wtip1\p => Base4\p1;
   ZeroJunction2\p <= OneJunction3\p 808 160;
   ZeroJunction2\p => Joint\p1;
  end;
 implementation_end;
]]>
</Sidops>
 </Model>
 <Experiments>
     <DefaultExperiment><![CDATA[Experiment 1]]>
</DefaultExperiment>
  <Experiment>
    <Name>Experiment 1</Name>
    <CreatedBy></CreatedBy>
    <Info></Info>
<ExpData>
  <VersionNumber>4.8</VersionNumber>
  <ModelProperties>
    <ModelProperty section="tools\graph editor" entry="debugMode" value="0"/>
  </ModelProperties>
  <Variables>
   <Constants>
   </Constants>
   <Parameters>
    <Variable>
     <Name>epsilon</Name>
     <Value>0</Value>
    </Variable>
   </Parameters>
   <Initials>
    <Variable>
     <Name>Base1\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Base3\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Base4\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>Base\InertialTensor\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>JointBase1\EndstopMax\Cendstop\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>JointBase1\EndstopMin\Cendstop\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>JointBase2\EndstopMax\Cendstop\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>JointBase2\EndstopMin\Cendstop\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>JointBase3\EndstopMax\Cendstop\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>JointBase3\EndstopMin\Cendstop\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint\EndstopMax\Cendstop\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint\EndstopMin\Cendstop\state_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint\JointType\uTbai\state_initial</Name>
     <Rows>6</Rows>
     <Columns>1</Columns>
     <Value>0 0 0 0 0 0</Value>
    </Variable>
    <Variable>
     <Name>new_state1_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state10_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state11_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state12_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state13_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state14_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state15_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state2_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state3_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state4_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state5_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state6_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state7_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state8_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>new_state9_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint\EndstopMax\Collision\p12.f_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint\EndstopMin\Collision\p12.f_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Joint\Rjoint\p.e_initial</Name>
     <Value>0</Value>
    </Variable>
    <Variable>
     <Name>Submodel2\R\p.f_initial</Name>
     <Value>0</Value>
    </Variable>
   </Initials>
  </Variables>
  <PlotSpecs>
   <VarNames>
    <VarName>time</VarName>
    <VarName>Submodel7\position[1]</VarName>
    <VarName>Submodel7\position[2]</VarName>
    <VarName>Submodel7\position[3]</VarName>
    <VarName>Submodel7\rotation[1]</VarName>
    <VarName>Submodel7\rotation[2]</VarName>
    <VarName>Submodel7\rotation[3]</VarName>
   </VarNames>
   <Plots>
    <Plot>
     <PlotType>GraphPlot</PlotType>
     <BasePlot>
       <PlotId>1</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <Grid>
      <DrawGrid>true</DrawGrid>
      <GridColor>15780518</GridColor>
      <GridBorderLineColor>12624260</GridBorderLineColor>
      <GridZeroLineColor>0</GridZeroLineColor>
      <XTicks>10</XTicks>
      <YTicks>10</YTicks>
      <ZTicks>10</ZTicks>
      <Use3DLook>false</Use3DLook>
     </Grid>
     <PlotBGColor>16777215</PlotBGColor>
     <ShowPlotTitle>true</ShowPlotTitle>
     <TitlePosition>1</TitlePosition>
     <PlotTitle>model</PlotTitle>
     <ShowXValues>true</ShowXValues>
     <Fonts>
      <TitleFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </TitleFont>
      <LabelFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LabelFont>
      <ValuesFont>
       <Name>Arial</Name>
       <Height>10</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </ValuesFont>
      <LegendFont>
       <Name>Arial</Name>
       <Height>12</Height>
       <PitchFamily>34</PitchFamily>
       <Weight>400</Weight>
       <Italic>0</Italic>
       <UnderLine>0</UnderLine>
       <StrikeOut>0</StrikeOut>
       <Color>0</Color>
      </LegendFont>
     </Fonts>
     <SharedXAxis>true</SharedXAxis>
     <SharedYAxis>true</SharedYAxis>
     <SharedZAxis>false</SharedZAxis>
     <XAxes>
      <Axis>
       <Minimum>0.0</Minimum>
       <Maximum>10.0</Maximum>
       <Linear>true</Linear>
       <Scaling>3</Scaling>
       <Label>time</Label>
      </Axis>
     </XAxes>
     <YAxes>
      <Axis>
       <Minimum>-1.0</Minimum>
       <Maximum>1.0</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>position[1]</Label>
      </Axis>
      <Axis>
       <Minimum>-0.5</Minimum>
       <Maximum>0.5</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>position[2]</Label>
      </Axis>
      <Axis>
       <Minimum>-0.5</Minimum>
       <Maximum>0.5</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>position[3]</Label>
      </Axis>
      <Axis>
       <Minimum>-0.5</Minimum>
       <Maximum>0.5</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>rotation[1]</Label>
      </Axis>
      <Axis>
       <Minimum>-0.5</Minimum>
       <Maximum>0.5</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>rotation[2]</Label>
      </Axis>
      <Axis>
       <Minimum>-0.5</Minimum>
       <Maximum>0.5</Maximum>
       <Linear>true</Linear>
       <Scaling>2</Scaling>
       <Label>rotation[3]</Label>
      </Axis>
     </YAxes>
     <ZAxes>
     </ZAxes>
     <Curves>
      <Curve>
       <LineColor>3355111</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>3355111</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Submodel7\position[1]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>6076255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>6076255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Submodel7\position[2]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>12553035</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>12553035</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Submodel7\position[3]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>15086320</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>15086320</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Submodel7\rotation[1]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>15790150</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>15790150</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Submodel7\rotation[2]</VarName>
       </YCurveData>
      </Curve>
      <Curve>
       <LineColor>1696255</LineColor>
       <LineStyle>1</LineStyle>
       <TickColor>1696255</TickColor>
       <TickStyle>0</TickStyle>
       <CurveVisible>true</CurveVisible>
       <PixelThresshold>1</PixelThresshold>
       <LineThickness>1</LineThickness>
       <LineOrder>1</LineOrder>
       <ShowYValues>true</ShowYValues>
       <XCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>time</VarName>
       </XCurveData>
       <YCurveData>
        <ShowUnit>true</ShowUnit>
        <VarName>Submodel7\rotation[3]</VarName>
       </YCurveData>
      </Curve>
     </Curves>
     <Legenda>
      <ShowLegenda>true</ShowLegenda>
      <BorderPenColor>0</BorderPenColor>
      <BackgroundColor>16777215</BackgroundColor>
     </Legenda>
    </Plot>
    <Plot>
     <PlotType>D3DPlot</PlotType>
     <BasePlot>
       <PlotId>2</PlotId>
       <UseWindowsBGColor>false</UseWindowsBGColor>
       <BGColor>16777215</BGColor>
       <PlotIsVisible>true</PlotIsVisible>
     </BasePlot>
     <PlotTitle>3D Animation</PlotTitle>
     <RenderQuality>137</RenderQuality>
     <ShowGrid>true</ShowGrid>
     <ShowFPS>false</ShowFPS>
     <BackgroundColor>4294967295</BackgroundColor>
     <SceneBackgroundImage>Gradients\BlueWhite.png</SceneBackgroundImage>
     <ApplyTextureBackground>true</ApplyTextureBackground>
     <FrameScale>1.0</FrameScale>
     <FrameThickness>1.0</FrameThickness>
     <MainFrame>
      <Frame>
       <ScaleValue>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </ScaleValue>
       <ShowReferenceFrame>true</ShowReferenceFrame>
       <Name>Reference Frame</Name>
       <Position>
       </Position>
       <Orientation>
        <Angles>
        </Angles>
        <OrientationType>Bryant</OrientationType>
       </Orientation>
       <LockX>false</LockX>
       <LockY>false</LockY>
       <LockZ>false</LockZ>
       <LockXPitch>false</LockXPitch>
       <LockYYaw>false</LockYYaw>
       <LockZRoll>false</LockZRoll>
       <Childs>
        <Frame>
         <ScaleValue>
     <X>
      <Value>1</Value>
     </X>
     <Y>
      <Value>1</Value>
     </Y>
     <Z>
      <Value>1</Value>
     </Z>
         </ScaleValue>
         <ShowReferenceFrame>false</ShowReferenceFrame>
         <Name>Default Lights and Cameras</Name>
         <Position>
         </Position>
         <Orientation>
     <Angles>
     </Angles>
     <OrientationType>Bryant</OrientationType>
         </Orientation>
         <LockX>false</LockX>
         <LockY>false</LockY>
         <LockZ>false</LockZ>
         <LockXPitch>false</LockXPitch>
         <LockYYaw>false</LockYYaw>
         <LockZRoll>false</LockZRoll>
         <Childs>
     <Light>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Ambient</Name>
      <Position>
      </Position>
      <Orientation>
       <ZAxis>
        <Z>
         <Value>1</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <Y>
         <Value>1</Value>
        </Y>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <LightType>0</LightType>
      <LightColor>
       <Color>
        <X>
         <Value>0.3</Value>
        </X>
        <Y>
         <Value>0.3</Value>
        </Y>
        <Z>
         <Value>0.3</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </LightColor>
      <AmbientLight>
       <Color>
        <X>
         <Value>0.3</Value>
        </X>
        <Y>
         <Value>0.3</Value>
        </Y>
        <Z>
         <Value>0.3</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </AmbientLight>
      <AmbientOn>true</AmbientOn>
      <DiffuseOn>false</DiffuseOn>
      <SpecularOn>false</SpecularOn>
     </Light>
     <Light>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Parallel</Name>
      <Position>
       <X>
        <Value>-3</Value>
       </X>
       <Y>
        <Value>5</Value>
       </Y>
       <Z>
        <Value>3</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>0.457495710997814</Value>
        </X>
        <Y>
         <Value>-0.762492851663023</Value>
        </Y>
        <Z>
         <Value>-0.457495710997814</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <Value>0.235379601434674</Value>
        </X>
        <Y>
         <Value>-0.392299335724456</Value>
        </Y>
        <Z>
         <Value>0.889211827642101</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <LightType>3</LightType>
      <LightColor>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </LightColor>
      <Attenuation>
       <Constant>
        <Value>1.0</Value>
       </Constant>
       <Linear>
        <Value>0.0</Value>
       </Linear>
       <Quadratic>
        <Value>0.0</Value>
       </Quadratic>
      </Attenuation>
      <DiffuseLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </DiffuseLight>
      <SpecularLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </SpecularLight>
      <AmbientOn>false</AmbientOn>
      <DiffuseOn>true</DiffuseOn>
      <SpecularOn>true</SpecularOn>
     </Light>
     <Light>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Spot Light 1</Name>
      <Position>
       <X>
        <Value>-3</Value>
       </X>
       <Y>
        <Value>-5</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>0.50709255283711</Value>
        </X>
        <Y>
         <Value>0.845154254728517</Value>
        </Y>
        <Z>
         <Value>-0.169030850945703</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <Value>0.0869656553478673</Value>
        </X>
        <Y>
         <Value>0.144942758913112</Value>
        </Y>
        <Z>
         <Value>0.985610760609162</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <LightType>2</LightType>
      <LightColor>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </LightColor>
      <Attenuation>
       <Constant>
        <Value>1.0</Value>
       </Constant>
       <Linear>
        <Value>0.05</Value>
       </Linear>
       <Quadratic>
        <Value>0.05</Value>
       </Quadratic>
      </Attenuation>
      <Umbra>
       <Value>1.0471975511965976</Value>
      </Umbra>
      <Penumbra>
       <Value>1.0471975511965976</Value>
      </Penumbra>
      <SpotExponent>0.0</SpotExponent>
      <DiffuseLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </DiffuseLight>
      <SpecularLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </SpecularLight>
      <AmbientOn>false</AmbientOn>
      <DiffuseOn>true</DiffuseOn>
      <SpecularOn>true</SpecularOn>
     </Light>
     <Light>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Spot Light 2</Name>
      <Position>
       <X>
        <Value>2</Value>
       </X>
       <Y>
        <Value>-3</Value>
       </Y>
       <Z>
        <Value>-1</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>-0.534522483824849</Value>
        </X>
        <Y>
         <Value>0.801783725737273</Value>
        </Y>
        <Z>
         <Value>0.267261241912424</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <Value>0.14824986333222</Value>
        </X>
        <Y>
         <Value>-0.22237479499833</Value>
        </Y>
        <Z>
         <Value>0.963624111659432</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <LightType>2</LightType>
      <LightColor>
       <Color>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </LightColor>
      <Attenuation>
       <Constant>
        <Value>1.0</Value>
       </Constant>
       <Linear>
        <Value>0.05</Value>
       </Linear>
       <Quadratic>
        <Value>0.05</Value>
       </Quadratic>
      </Attenuation>
      <Umbra>
       <Value>1.5707963267948966</Value>
      </Umbra>
      <Penumbra>
       <Value>1.5707963267948966</Value>
      </Penumbra>
      <SpotExponent>0.0</SpotExponent>
      <DiffuseLight>
       <Color>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </DiffuseLight>
      <SpecularLight>
       <Color>
        <X>
         <Value>0.5</Value>
        </X>
        <Y>
         <Value>0.5</Value>
        </Y>
        <Z>
         <Value>0.5</Value>
        </Z>
       </Color>
       <Offset>
       </Offset>
       <Multipliers>
        <X>
         <Value>1</Value>
        </X>
        <Y>
         <Value>1</Value>
        </Y>
        <Z>
         <Value>1</Value>
        </Z>
       </Multipliers>
       <Direct3DColorRange>true</Direct3DColorRange>
      </SpecularLight>
      <AmbientOn>false</AmbientOn>
      <DiffuseOn>true</DiffuseOn>
      <SpecularOn>true</SpecularOn>
     </Light>
     <Camera>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Camera Looking at Origin</Name>
      <Position>
       <X>
        <Value>8</Value>
       </X>
       <Y>
        <Value>4</Value>
       </Y>
       <Z>
        <Value>4</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>-0.816496580927726</Value>
        </X>
        <Y>
         <Value>-0.408248290463863</Value>
        </Y>
        <Z>
         <Value>-0.408248290463863</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <X>
         <Value>-0.365148371670111</Value>
        </X>
        <Y>
         <Value>-0.182574185835055</Value>
        </Y>
        <Z>
         <Value>0.912870929175277</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <FrontPlane>0.01</FrontPlane>
      <BackPlane>100.0</BackPlane>
      <AutoFrontBack>true</AutoFrontBack>
      <Field>0.003926990816987242</Field>
      <Fieldy>45.0</Fieldy>
      <PlaneLeft>-10.0</PlaneLeft>
      <PlaneRight>10.0</PlaneRight>
      <PlaneTop>10.0</PlaneTop>
      <PlaneBottom>-10.0</PlaneBottom>
      <UseLookatPosition>true</UseLookatPosition>
      <LookatPosition>
      </LookatPosition>
      <UseAlwaysLookUp>true</UseAlwaysLookUp>
      <LookUpVector>
       <Z>
        <Value>1</Value>
       </Z>
      </LookUpVector>
      <RightHand>true</RightHand>
      <Perspective>true</Perspective>
      <IsSelectedCamera>true</IsSelectedCamera>
     </Camera>
     <Camera>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Front(XY)-Camera</Name>
      <Position>
       <Z>
        <Value>10</Value>
       </Z>
      </Position>
      <Orientation>
       <ZAxis>
        <Z>
         <Value>-1</Value>
        </Z>
       </ZAxis>
       <YAxis>
        <Y>
         <Value>1</Value>
        </Y>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <FrontPlane>0.01</FrontPlane>
      <BackPlane>100.0</BackPlane>
      <AutoFrontBack>true</AutoFrontBack>
      <Field>9.999999999999998</Field>
      <Fieldy>45.0</Fieldy>
      <PlaneLeft>-9.999999999999998</PlaneLeft>
      <PlaneRight>9.999999999999998</PlaneRight>
      <PlaneTop>9.999999999999998</PlaneTop>
      <PlaneBottom>-9.999999999999998</PlaneBottom>
      <UseLookatPosition>true</UseLookatPosition>
      <LookatPosition>
      </LookatPosition>
      <UseAlwaysLookUp>true</UseAlwaysLookUp>
      <LookUpVector>
       <Y>
        <Value>1</Value>
       </Y>
      </LookUpVector>
      <RightHand>true</RightHand>
      <Perspective>false</Perspective>
      <IsSelectedCamera>false</IsSelectedCamera>
     </Camera>
     <Camera>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Side(YZ)-Camera</Name>
      <Position>
       <X>
        <Value>10</Value>
       </X>
      </Position>
      <Orientation>
       <ZAxis>
        <X>
         <Value>-1</Value>
        </X>
       </ZAxis>
       <YAxis>
        <Z>
         <Value>1</Value>
        </Z>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <FrontPlane>0.01</FrontPlane>
      <BackPlane>100.0</BackPlane>
      <AutoFrontBack>true</AutoFrontBack>
      <Field>9.999999999999998</Field>
      <Fieldy>45.0</Fieldy>
      <PlaneLeft>-9.999999999999998</PlaneLeft>
      <PlaneRight>9.999999999999998</PlaneRight>
      <PlaneTop>9.999999999999998</PlaneTop>
      <PlaneBottom>-9.999999999999998</PlaneBottom>
      <UseLookatPosition>true</UseLookatPosition>
      <LookatPosition>
      </LookatPosition>
      <UseAlwaysLookUp>true</UseAlwaysLookUp>
      <LookUpVector>
       <Z>
        <Value>1</Value>
       </Z>
      </LookUpVector>
      <RightHand>true</RightHand>
      <Perspective>false</Perspective>
      <IsSelectedCamera>false</IsSelectedCamera>
     </Camera>
     <Camera>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Top(XZ)-Camera</Name>
      <Position>
       <Y>
        <Value>10</Value>
       </Y>
      </Position>
      <Orientation>
       <ZAxis>
        <Y>
         <Value>-1</Value>
        </Y>
       </ZAxis>
       <YAxis>
        <X>
         <Value>1</Value>
        </X>
       </YAxis>
       <OrientationType>Direct3D</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
      <FrontPlane>0.01</FrontPlane>
      <BackPlane>100.0</BackPlane>
      <AutoFrontBack>true</AutoFrontBack>
      <Field>9.999999999999998</Field>
      <Fieldy>45.0</Fieldy>
      <PlaneLeft>-9.999999999999998</PlaneLeft>
      <PlaneRight>9.999999999999998</PlaneRight>
      <PlaneTop>9.999999999999998</PlaneTop>
      <PlaneBottom>-9.999999999999998</PlaneBottom>
      <UseLookatPosition>true</UseLookatPosition>
      <LookatPosition>
      </LookatPosition>
      <UseAlwaysLookUp>true</UseAlwaysLookUp>
      <LookUpVector>
       <X>
        <Value>1</Value>
       </X>
      </LookUpVector>
      <RightHand>true</RightHand>
      <Perspective>false</Perspective>
      <IsSelectedCamera>false</IsSelectedCamera>
     </Camera>
         </Childs>
        </Frame>
        <Frame>
         <ScaleValue>
     <X>
      <Value>1</Value>
     </X>
     <Y>
      <Value>1</Value>
     </Y>
     <Z>
      <Value>1</Value>
     </Z>
         </ScaleValue>
         <ShowReferenceFrame>false</ShowReferenceFrame>
         <Name>Scenery</Name>
         <Position>
         </Position>
         <Orientation>
     <Angles>
     </Angles>
     <OrientationType>Bryant</OrientationType>
         </Orientation>
         <LockX>false</LockX>
         <LockY>false</LockY>
         <LockZ>false</LockZ>
         <LockXPitch>false</LockXPitch>
         <LockYYaw>false</LockYYaw>
         <LockZRoll>false</LockZRoll>
         <Childs>
     <Cube>
      <Center>Center</Center>
      <RibLength>1.0</RibLength>
      <ShowInnerSide>true</ShowInnerSide>
      <Accuracy>4</Accuracy>
      <ScaleValue>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </ScaleValue>
      <OverrideColor>true</OverrideColor>
      <MeshColor>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColor>
      <Alpha>1.0</Alpha>
      <MeshColorMultipliers>
       <X>
        <Value>1</Value>
       </X>
       <Y>
        <Value>1</Value>
       </Y>
       <Z>
        <Value>1</Value>
       </Z>
      </MeshColorMultipliers>
      <MeshColorOffsets>
      </MeshColorOffsets>
      <Direct3DColorRange>true</Direct3DColorRange>
      <SpecularColor>
       <X>
        <Value>0.5</Value>
       </X>
       <Y>
        <Value>0.5</Value>
       </Y>
       <Z>
        <Value>0.5</Value>
       </Z>
      </SpecularColor>
      <EmissiveColor>
      </EmissiveColor>
      <ShininessPower>
       <Value>15</Value>
      </ShininessPower>
      <OverrideQuality>false</OverrideQuality>
      <ShowReferenceFrame>false</ShowReferenceFrame>
      <Name>Block</Name>
      <Position>
      </Position>
      <Orientation>
       <Angles>
       </Angles>
       <OrientationType>Bryant</OrientationType>
      </Orientation>
      <LockX>false</LockX>
      <LockY>false</LockY>
      <LockZ>false</LockZ>
      <LockXPitch>false</LockXPitch>
      <LockYYaw>false</LockYYaw>
      <LockZRoll>false</LockZRoll>
      <Childs>
      </Childs>
     </Cube>
         </Childs>
        </Frame>
       </Childs>
      </Frame>
     </MainFrame>
    </Plot>
   </Plots>
   <PlotPanels>
    <PlotPanel>
     <PlotPanelId>1</PlotPanelId>
     <PlotPanelVisible>true</PlotPanelVisible>
     <Name>Window 1</Name>
     <Tiling>0</Tiling>
     <PlotIds>
       <PlotId>1</PlotId>
     </PlotIds>
     <ToggleState>Base</ToggleState>
    </PlotPanel>
    <PlotPanel>
     <PlotPanelId>2</PlotPanelId>
     <PlotPanelVisible>false</PlotPanelVisible>
     <Name>Window 2</Name>
     <Tiling>0</Tiling>
     <PlotIds>
       <PlotId>2</PlotId>
     </PlotIds>
     <ToggleState>Base</ToggleState>
    </PlotPanel>
   </PlotPanels>
   <WindowRectangles virtualDesktopWidth="5760" virtualDesktopHeight="1080">
     <WindowRectangle monitor="0" left="0" top="0" right="1920" bottom="1080" plotpanelid="2">
0.330208 0.32963 0.669792 0.67037
     </WindowRectangle>
     <WindowRectangle monitor="2" left="1920" top="0" right="3840" bottom="1080" plotpanelid="1">
0.133333 0.00462963 0.895833 0.776852
     </WindowRectangle>
   </WindowRectangles>
  </PlotSpecs>
  <RunSpecs>
   <SimulatorSettings>
    <StartTime>0.0</StartTime>
    <FinishTime>10.0</FinishTime>
    <AllowPassFinishTime>false</AllowPassFinishTime>
    <Warp>true</Warp>
    <FPGonio>false</FPGonio>
    <UseOutputAfterEach>false</UseOutputAfterEach>
    <OutputAfterEach>0.1</OutputAfterEach>
    <EventEpsilon>1.0e-6</EventEpsilon>
    <AlgebraicTolerance>1.0e-7</AlgebraicTolerance>
    <SteadyStateAnalysis>false</SteadyStateAnalysis>
    <UpdateHoldInstructions>true</UpdateHoldInstructions>
   </SimulatorSettings>
   <IntegrationMethods>
    <IntegrationMethod>
     <Name>Euler</Name>
     <StepSize>0.01</StepSize>
     <AutoStepSize>false</AutoStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>BackwardEuler</Name>
     <AbsoluteTolerance>1.0e-5</AbsoluteTolerance>
     <RelativeTolerance>1.0e-5</RelativeTolerance>
     <AlgebraicAbsoluteTolerance>1.0e-5</AlgebraicAbsoluteTolerance>
     <AlgebraicRelativeTolerance>1.0e-5</AlgebraicRelativeTolerance>
     <StepSize>0.01</StepSize>
     <Alpha>1.0</Alpha>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>AdamsBashforth</Name>
     <StepSize>0.01</StepSize>
     <AutoStepSize>false</AutoStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>RungeKutta2</Name>
     <StepSize>0.01</StepSize>
     <AutoStepSize>false</AutoStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>RungeKutta4</Name>
     <StepSize>0.01</StepSize>
     <AutoStepSize>false</AutoStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>RungeKutta8</Name>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
     <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
     <RelativeTolerance>1.0e-6</RelativeTolerance>
     <SafetyFactor>0.9</SafetyFactor>
     <Factor1>0.33</Factor1>
     <Factor2>6.0</Factor2>
     <Beta>0.0</Beta>
     <UseMaxNrSteps>false</UseMaxNrSteps>
     <MaxNrSteps>100000</MaxNrSteps>
     <UseStiffDetection>false</UseStiffDetection>
     <MaxNrStiffnessSteps>1000</MaxNrStiffnessSteps>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>RungeKuttaFehlberg</Name>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
     <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
     <RelativeTolerance>1.0e-6</RelativeTolerance>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>VodeAdams</Name>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
     <AbsoluteTolerance>1.0e-6</AbsoluteTolerance>
     <RelativeTolerance>1.0e-6</RelativeTolerance>
     <VodeUseBDF>true</VodeUseBDF>
     <VodeUseNewton>true</VodeUseNewton>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>BDFMethod</Name>
     <AbsoluteTolerance>1.0e-5</AbsoluteTolerance>
     <RelativeTolerance>1.0e-5</RelativeTolerance>
     <AlgebraicAbsoluteTolerance>1.0e-5</AlgebraicAbsoluteTolerance>
     <AlgebraicRelativeTolerance>1.0e-5</AlgebraicRelativeTolerance>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
    </IntegrationMethod>
    <IntegrationMethod>
     <Name>MeBDFiMethod</Name>
     <AbsoluteTolerance>1.0e-5</AbsoluteTolerance>
     <RelativeTolerance>1.0e-5</RelativeTolerance>
     <AlgebraicAbsoluteTolerance>1.0e-5</AlgebraicAbsoluteTolerance>
     <AlgebraicRelativeTolerance>1.0e-5</AlgebraicRelativeTolerance>
     <UseInitialStepSize>false</UseInitialStepSize>
     <InitialStepSize>0.0</InitialStepSize>
     <UseMaximumStepSize>false</UseMaximumStepSize>
     <MaximumStepSize>0.0</MaximumStepSize>
    </IntegrationMethod>
    <SelectedIntegrationMethod>7</SelectedIntegrationMethod>
   </IntegrationMethods>
  </RunSpecs>
  <MultipleRun>
   <NrSteps>10</NrSteps>
   <CopyFromStates>false</CopyFromStates>
   <JoinParameterVariation>true</JoinParameterVariation>
   <ClearAfterRun>true</ClearAfterRun>
   <RedrawAfterRun>false</RedrawAfterRun>
   <DrawDuringSimulation>true</DrawDuringSimulation>
   <ActionBeforeOptimization>0</ActionBeforeOptimization>
   <CompareValue>0.0</CompareValue>
   <UseCompareValue>true</UseCompareValue>
   <MultipleRunType>MultipleRun</MultipleRunType>
   <Minimize>true</Minimize>
   <OptimizationVariable></OptimizationVariable>
   <ResulVarUsage>UseEndValue</ResulVarUsage>
   <Tolerance>0.001</Tolerance>
   <OptimizationMethod>BroydonFletcherGoldfarbShanno</OptimizationMethod>
   <MultipleRunVariables>
   </MultipleRunVariables>
  </MultipleRun>
  <ExportData>
   <WriteAsText>true</WriteAsText>
   <ReadAsText>true</ReadAsText>
   <WriteHeader>true</WriteHeader>
   <ReadHeader>true</ReadHeader>
   <ReadFilename></ReadFilename>
   <WriteFilename></WriteFilename>
   <DoWrite>false</DoWrite>
   <ExportVariables>
   </ExportVariables>
   <ImportVariables>
   </ImportVariables>
  </ExportData>
  <BreakPoints>
  </BreakPoints>
  <AnimationPlayback>
   <PlaybackSpeed>1.0</PlaybackSpeed>
  </AnimationPlayback>
</ExpData>
  </Experiment>
</Experiments>
</Document>
