|
| 1 | +-- status: correct |
| 2 | +-- teardown_command: rm -rf Feedthrough-lua/ |
| 3 | +-- linux: yes |
| 4 | +-- ucrt64: yes |
| 5 | +-- win: yes |
| 6 | +-- mac: yes |
| 7 | +-- asan: yes |
| 8 | + |
| 9 | +oms_setCommandLineOption("--suppressPath=true") |
| 10 | +oms_setTempDirectory("./Feedthrough-lua/") |
| 11 | +oms_setWorkingDirectory("./Feedthrough-lua/") |
| 12 | + |
| 13 | +oms_newModel("model") |
| 14 | +oms_addSystem("model.root", oms_system_wc) |
| 15 | + |
| 16 | +oms_addSubModel("model.root.Feedthrough", "../../resources/Feedthrough.fmu") |
| 17 | + |
| 18 | +oms_setResultFile("model", "Feedthrough-cs.mat") |
| 19 | +oms_setStopTime("model", 10.0) |
| 20 | +oms_setTolerance("model.root", 1e-5, 1e-5) |
| 21 | + |
| 22 | +oms_instantiate("model") |
| 23 | +oms_setBoolean("model.root.Feedthrough.Boolean_input", true) |
| 24 | +oms_setInteger("model.root.Feedthrough.Enumeration_input", 2) |
| 25 | +oms_setReal("model.root.Feedthrough.Float64_continuous_input", 3.1) |
| 26 | +oms_setReal("model.root.Feedthrough.Float64_discrete_input", 4.2) |
| 27 | +oms_setInteger("model.root.Feedthrough.Int32_input", 5) |
| 28 | + |
| 29 | +oms_initialize("model") |
| 30 | +oms_simulate("model") |
| 31 | +print("info: Feedthrough.Boolean_output: " .. oms_getBoolean("model.root.Feedthrough.Boolean_output")) |
| 32 | +print("info: Feedthrough.Enumeration_output: " .. oms_getInteger("model.root.Feedthrough.Enumeration_output")) |
| 33 | +print("info: Feedthrough.Float64_continuous_output: " .. oms_getReal("model.root.Feedthrough.Float64_continuous_output")) |
| 34 | +print("info: Feedthrough.Float64_discrete_output: " .. oms_getReal("model.root.Feedthrough.Float64_discrete_output")) |
| 35 | +print("info: Feedthrough.Int32_output: " .. oms_getInteger("model.root.Feedthrough.Int32_output")) |
| 36 | + |
| 37 | +oms_terminate("model") |
| 38 | +oms_delete("model") |
| 39 | + |
| 40 | +oms_newModel("model") |
| 41 | +oms_addSystem("model.root", oms_system_sc) |
| 42 | + |
| 43 | +oms_addSubModel("model.root.Feedthrough", "../../resources/Feedthrough.fmu") |
| 44 | + |
| 45 | +oms_setResultFile("model", "Feedthrough-me.mat") |
| 46 | +oms_setStopTime("model", 10.0) |
| 47 | +oms_setTolerance("model.root", 1e-5, 1e-5) |
| 48 | + |
| 49 | +oms_instantiate("model") |
| 50 | +oms_setBoolean("model.root.Feedthrough.Boolean_input", true) |
| 51 | +oms_setInteger("model.root.Feedthrough.Enumeration_input", 2) |
| 52 | +oms_setReal("model.root.Feedthrough.Float64_continuous_input", 3.1) |
| 53 | +oms_setReal("model.root.Feedthrough.Float64_discrete_input", 4.2) |
| 54 | +oms_setInteger("model.root.Feedthrough.Int32_input", 5) |
| 55 | + |
| 56 | +oms_initialize("model") |
| 57 | +oms_simulate("model") |
| 58 | +print("info: Feedthrough.Boolean_output: " .. oms_getBoolean("model.root.Feedthrough.Boolean_output")) |
| 59 | +print("info: Feedthrough.Enumeration_output: " .. oms_getInteger("model.root.Feedthrough.Enumeration_output")) |
| 60 | +print("info: Feedthrough.Float64_continuous_output: " .. oms_getReal("model.root.Feedthrough.Float64_continuous_output")) |
| 61 | +print("info: Feedthrough.Float64_discrete_output: " .. oms_getReal("model.root.Feedthrough.Float64_discrete_output")) |
| 62 | +print("info: Feedthrough.Int32_output: " .. oms_getInteger("model.root.Feedthrough.Int32_output")) |
| 63 | + |
| 64 | +oms_terminate("model") |
| 65 | +oms_delete("model") |
| 66 | + |
| 67 | +-- Result: |
| 68 | +-- info: Result file: Feedthrough-cs.mat (bufferSize=1) |
| 69 | +-- info: Parameter model.root.Feedthrough.String_parameter will not be stored in the result file, because the signal type is not supported |
| 70 | +-- info: Feedthrough.Boolean_output: 1 |
| 71 | +-- info: Feedthrough.Enumeration_output: 2 |
| 72 | +-- info: Feedthrough.Float64_continuous_output: 3.1 |
| 73 | +-- info: Feedthrough.Float64_discrete_output: 4.2 |
| 74 | +-- info: Feedthrough.Int32_output: 5 |
| 75 | +-- info: model doesn't contain any continuous state |
| 76 | +-- info: Result file: Feedthrough-me.mat (bufferSize=1) |
| 77 | +-- info: Parameter model.root.Feedthrough.String_parameter will not be stored in the result file, because the signal type is not supported |
| 78 | +-- info: Feedthrough.Boolean_output: 1 |
| 79 | +-- info: Feedthrough.Enumeration_output: 2 |
| 80 | +-- info: Feedthrough.Float64_continuous_output: 3.1 |
| 81 | +-- info: Feedthrough.Float64_discrete_output: 4.2 |
| 82 | +-- info: Feedthrough.Int32_output: 5 |
| 83 | +-- endResult |
0 commit comments