I exported a model to FMU that depends on external files to work, but when I run it
the simulation center does not compute variables, it just show parameters. If I run
normally the modelica file it runs fine, but when I load the FMU generated by the same
System Modeler the problem occurs. I’ve put the external files in system modeler working directory.
The model represents a Hybrid Electric Vehicle and it comes inside a package with a library.
The Package comes with many other models. I simulated and exported the “SHEVpowerFiltSocOO” model. I modified it a little bit so that it have a real output now (outputs battery SOC variable).
The picture below shows the expected result (run normally):
I cannot reproduce your issue, for me it works (tested with 12.2). Perhaps it’s best if you publish the actual model that you used (including the modification).
I’m suspecting you are simulating the imported FMU with useTriggerInput_=true, but without anything connected to the trigger. You could connect it to a BooleanPulse or SampleTrigger, but the easiest solution is to simply set the useTriggerInput_=false and specify a step_ size.
parameter means? is it a kind of enable signal
generator for the solver?
in the FMU that I generated in systemModeler there is a variable:
Interfaces_.Boolean_DiscreteInput stepTrigger_ if useTriggerInput_ >>;
I noticed that SM just generate it if the FMU is for Co-Simulation. So if I’m correct it
is a synchronization mechanism for other programs or process that simulate other part of the system.
For a co simulation FMUs the FMU and Modelica model exchange input/outputs at discrete communication points. The FMU wrapper in System Modeler offers two ways of controlling that, using an externa trigger signal (useTriggerInput_=true) or periodically with the step size given by step_ (useTriggerIntput_false).
For a co simulation FMUs the FMU and Modelica model exchange
input/outputs at discrete communication points. The FMU wrapper in
System Modeler offers two ways of controlling that, using an externa
trigger signal (useTriggerInput_=true) or periodically with the step
size given by step_ (useTriggerIntput_false)
Got it, but are the “step_” and “stepTrigger_” variables that appear in
modelica code of the imported FMU created by SM at the time it opens or are
they in some “hidden place” in the FMU?
I’m asking because I’m developing an application where I execute SM FMU’s.
Got it, but are the “step” and “stepTrigger” variables that appear in modelica code of the imported FMU created by SM at the time it opens or are they in some “hidden place” in the FMU? I’m asking because I’m developing an application where I execute SM FMU’s.
No they are not part of the FMU, they are part of the Modelica wrapper that is generated when you import an FMU into System Modeler. So you would get them for every imported co-simulation FMU regardless of the tool used to produce the FMU.