Skip to content

Commit 3c0bf3b

Browse files
committed
Update fmi4c (#1352)
1 parent e8c5d99 commit 3c0bf3b

3 files changed

Lines changed: 78 additions & 2 deletions

File tree

testsuite/AircraftVehicleDemonstrator/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ TEST = ../rtest -v
22

33
TESTFILES = \
44
AircraftVehicleDemonstrator.lua \
5-
embrace.py \
65
embrace_test2Conf.py \
6+
embrace.lua \
7+
embrace.py \
78

89
# Run make failingtest
910
FAILINGTESTFILES = \
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
-- status: correct
2+
-- teardown_command: rm -rf embrace-lua/
3+
-- linux: yes
4+
-- mingw32: no
5+
-- mingw64: no
6+
-- win: no
7+
-- mac: no
8+
9+
oms_setCommandLineOption("--suppressPath=true --wallTime=true --ignoreInitialUnknowns=false")
10+
oms_setTempDirectory("./embrace-lua/")
11+
oms_setWorkingDirectory("./embrace-lua/")
12+
13+
oms_importFile("../../resources/embrace.ssp")
14+
oms_addSubModel("embrace.root.BC", "../../resources/CONOPS.csv")
15+
16+
------------------- Connections to BC files -----------------
17+
--BC -> Consumer
18+
oms_addConnection("embrace.root.Consumer.Alt", "embrace.root.BC.Alt")
19+
oms_addConnection("embrace.root.Consumer.Mach", "embrace.root.BC.Mach")
20+
oms_addConnection("embrace.root.Consumer.heatLoad", "embrace.root.BC.heatLoad")
21+
22+
--BC -> ECS_HW
23+
oms_addConnection("embrace.root.ECS_HW.Alt", "embrace.root.BC.Alt")
24+
oms_addConnection("embrace.root.ECS_HW.Mach", "embrace.root.BC.Mach")
25+
26+
--BC -> ECS_SW
27+
oms_addConnection("embrace.root.BC.Aircraft_state", "embrace.root.AdaptionUnit.Aircraft_State")
28+
29+
--BC -> Atmos
30+
oms_addConnection("embrace.root.Atmos.Alt", "embrace.root.BC.Alt")
31+
oms_addConnection("embrace.root.Atmos.Ma", "embrace.root.BC.Mach")
32+
-------------------------------------------------------------
33+
34+
--set params
35+
oms_setReal("embrace.root.ECS_HW.eCS.MaxCoolPower.k", 5)
36+
oms_setInteger("embrace.root.ECS_HW.coolinPackAir.looptype", 2)
37+
oms_setInteger("embrace.root.ECS_HW.phSrc.looptype", 2)
38+
oms_setInteger("embrace.root.ECS_HW.pipeB.looptype", 2)
39+
oms_setInteger("embrace.root.ECS_HW.pipeA.looptype", 2)
40+
41+
--simulation settings
42+
oms_setResultFile("embrace", "sim_results.mat")
43+
oms_setStopTime("embrace", 12)
44+
oms_setFixedStepSize("embrace", 1e-3)
45+
oms_setLoggingInterval("embrace", 1)
46+
oms_exportDependencyGraphs("embrace.root", "init.dot", "event.dot", "simulation.dot")
47+
48+
oms_instantiate("embrace")
49+
oms_initialize("embrace")
50+
print("info: Initialize:")
51+
print("info: embrace.root.ECS_HW.coolinPackAir.looptype: " .. oms_getInteger("embrace.root.ECS_HW.coolinPackAir.looptype"))
52+
print("info: embrace.root.ECS_HW.eCS.MaxCoolPower.k : " .. oms_getReal("embrace.root.ECS_HW.eCS.MaxCoolPower.k"))
53+
print("info: embrace.root.ECS_HW.pipeC.L : " .. oms_getReal("embrace.root.ECS_HW.pipeC.L"))
54+
print("info: embrace.root.ECS_HW.pipeB.L : " .. oms_getReal("embrace.root.ECS_HW.pipeB.L"))
55+
print("info: embrace.root.ECS_HW.pipeA.L : " .. oms_getReal("embrace.root.ECS_HW.pipeA.L"))
56+
57+
oms_simulate("embrace")
58+
oms_terminate("embrace")
59+
oms_delete("embrace")
60+
61+
-- Result:
62+
-- warning: invalid "SystemStructureDescription" detected in file "../../resources/embrace.ssp" at line: 17 column: 26, missing required attribute 'name'
63+
-- warning: "SystemStructureDescription" does not conform to the SSP standard schema
64+
-- warning: invalid "SystemStructureParameterValues" detected in file "resources/RAPID_Systems_2021-03-29_Test_1.ssv" at line: 3 column: 10, element 'Units' must be qualified
65+
-- warning: "SystemStructureParameterValues" does not conform to the SSP standard schema
66+
-- info: Result file: sim_results.mat (bufferSize=1)
67+
-- info: Initialize:
68+
-- info: embrace.root.ECS_HW.coolinPackAir.looptype: 2
69+
-- info: embrace.root.ECS_HW.eCS.MaxCoolPower.k : 5.0
70+
-- info: embrace.root.ECS_HW.pipeC.L : 1.0
71+
-- info: embrace.root.ECS_HW.pipeB.L : 0.976535328081166
72+
-- info: embrace.root.ECS_HW.pipeA.L : 0.976535328081166
73+
-- info: 4 warnings
74+
-- info: 0 errors
75+
-- endResult

0 commit comments

Comments
 (0)