@@ -32,7 +32,7 @@ const FMU_DIR = joinpath(@__DIR__, "fmus")
32
32
@testset " v2, CS" begin
33
33
fmu = loadFMU (" SpringPendulum1D" , " Dymola" , " 2022x" ; type = :CS )
34
34
@named inner = MTK. FMIComponent (
35
- Val (2 ); fmu, communication_step_size = 0.001 , type = :CS )
35
+ Val (2 ); fmu, communication_step_size = 1e-5 , type = :CS )
36
36
@variables x (t) = 1.0
37
37
@mtkbuild sys = ODESystem ([D (x) ~ x], t; systems = [inner])
38
38
test_no_inputs_outputs (sys)
@@ -66,7 +66,7 @@ const FMU_DIR = joinpath(@__DIR__, "fmus")
66
66
@testset " v3, CS" begin
67
67
fmu = loadFMU (" SpringPendulum1D" , " Dymola" , " 2023x" , " 3.0" ; type = :CS )
68
68
@named inner = MTK. FMIComponent (
69
- Val (3 ); fmu, communication_step_size = 0.001 , type = :CS )
69
+ Val (3 ); fmu, communication_step_size = 1e-5 , type = :CS )
70
70
@variables x (t) = 1.0
71
71
@mtkbuild sys = ODESystem ([D (x) ~ x], t; systems = [inner])
72
72
test_no_inputs_outputs (sys)
210
210
@testset " v3, CS" begin
211
211
fmu = loadFMU (joinpath (FMU_DIR, " StateSpace.fmu" ); type = :CS )
212
212
@named sspace = MTK. FMIComponent (
213
- Val (3 ); fmu, communication_step_size = 1e-4 , type = :CS ,
213
+ Val (3 ); fmu, communication_step_size = 1e-6 , type = :CS ,
214
214
reinitializealg = BrownFullBasicInit ())
215
215
@test MTK. isinput (sspace. u)
216
216
@test MTK. isoutput (sspace. y)
259
259
@testset " v2, CS" begin
260
260
fmu = loadFMU (joinpath (FMU_DIR, " SimpleAdder.fmu" ); type = :CS )
261
261
@named adder1 = MTK. FMIComponent (
262
- Val (2 ); fmu, type = :CS , communication_step_size = 1e-3 )
262
+ Val (2 ); fmu, type = :CS , communication_step_size = 1e-5 )
263
263
@named adder2 = MTK. FMIComponent (
264
- Val (2 ); fmu, type = :CS , communication_step_size = 1e-3 )
264
+ Val (2 ); fmu, type = :CS , communication_step_size = 1e-5 )
265
265
sys, prob = build_looped_adders (adder1, adder2)
266
266
sol = solve (prob,
267
267
Tsit5 ();
300
300
@testset " v3, CS" begin
301
301
fmu = loadFMU (joinpath (FMU_DIR, " StateSpace.fmu" ); type = :CS )
302
302
@named sspace1 = MTK. FMIComponent (
303
- Val (3 ); fmu, type = :CS , communication_step_size = 1e-4 )
303
+ Val (3 ); fmu, type = :CS , communication_step_size = 1e-5 )
304
304
@named sspace2 = MTK. FMIComponent (
305
- Val (3 ); fmu, type = :CS , communication_step_size = 1e-4 )
305
+ Val (3 ); fmu, type = :CS , communication_step_size = 1e-5 )
306
306
sys, prob = build_looped_sspace (sspace1, sspace2)
307
307
sol = solve (prob, Rodas5P (autodiff = false ); reltol = 1e-8 )
308
308
@test SciMLBase. successful_retcode (sol)
0 commit comments