Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model structure is not valid due to detected errors. Cannot continue #128

Closed
lyw2024 opened this issue Jul 7, 2024 · 5 comments
Closed
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@lyw2024
Copy link

lyw2024 commented Jul 7, 2024

hello, all:
when I try to read .FMU with FMILibary. see following:

lyw@ubuntu:~/Desktop/FMILibrary-2.0a1-src/FMILibrary-2.0a1/Test/FMI2$ ./fmi2Test Demo.fmu ./Temp
argv[0] = ./fmi2Test
argv[1] = Demo.fmu
argv[2] = ./Temp
module = FMILIB, log level = VERBOSE: Allocating FMIL context
module = FMILIB, log level = VERBOSE: Detecting FMI standard version
module = FMIZIP, log level = VERBOSE: Unpacking FMU into ./Temp
module = FMIXML, log level = VERBOSE: Parsing XML to detect FMI standard version
module = FMIXML, log level = VERBOSE: XML specifies FMI 2.0
module = FMILIB, log level = INFO: XML specifies FMI standard version 2.0
module = FMILIB, log level = VERBOSE: Parsing model description XML
module = FMI2XML, log level = VERBOSE: Parsing XML element fmiModelDescription
module = FMI2XML, log level = VERBOSE: Parsing XML element CoSimulation
module = FMI2XML, log level = ERROR: Unknown attribute 'stepSize=0.001' in XML
module = FMI2XML, log level = VERBOSE: Parsing XML element VendorAnnotations
module = FMI2XML, log level = VERBOSE: Parsing XML element ModelVariables
module = FMI2XML, log level = INFO: [Line:45] Detected during parsing:
module = FMI2XML, log level = ERROR: XML element 'ScalarVariable': could not parse value for enumeration attribute 'causality'='independent'
module = FMI2XML, log level = VERBOSE: Building alias index
module = FMI2XML, log level = VERBOSE: Parsing XML element ModelStructure
module = FMI2XML, log level = ERROR: [Line:52] Unknown element 'Unknown' in XML, skipping
module = FMI2XML, log level = ERROR: [Line:53] Unknown element 'Unknown' in XML, skipping
module = FMI2XML, log level = ERROR: [Line:54] Unknown element 'Unknown' in XML, skipping
module = FMI2XML, log level = ERROR: [Line:55] Unknown element 'Unknown' in XML, skipping
module = FMI2XML, log level = ERROR: [Line:57] Unknown element 'InitialUnknowns' in XML, skipping
module = FMI2XML, log level = WARNING: [Line:58] Skipping nested XML element 'Unknown'
module = FMI2XML, log level = WARNING: [Line:59] Skipping nested XML element 'Unknown'
module = FMI2XML, log level = WARNING: [Line:60] Skipping nested XML element 'Unknown'
module = FMI2XML, log level = WARNING: [Line:61] Skipping nested XML element 'Unknown'
module = FMI2XML, log level = ERROR: Input variable ac is not listed among inputs in ModelStructure
module = FMI2XML, log level = ERROR: Input variable bc is not listed among inputs in ModelStructure
module = FMI2XML, log level = ERROR: Output variable out1 is not listed among outputs in ModelStructure
module = FMI2XML, log level = ERROR: Output variable out2 is not listed among outputs in ModelStructure
module = FMI2XML, log level = ERROR: Output variable out3 is not listed among outputs in ModelStructure
module = FMI2XML, log level = ERROR: Output variable out4 is not listed among outputs in ModelStructure
module = FMI2XML, log level = FATAL: Model structure is not valid due to detected errors. Cannot continue.
module = FMI2XML, log level = FATAL: Parse error at line 63:
parsing aborted

the FMU is generated by simulink.
image

do you know why I have this error, can you help me to solve it.

thank you.

@PeterMeisrimelModelon
Copy link
Contributor

Hi lyw2024,

can you provide the complete modelDescription.xml in text form?

/Peter

@PeterMeisrimelModelon PeterMeisrimelModelon self-assigned this Jul 8, 2024
@PeterMeisrimelModelon PeterMeisrimelModelon added the question Further information is requested label Jul 8, 2024
@lyw2024
Copy link
Author

lyw2024 commented Jul 8, 2024

Hello, peter:
I have update the modelDescription. please help to check.
modelDescription.txt

thank you

@PeterMeisrimelModelon PeterMeisrimelModelon added the bug Something isn't working label Jul 8, 2024
@PeterMeisrimelModelon
Copy link
Contributor

Hi lyw2024,

  1. You seem to be using a quite old FMILibrary version (according to the path), many of the errors reported are likely due to that, I recommend using a newer version.
  2. With a newer version, parsing your XML only yields a single error "Start attribute is required for this causality, variability and initial combination", for the independent variable. This appears incorrect from fmi-library, fix is incoming: Correct error check on causality="independent" and start attribute(s) #129

/Peter

@lyw2024
Copy link
Author

lyw2024 commented Jul 16, 2024

hello, peter:
after I replaced with the latest version. This error ( "Start attribute is required for this causality, variability and initial combination") happened. Do you know when we can reaease fmi-library to fix this issue?

@PeterMeisrimelModelon
Copy link
Contributor

Made a new release including that fix: https://github.com/modelon-community/fmi-library/releases/tag/3.0a4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants