Skip to content

Commit

Permalink
[iss-227]
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit b6edf17
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Thu Jun 1 11:08:33 2023 -0300

    Remove working tests from test-suite.

commit 53548f9
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Thu Jun 1 11:06:39 2023 -0300

    Added new system tests for mmoc.

commit 8fefb8c
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Thu Jun 1 11:06:03 2023 -0300

    Added new system tests GT files for mmoc.

commit 21bfee7
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Thu Jun 1 11:03:37 2023 -0300

    Added new tests for engine.

commit 4437b42
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Thu Jun 1 11:02:53 2023 -0300

    Added new engine system tests.
  • Loading branch information
joaquinffernandez committed Jun 1, 2023
1 parent 8821b35 commit 6441618
Show file tree
Hide file tree
Showing 55 changed files with 30,081 additions and 2,923 deletions.
70 changes: 70 additions & 0 deletions src/engine/tests/system/gt_data/BouncingBall/BouncingBall.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
model BouncingBall
Real spring1_flange1_f;
Real spring1_flange1_s;
Real spring1_flange1_v;
Real spring1_flange2_f;
Real spring1_flange2_s;
Real spring1_flange2_v;
Real spring1_dy;
Real spring1_dv;
parameter Real spring1_b=10;
parameter Real spring1_k=10000;
Real fixed1_flange1_f;
Real fixed1_flange1_s;
Real fixed1_flange1_v;
parameter Real fixed1_s0=0;
Real ball1_flange1_f;
Real ball1_flange1_s;
Real ball1_flange1_v;
Real ball1_v;
parameter Real ball1_m=1;
parameter Real ball1_g=9.8;
Real ball1_y(start=10);
discrete Real d0;
discrete Real d1;
equation
fixed1_flange1_s = fixed1_s0;
fixed1_flange1_v = 0;
der(ball1_y) = ball1_v;
ball1_flange1_v = ball1_v;
ball1_flange1_s = ball1_y;
spring1_flange2_s = fixed1_flange1_s;
spring1_flange2_v = fixed1_flange1_v;
spring1_flange1_s = ball1_flange1_s;
spring1_flange1_v = ball1_flange1_v;
spring1_dv = spring1_flange1_v-spring1_flange2_v;
spring1_dy = spring1_flange1_s-spring1_flange2_s;
spring1_flange1_f = d0*(spring1_b*spring1_dv+spring1_k*spring1_dy)+(1-d0)*(0);
spring1_flange2_f = (((-spring1_flange1_f)));
ball1_flange1_f = (-spring1_flange1_f);
der(ball1_v) = (ball1_flange1_f-ball1_m*ball1_g)*(1/(ball1_m));
fixed1_flange1_f = (-spring1_flange2_f);
algorithm
when spring1_dy<0 then
d0:=1;
elsewhen spring1_dy>=0 then
d0:=0;
end when;
when d0>0 then
d1:=1;
elsewhen d0<1 then
d1:=0;
end when;
annotation(
experiment(
MMO_Description="",
MMO_Solver=LIQSS3,
MMO_SymDiff=false,
MMO_PartitionMethod=Metis,
MMO_Output={ball1_y},
MMO_OutputType=CI_Sampled,
Jacobian=Dense,
MMO_BDF_PDepth=1,
MMO_BDF_Max_Step=0,
StartTime=0.0,
StopTime=10,
Tolerance={1e-3},
AbsTolerance={1e-6}
));
end BouncingBall;
Loading

0 comments on commit 6441618

Please sign in to comment.