OMSimulator icon indicating copy to clipboard operation
OMSimulator copied to clipboard

exportSSVTemplate() does not export template files for fmu's inside subsystem

Open arun3688 opened this issue 3 years ago • 0 comments

Description

The API exportSSVTemplate() works only on the top level system and its component and it does not work on the subsystem and its components, Also the exportSSVTemplate() API does not update the start values in the template file when setting new start values in ssv resources, but it works well with inline parameter settings.

Steps to reproduce the behavior for exportSSVtemplate not working in subsystems

oms_newModel("model")
oms_addSystem("model.root", oms_system_wc)
oms_addSubModel("model.root.sine", "../resources/Modelica.Blocks.Sources.Sine.fmu")
-- add resources to submodule
oms_newResources("model.root.sine:sine.ssv")
oms_setReal("model.root.sine.phase", 27)
oms_setReal("model.root.sine.amplitude", -100)
oms_setReal("model.root.sine.freqHz", -300)
-- add subsytems
oms_addSystem("model.root.subsystem", oms_system_sc)
oms_addSubModel("model.root.subsystem.sine1", "../resources/Modelica.Blocks.Sources.Sine.fmu")
oms_newResources("model.root.subsystem.sine1:sine1.ssv")

oms_exportSSVTemplate("model.root.subsystem.sine1", "sine1.ssv")

Steps to reproduce the behavior for not updating start values from ssv resources

oms_newModel("model")
oms_addSystem("model.root", oms_system_wc)
oms_addSubModel("model.root.sine", "../resources/Modelica.Blocks.Sources.Sine.fmu")
-- add resources to submodule
oms_newResources("model.root.sine:sine.ssv")
oms_setReal("model.root.sine.phase", 27)
oms_setReal("model.root.sine.amplitude", -100)
oms_setReal("model.root.sine.freqHz", -300)
oms_exportSSVTemplate("model.root.sine", "sine.ssv")

arun3688 avatar Jul 01 '22 13:07 arun3688