﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6037	FMI2.0 Co-simulation: Defining stop time in setupExperiment causes whole simulation to run on the first co-simulation step.	cla.gms@…	Lennart Ochel	"Thank you for all the great work!
I tried to make it easier to reproduce this problem.

I pinned this problem down to defining the parameter stopTime of the setup experiment function.

1. Download the zip file attached. It contains the logs as well as the means to reproduce the problem.
2. Optionally run the instructions in run.ps1.

In the attached file, there are two sets of logs: with and without stoptime.

The correct behavior (without stop time) produces the following output:
time,step-size,{simple}.simple.x
0.0,0.0,0.0
0.01,0.01,0.01
0.02,0.01,0.02

Given the differential equation in Simple.mo, x should be equal to time.

The incorrect behavior happens when stop time is defined:
time,step-size,{simple}.simple.x
0.0,0.0,0.0
0.01,0.01,0.02
0.02,0.01,0.02

where x is equal to the stop time of the co-simulation (0.02) after the first co-simulation step.

From the logs, the only difference is is the setupExperiment function:
{{{
 INFO [main] (CoeInitialize.scala:405) - logFmi2Call OK simple fmi2SetupExperiment: toleranceDefined=0 tolerance=0 startTime=0 stopTimeDefined=0 stopTime=0
}}}
{{{
 INFO [main] (CoeInitialize.scala:405) - logFmi2Call OK simple fmi2SetupExperiment: toleranceDefined=0 tolerance=0 startTime=0 stopTimeDefined=1 stopTime=0.02
}}}
"	defect	closed	high	Future	FMI	v1.14.1	fixed		
