Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

co-simulation dymola fmu file can't be simulated by fmuchecker

Tags:

dymola

fmi

We are trying to test the co-simulation options of Dymola and created a fmu-file. We installed/built the FMILibrary-2.0b2 and FMUChecker-2.0b1 from www.fmi-standard.org.

I encountered an issue while trying to run the FMUChecker (fmuCheck.linux32) of a fmu-file my colleague created with Dymola. Wenn i create with my Dymola-license an fmu-file from the same Dymola model this issue is not reproducible. Because fmuCheck.linux32 runs fine without any error messages. My colleague can run both files without problems!

As it is our goal to use this option for co-simulation i tried to run the fmu file on a pc without Dymola and again i got the same error with both my fmu-copy and the one my colleague created.

Here's the Error Message

    fmuCheck.linux32 PemFcSysLib_Projects_Modl_SimCoolCirc.fmu 
[INFO][FMUCHK] Will process FMU PemFcSysLib_Projects_Modl_SimCoolCirc.fmu
[INFO][FMILIB] XML specifies FMI standard version 1.0
[INFO][FMI1XML] Processing implementation element (co-simulation FMU detected)
[INFO][FMUCHK] Model name: PemFcSysLib.Projects.Modl.SimCoolCirc
[INFO][FMUCHK] Model identifier: PemFcSysLib_Projects_Modl_SimCoolCirc
[INFO][FMUCHK] Model GUID: {6eba096a-a778-4cf1-a7c2-3bd6121a1a52}
[INFO][FMUCHK] Model version: 
[INFO][FMUCHK] FMU kind: CoSimulation_StandAlone
[INFO][FMUCHK] The FMU contains:
18 constants
1762 parameters
26 discrete variables
281 continuous variables
0 inputs
0 outputs
2087 internal variables
0 variables with causality 'none'
2053 real variables
0 integer variables
0 enumeration variables
34 boolean variables
0 string variables

[INFO][FMUCHK] Printing output file header
time
[INFO][FMILIB] Loading 'linux32' binary with 'standard32' platform types
[INFO][FMUCHK] Version returned from FMU:   1.0
    [FMU][FMU status:OK] 
    ...
    [FMU][FMU status:OK] 
    [FMU][FMU status:Error] fmiInitialize: dsblock_ failed, QiErr = 1
    [FMU][FMU status:Error] Unless otherwise indicated by error messages, possible errors are (non-exhaustive):
1. The license file was not found. Use the environment variable "DYMOLA_RUNTIME_LICENSE" t
[FATAL][FMUCHK] Failed to initialize FMU for simulation (FMU status: Error)
[FATAL][FMUCHK] Simulation loop terminated  at time 0 since FMU returned status: Error
FMU check summary:
FMU reported:
    2 warning(s) and error(s)
Checker reported:
    0 Warning(s)
    0 Error(s)
    Fatal error occured during processing

I think a fmu-file shouldn't need a Dymola license to be simulated, therefore i can't see the reason this simulation failed. What could be the reason for this strange behaviour?

Partially this is the same Error Message of this Issue Initialization of a Dymola FMU in Simulink

Any suggestions are much appreciated. Thank you.

like image 404
Medi1Saif Avatar asked Jan 12 '23 06:01

Medi1Saif


1 Answers

It seems that dymola has not set the path variable to the license-file in ubuntu. We have done this manually by adding the following lines to .bashrc

# Dymola runtime license, path
DYMOLA_RUNTIME_LICENSE=$HOME/.dynasim/dymola.lic
export DYMOLA_RUNTIME_LICENSE

now we can simulate each others fmu-files!

like image 171
Medi1Saif Avatar answered May 20 '23 15:05

Medi1Saif