﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5148	Changes of integer input of FMU are ignored	anatoly.trosinenko@…	Lennart Ochel	"When simulating an FMU with an integer input that should trigger `when` condition in `algorithm` block, changes are ignored but the input is passed through correctly.

== How to reproduce ==

TestInt.mo: 
{{{
#!modelica
model TestInt
  input Integer inInt;
  output Integer outInt;
  output Integer passthrough;
initial equation
  outInt = 0;
algorithm
  when inInt > pre(inInt) then
    outInt := outInt + 1;
  end when;
equation
  passthrough = inInt;
end TestInt;
}}}

TestInt.mos:
{{{
#!modelica
print(buildModelFMU(TestInt, ""1.0"", ""me""));
print(getErrorString());
}}}

input.csv:
{{{
time;inInt
0.0;0
0.7;1
0.8;2
}}}

Compile it with
{{{
$ omc TestInt.mos TestInt.mo
/home/trosinenko/TestInt.fmu

$ ...
}}}

Simulate with FMUChecker (tested with 2.0.3):
{{{
$ path/to/fmuCheck.linux64 -i input.csv TestInt.fmu           
[INFO][FMUCHK] FMI compliance checker Test [FMILibrary: Test] build date: Dec 19 2016
[INFO][FMUCHK] Called with following options:
[INFO][FMUCHK] /path/to/fmuCheck.linux64 -i input.csv TestInt.fmu
[INFO][FMUCHK] Will process FMU TestInt.fmu
[INFO][FMILIB] XML specifies FMI standard version 1.0
[INFO][FMUCHK] Model name: TestInt
[INFO][FMUCHK] Model identifier: TestInt
[INFO][FMUCHK] Model GUID: {344d6ea1-babe-4fab-a4f1-a7a6ef710740}
[INFO][FMUCHK] Model version: 
[INFO][FMUCHK] FMU kind: ModelExchange
[INFO][FMUCHK] The FMU contains:
0 constants
0 parameters
3 discrete variables
1 continuous variables
1 inputs
2 outputs
1 internal variables
0 variables with causality 'none'
0 real variables
3 integer variables
0 enumeration variables
1 boolean variables
0 string variables

[INFO][FMUCHK] Printing output file header
""time"",""outInt"",""passthrough""
[INFO][FMUCHK] Opening input file input.csv
[INFO][FMUCHK] Detected separator character in input file: ;
[INFO][FMILIB] Loading 'linux64' binary with 'standard32' platform types
[INFO][FMUCHK] Version returned from FMU:   1.0
[INFO][FMUCHK] Initialized FMU for simulation starting at time 0
0.0000000000000000E+00,0,0
2.0000000000000000E-03,0,0
4.0000000000000001E-03,0,0
...
7.9600000000000004E-01,0,1
7.9800000000000004E-01,0,1
8.0000000000000004E-01,0,2
8.0200000000000005E-01,0,2
...
9.9600000000000022E-01,0,2
9.9800000000000022E-01,0,2
1.0000000000000000E+00,0,2
[INFO][FMUCHK] Simulation finished successfully at time 1
FMU check summary:
FMU reported:
        0 warning(s) and error(s)
Checker reported:
        0 Warning(s)
        0 Error(s)
}}}

Changing line
{{{
#!modelica
  when inInt > pre(inInt) then
}}}
to
{{{
#!modelica
  when change(inInt) then
}}}
does not change behavior."	defect	new	critical	Future	Backend	v1.13.0-dev-nightly			
