OMSimulator icon indicating copy to clipboard operation
OMSimulator copied to clipboard

Unable to change parameter value in SSP

Open larsviktorlarsson opened this issue 1 month ago • 2 comments

Description

When I change a parameter value in an .ssd file from the python api, it does not have an effect on a certain FMU.

Steps to reproduce the behavior

My python script:

from OMSimulator import SSP as oms_ssp

from OMSimulator import CRef

from OMSimulator import Capi as oms_capi

try: oms_capi.terminate("model") except OSError: pass try: oms_capi.delete("model") except OSError: pass

oms_model = oms_ssp("ParkerSimPack.ssp") oms_model.activeVariantName = "D16_auto_stimuli" oms_model_inst = oms_model.instantiate()

oms_model_inst.setResultFile('D16_auto_stimuli_results.csv')

oms_model_inst.initialize()

oms_model_inst.setValue(CRef("D16_auto_stimuli","interface_model.k_p"),0)

oms_model_inst.simulate()

oms_model_inst.terminate() oms_model_inst.delete()

Expected behavior

When I plot the results in Matlab i get:

Image

But, the variagble theta should be zero after I have changed the parameter value of k_p to 0. If I simulate in easy-ssp I get (which I expect in OMSimulator as well):

Image

Model

ParkerSimPack.zip

Version and OS

  • Version: 'OMSimulator v3.0.0.post103-g53bba5e-win'

  • OS: Win11 64 bit

larsviktorlarsson avatar Dec 05 '25 09:12 larsviktorlarsson