﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5621	Simple fmu example does not work anymore	massimo ceraolo	Lennart Ochel	"Consider the package fbSystemTest.mo added to ticket #5581 created on 2019-07-12.
That ticket was created using OMEdit v1.14.0-dev-5826 (64 bit, win), which was able to create a fmu, and run a system containing that fmu, with a small accuracy issue detailed in that ticket.
I repeated that procedure today, using OpenModelica v1.14.0-dev-26545 and got a worse result. In fact, upon trying to run fbSystemFMU one receives the following error message:
{{{
[fbSystemPkg: 364:9-364:39]: Operator reinit may only be used in the body of a when equation.
}}}

the error message points to the first of the reinit rows in following code snippet, automatically generated when creating the fmu:

{{{
    when {triggerDSSEvent > flowStatesInputs, pre(nextEventTime) < time, terminal()} then
      newStatesAvailable := fmi2Functions.fmi2EventUpdate(fmi2me);
      nextEventTime := fmi2Functions.fmi2nextEventTime(fmi2me, flowStatesInputs);
      if newStatesAvailable then
        fmi_x_new := fmi2Functions.fmi2GetContinuousStates(fmi2me, numberOfContinuousStates, flowStatesInputs);
        reinit(fmi_x[3], fmi_x_new[3]);
        reinit(fmi_x[2], fmi_x_new[2]);
        reinit(fmi_x[1], fmi_x_new[1]);
      end if;
    end when;
}}}

Appearently, those reinits were well accepted up to last July.

Since the issue comes from a VERY basic modelica model, since it used to work just a few weeks ago, I set milestone for this ticket to 1.14.0

"	defect	new	critical	1.14.0	FMI				
