|
| 1 | +-- status: correct |
| 2 | +-- teardown_command: rm -rf deleteRootSystem/ |
| 3 | +-- linux: yes |
| 4 | +-- ucrt64: yes |
| 5 | +-- win: yes |
| 6 | +-- mac: yes |
| 7 | + |
| 8 | +oms_setCommandLineOption("--suppressPath=true") |
| 9 | +oms_setTempDirectory("./deleteRootSystem_lua/") |
| 10 | +oms_setWorkingDirectory("./deleteRootSystem_lua/") |
| 11 | + |
| 12 | +oms_newModel("model") |
| 13 | + |
| 14 | +oms_addSystem("model.Root", oms_system_wc) |
| 15 | + |
| 16 | + |
| 17 | +oms_addSubModel("model.Root.Gain", "../../resources/Modelica.Blocks.Math.Gain.fmu") |
| 18 | + |
| 19 | +oms_delete("model.Root") |
| 20 | + |
| 21 | +src = oms_exportSnapshot("model") |
| 22 | +print(src) |
| 23 | + |
| 24 | +oms_importSnapshot("model", src) |
| 25 | + |
| 26 | +-- Result: |
| 27 | +-- <?xml version="1.0"?> |
| 28 | +-- <oms:snapshot |
| 29 | +-- xmlns:oms="https://raw.githubusercontent.com/OpenModelica/OMSimulator/master/schema/oms.xsd" |
| 30 | +-- partial="false"> |
| 31 | +-- <oms:file |
| 32 | +-- name="SystemStructure.ssd"> |
| 33 | +-- <ssd:SystemStructureDescription |
| 34 | +-- xmlns:ssc="http://ssp-standard.org/SSP1/SystemStructureCommon" |
| 35 | +-- xmlns:ssd="http://ssp-standard.org/SSP1/SystemStructureDescription" |
| 36 | +-- xmlns:ssv="http://ssp-standard.org/SSP1/SystemStructureParameterValues" |
| 37 | +-- xmlns:ssm="http://ssp-standard.org/SSP1/SystemStructureParameterMapping" |
| 38 | +-- xmlns:ssb="http://ssp-standard.org/SSP1/SystemStructureSignalDictionary" |
| 39 | +-- xmlns:oms="https://raw.githubusercontent.com/OpenModelica/OMSimulator/master/schema/oms.xsd" |
| 40 | +-- name="model" |
| 41 | +-- version="1.0"> |
| 42 | +-- <ssd:DefaultExperiment |
| 43 | +-- startTime="0.000000" |
| 44 | +-- stopTime="1.000000"> |
| 45 | +-- <ssd:Annotations> |
| 46 | +-- <ssc:Annotation |
| 47 | +-- type="org.openmodelica"> |
| 48 | +-- <oms:Annotations> |
| 49 | +-- <oms:SimulationInformation |
| 50 | +-- resultFile="model_res.mat" |
| 51 | +-- loggingInterval="0.000000" |
| 52 | +-- bufferSize="10" /> |
| 53 | +-- </oms:Annotations> |
| 54 | +-- </ssc:Annotation> |
| 55 | +-- </ssd:Annotations> |
| 56 | +-- </ssd:DefaultExperiment> |
| 57 | +-- </ssd:SystemStructureDescription> |
| 58 | +-- </oms:file> |
| 59 | +-- </oms:snapshot> |
| 60 | +-- |
| 61 | +-- endResult |
0 commit comments