﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6371	Modelica_Synchronus FMUs not working	Andreas Heuermann	Andreas Heuermann	"As far as I can tell it is not possible to export a Modelica model, that is using features like clocks from Modelic_Synchronus, as an FMU that can be run by a FMU Import Tool.

For example when exporting `Modelica_Synchronous.Examples.Elementary.ClockSignals.SubSample` as a 2.0 FMU and simulating it with OMSimulator the simulation will issue warnings and the results are completely wrong.

{{{
setCommandLineOptions(""--std=3.5""); getErrorString();

loadModel(Modelica, {""3.2.3""}); getErrorString();
loadModel(Modelica_Synchronous); getErrorString();

buildModelFMU(Modelica_Synchronous.Examples.Elementary.ClockSignals.SubSample, version=""2.0"", fmuType=""me""); getErrorString();

system(""OMSimulator Modelica_Synchronous.Examples.Elementary.ClockSignals.SubSample.fmu""); getErrorString();
}}}

{{{
andreas@DESKTOP-OSJIVA0:~/workspace/Testitesttest/newTicketClocks$ omc runTests.mos 
true
""""
true
""""
true
""""
""/home/andreas/workspace/Testitesttest/newTicketClocks/Modelica_Synchronous.Examples.Elementary.ClockSignals.SubSample.fmu""
""""
info:    Set temp directory to    ""/home/andreas/workspace/Testitesttest/newTicketClocks""
info:    Set working directory to ""/home/andreas/workspace/Testitesttest/newTicketClocks""
info:    Set working directory to ""/home/andreas/workspace/Testitesttest/newTicketClocks""
info:    New model ""model"" with corresponding temp directory ""/home/andreas/workspace/Testitesttest/newTicketClocks/model-ew0k961t""
error:   [fmiLogger] module FMI2XML: [Line:105] Unknown element 'Clocks' in XML, skipping
warning: module FMI2XML: [Line:106] Skipping nested XML element 'Clock'
warning: module FMI2XML: [Line:106] Skipping nested XML element 'Inferred'
error:   [fmiLogger] module FMI2XML: Unknown attribute 'clockIndex=1' in XML
info:    model doesn't contain any continuous state
info:    Result file: model_res.mat (bufferSize=10)
info:    Parameter model.root.fmu.periodicClock.solverMethod will not be stored in the result file, because the signal type is not supported
info:    2 warnings
info:    2 errors
0
""""
}}}

The result of `model.sample1.y` should be a clocked version of a sine curve.
I have added the modelDescription.xml to this ticket.

Or is it just that I exported the FMU wrong and it is possible? The Cpp should be able to use clocks in FMUs, but it didn't change anything for me when adding `simCodeTarget=Cpp`."	defect	assigned	high		FMI	v1.17.0-dev		fmi, Modelica_Synchronus, clock,	arunkumar palanisamy
