I am having trouble to import the generated FMU into Simcenter Amesim 2019.1
Error-Log from Amesim:
>Starting: "C:\Program Files\Simcenter\vXXXX\Amesim\win32\fmi_import_compiler.exe -outdir D:/AdvancedCAE/06_Models/Matlab R2019a/Antriebsmodell -name SIMULIX_FMU -ccopt -gcc -preferred me D:/Programme/Simulix/generated/Lastmodell_FMU.fmu"
It is an FMU for Co-simulation, version 2.0, running on win32
Model description not ok. There are some error(s).
Error(s):
Duplicate scalar variable name TSamp_WtEt
Duplicate scalar variable name UnitDelay2_InitialCondition
Duplicate scalar variable name UnitDelay1_InitialCondition
Warning(s):
Missing InitialUnknown index 154
There are some errors.
1.): Why does the UI tell me, that this is a FMU for Co-Simulation. I assumed, Simulix would create ModelExchange-FMUs?!?
2.): The displayed errors cannot be solved manually in total. I was able to solve some duplicate-errors by myself - of elements that i had named. Yet, concerning the variable TSamp_WtEt, this originates from Simulink-Block Discrete Derivative of the standard library. It is protected and i cannot rename the inner elements.
This is the output of the FMU-Generation:
D:\Programme\Simulix>Simulix.py Code_Export -p generated -zp test
Generating files
Building
Executing cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Check for working C compiler: C:/Program Files/Simcenter/vXXXX/Amesim/sys/mingw32/bin/gcc.exe
-- Check for working C compiler: C:/Program Files/Simcenter/vXXXX/Amesim/sys/mingw32/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files/Simcenter/vXXXX/Amesim/sys/mingw32/bin/g++.exe
-- Check for working CXX compiler: C:/Program Files/Simcenter/vXXXX/Amesim/sys/mingw32/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Python/Python37-32/python.exe (found suitable version "3.7.4", minimum required is "3")
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Programme/Simulix/generated/build
Executing mingw32-make
Scanning dependencies of target main
[ 4%] Building C object CMakeFiles/main.dir/temp_folder/Simulix_exemain.c.obj
[ 8%] Building C object CMakeFiles/main.dir/temp_folder/includes/cJSON.c.obj
[ 12%] Building C object CMakeFiles/main.dir/temp_folder/includes/Simulix_capi_utils.c.obj
[ 16%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/rtw_modelmap_utils.c.obj
[ 20%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/rt_logging.c.obj
[ 24%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/rt_logging_mmi.c.obj
[ 28%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/Lastmodell_FMU.c.obj
[ 32%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/Lastmodell_FMU_capi.c.obj
[ 36%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/Lastmodell_FMU_data.c.obj
[ 40%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/rtGetInf.c.obj
[ 44%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/rtGetNaN.c.obj
[ 48%] Building C object CMakeFiles/main.dir/Lastmodell_FMU/sources/rt_nonfinite.c.obj
[ 52%] Linking C executable main.exe
Creating library file: libmain.dll.a
[ 52%] Built target main
[ 56%] Generating ../Lastmodell_FMU/sources/Simulix_dllmain.c
"Executing main executable"
"JSON to XML with Python"
Scanning dependencies of target Lastmodell_FMU
[ 60%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/rtw_modelmap_utils.c.obj
[ 64%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/rt_logging.c.obj
[ 68%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/rt_logging_mmi.c.obj
[ 72%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/Lastmodell_FMU.c.obj
[ 76%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/Lastmodell_FMU_capi.c.obj
[ 80%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/Lastmodell_FMU_data.c.obj
[ 84%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/rtGetInf.c.obj
[ 88%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/rtGetNaN.c.obj
[ 92%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/rt_nonfinite.c.obj
[ 96%] Building C object CMakeFiles/Lastmodell_FMU.dir/Lastmodell_FMU/sources/Simulix_dllmain.c.obj
[100%] Linking C shared library ..\Lastmodell_FMU\binaries\win32\Lastmodell_FMU.dll
Creating library file: libLastmodell_FMU.dll.a
[100%] Built target Lastmodell_FMU
Used Software:
Matlab/Simulink R2018a
Amesim2019.1
I am having trouble to import the generated FMU into Simcenter Amesim 2019.1
Error-Log from Amesim:
1.): Why does the UI tell me, that this is a FMU for Co-Simulation. I assumed, Simulix would create ModelExchange-FMUs?!?
2.): The displayed errors cannot be solved manually in total. I was able to solve some duplicate-errors by myself - of elements that i had named. Yet, concerning the variable
TSamp_WtEt, this originates from Simulink-Block Discrete Derivative of the standard library. It is protected and i cannot rename the inner elements.This is the output of the FMU-Generation:
Used Software:
Matlab/Simulink R2018a
Amesim2019.1