Simulation setup
To simulate FMU `Resource.fmu` with OMSimulator run ```bash $ OMSimulator\ --stripRoot=true \ --skipCSVHeader=true \ --addParametersToCSV=true \ --intervals=500 \ --suppressPath=true \ --timeout=60\ Resource.lua ``` Lua file: ```lua -- Lua file for Resource.fmu oms_setTempDirectory("temp") oms_newModel("model") oms_addSystem("model.root", oms_system_wc) -- instantiate FMU oms_addSubModel("model.root.fmu", "../../../../../../../../../fmus/2.0/cs/linux64/Test-FMUs/0.0.2/Resource/Resource.fmu") -- Simulation settings oms_setSignalFilter("model", ".*") oms_setResultFile("model", "Resource_out.csv") oms_setStartTime("model", 0.0) oms_setStopTime("model", 1.0) oms_setTolerance("model", 1e-05) initialStepSize, minimumStepSize, maximumStepSize, status = oms_getVariableStepSize("model") oms_setVariableStepSize("model", 0.002, minimumStepSize, 0.002) oms_setFixedStepSize("model", 0.002) -- Instantiate, initialize and simulate oms_instantiate("model") oms_initialize("model") oms_simulate("model") oms_terminate("model") oms_delete("model") ``` See the [OMSimulator documentation](https://openmodelica.org/doc/OMSimulator/master/html/index.html) for more information.
Stdout:
warning: module FMI2XML: Attribute 'start' not processed by element 'Real' handle info: Result file: Resource_out.csv (bufferSize=1) info: 1 warnings info: 2 errors
Stderr:
error: [fmiLogger] module FMI2XML: Start attribute is not allowed for variables with initial='calculated' error: [fmi2logger] fmu (logStatusError): Failed to open resource file /var/lib/jenkins2/ws/Sandbox/Andreas/OMSimulator 0.000000MI