You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have some issues with cosim and the cosim-demo-app. I have this error message when I try to run the co-simulation of 2 FMUs:
$ cosim-v0.7.1-linux64-gcc9/bin/cosim run --log-level=debug OspSystemStructure.xml
debug: Environment variable 'COSIM_CACHE_PATH' not set.
debug: Environment variable 'XDG_CACHE_HOME' not set.
info: Using cache directory: "/home/ray/.cache/cosim"
debug: [FMI Library: FMILIB] Allocating FMIL context
debug: [FMI Library: FMILIB] Parsing model description XML
debug: [FMI Library: FMI2XML] Parsing XML element fmiModelDescription
debug: [FMI Library: FMI2XML] Parsing XML element CoSimulation
debug: [FMI Library: FMI2XML] Parsing XML element LogCategories
debug: [FMI Library: FMI2XML] Parsing XML element ModelVariables
debug: [FMI Library: FMI2XML] Building alias index
debug: [FMI Library: FMI2XML] Parsing XML element ModelStructure
debug: [FMI Library: FMI2XML] Parsing XML element Outputs
debug: [FMI Library: FMILIB] Parsing finished successfully
debug: [FMI Library: FMILIB] Parsing model description XML
debug: [FMI Library: FMI2XML] Parsing XML element fmiModelDescription
debug: [FMI Library: FMI2XML] Parsing XML element CoSimulation
debug: [FMI Library: FMI2XML] Parsing XML element LogCategories
debug: [FMI Library: FMI2XML] Parsing XML element ModelVariables
info: [FMI Library: FMI2XML] [Line:25] Detected during parsing:
error: [FMI Library: FMI2XML] Initial 'exact' is not allowed for variability 'continuous' and causality 'input'. Setting initial to 'Undefined' for variable 'INSTANCE0__SINEVALUE'
debug: [FMI Library: FMI2XML] Building alias index
debug: [FMI Library: FMI2XML] Parsing XML element ModelStructure
debug: [FMI Library: FMI2XML] Parsing XML element Outputs
debug: [FMI Library: FMILIB] Parsing finished successfully
debug: [FMI Library: FMILIB] Releasing allocated library resources
debug: [FMI Library: FMILIB] Releasing allocated library resources
error: internal: Cannot find extended model description for SineGenerator
There are 2 FMUs in my setup, the FMUWrapper_sine_generate_serial.fmu is for generating a sine value, here's the variables in the model description:
And the FMUWrapper_sin_to_tan_serial.fmu is taking the generated sine value as input to calculate the tangent value, here's the variables in model descriptions:
Both FMUs work fine when they are executed alone, but the error message seems to come from FMUWrapper_sin_to_tan_serial.fmu.
I've been experimenting with different combinations of my 'variability', 'causality', and I found that if I remove the 'initial' attribute and the start value of my output variable ('INSTANCE0__SINEVALUE'), there would be another error message:
Start attribute is required for this causality, variability and initial combination
I saw a table about initial definition in the FMI 3.0 specification document, from my understanding the definition of variable 'INSTANCE0__SINEVALUE' in FMUWrapper_sin_to_tan_serial.fmu should have a legal combination of 'variability', 'causality' and 'initial'. FYI I'm using pythonfmu to create my FMUs, and it follows FMI version 2.0, so in this case I'm not sure if there's any inconsistency here.
In the cosim cli usage page and the [Co-Simulation C/C++ libraries -> Simulation configuration page] I found that cosim cli requires the OspSystemStructure.xml file to run, and I learned how to write my OspSystemStructure.xml from some examples (like dp-ship), it looks like this:
but I'm not sure about the error message: error: internal: Cannot find extended model description for SineGenerator, is that related to something called OspModelDescription? If so, how do I create one?
Thank you for your time, if there's anything else I can provide that could help clarifying the issues, please let me know
The text was updated successfully, but these errors were encountered:
error: [FMI Library: FMI2XML] Initial 'exact' is not allowed for variability 'continuous' and causality 'input'. Setting initial to 'Undefined' for variable 'INSTANCE0__SINEVALUE'
This is caused by an error in your FMUWrapper_sin_to_tan_serial.fmu model description. According to the FMI 2.0 specification, you are not allowed to specify an initial attribute for continuous input variables. You are, however, required to specify a start value in the nested <Real> element. Since you don't, you get the other error you mentioned:
Start attribute is required for this causality, variability and initial combination
The FMI 3.0 spec isn't really relevant here, since it is neither supported by Cosim nor PythonFMU.
Second error:
error: internal: Cannot find extended model description for SineGenerator
I believe this is because you are trying to use variable group connections in your OspSystemStructure.xml. This is an OSP-specific feature which requires you to create separate *_OspModelDescription.xml files for each of your FMUs, in which you define the groups. But you probably don't need to do that here; just use <VariableConnection> instead of <VariableGroupConnection. See docs here: https://open-simulation-platform.github.io/libcosim/configuration#connection
Hello, I have some issues with cosim and the cosim-demo-app. I have this error message when I try to run the co-simulation of 2 FMUs:
There are 2 FMUs in my setup, the
FMUWrapper_sine_generate_serial.fmu
is for generating a sine value, here's the variables in the model description:And the
FMUWrapper_sin_to_tan_serial.fmu
is taking the generated sine value as input to calculate the tangent value, here's the variables in model descriptions:Both FMUs work fine when they are executed alone, but the error message seems to come from
FMUWrapper_sin_to_tan_serial.fmu
.I've been experimenting with different combinations of my 'variability', 'causality', and I found that if I remove the 'initial' attribute and the start value of my output variable ('INSTANCE0__SINEVALUE'), there would be another error message:
the directory structure looks like this:
Now here's the points that I'm not sure:
initial
definition in the FMI 3.0 specification document, from my understanding the definition of variable 'INSTANCE0__SINEVALUE' inFMUWrapper_sin_to_tan_serial.fmu
should have a legal combination of 'variability', 'causality' and 'initial'. FYI I'm using pythonfmu to create my FMUs, and it follows FMI version 2.0, so in this case I'm not sure if there's any inconsistency here.OspSystemStructure.xml
file to run, and I learned how to write myOspSystemStructure.xml
from some examples (like dp-ship), it looks like this:but I'm not sure about the error message:
error: internal: Cannot find extended model description for SineGenerator
, is that related to something calledOspModelDescription
? If so, how do I create one?Thank you for your time, if there's anything else I can provide that could help clarifying the issues, please let me know
The text was updated successfully, but these errors were encountered: