OpenModelica / OMSimulator

The OpenModelica FMI & SSP-based co-simulation environment.
Other
70 stars 50 forks source link

API to Reduce SSVs #1159

Closed robha67 closed 2 years ago

robha67 commented 2 years ago

API command to generate a reduced SSV file. The use-case https://github.com/OpenModelica/OMSimulator/tree/master/testsuite/resources/embrace_TwoConf/resources has two SSV files with many unused entries. The idea is to create an SSV that only contains the parameters that are referenced in the SSM. So, something along the line

omsReduceSSV(ECS_Conf1.ssv, ECS_HW.ssm, "NameOfReduced".ssv)

Mvh Robert

arun3688 commented 2 years ago

@robha67 , the API is implemented with this commit https://github.com/OpenModelica/OMSimulator/commit/aa5efa48258ee83910e1b512f54abf675fd8e126. An example test case of how to use the API is available here https://github.com/OpenModelica/OMSimulator/blob/master/testsuite/api/reduceSSV.py, You can test the feature

arun3688 commented 2 years ago

@robha67 Please reopen if you find problems

robha67 commented 2 years ago

I cannot find any discription of this function in the OMSimulator user guide @arun3688

arun3688 commented 2 years ago

@robha67 That is true, i did not add the documentation for this API, I will soon add it, but you can see the example here on how to use it

https://github.com/OpenModelica/OMSimulator/blob/master/testsuite/api/reduceSSV.py

robha67 commented 2 years ago

@arun3688 Great, thanks.