﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2130	Parameters in FMU's	Karim Kanso <kkanso@…>	Adeel Asghar	"The parameters are not set for imported FMU's. 

For example, given the following model
{{{
model test
parameter Integer i;
output Real x;
equation
der(x) = i-x;
end test;
}}}

Export as FMU, and import again. When the imported module is used in another model, and parameter i is set to a given value this is not reflected in the simulation.

As a workaround to this problem I have been adding fmiSetInteger/Bool/Real assignments during the initialisation of the model. So the generated initialisation code induced from importing the above module is
{{{
  flowInstantiate:=fmiFunctions.fmi1InstantiateModel(fmi, ""testFMU"", debugLogging);
  flowParamsStart:=0;
  eventInfo:=fmiFunctions.fmi1Initialize(fmi, eventInfo);
  fmi_x:=fmiFunctions.fmi1GetContinuousStates(fmi, numberOfContinuousStates, flowParamsStart);
}}}
which I modify to
{{{
  flowInstantiate:=fmiFunctions.fmi1InstantiateModel(fmi, ""testFMU"", debugLogging);
  flowParamsStart:=0;
  flowParamsStart:=fmiFunctions.fmi1SetInteger(fmi, {0.0}, {i});
  eventInfo:=fmiFunctions.fmi1Initialize(fmi, eventInfo);
  fmi_x:=fmiFunctions.fmi1GetContinuousStates(fmi, numberOfContinuousStates, flowParamsStart);
}}}

It has the desired effect, but should have been done automatically."	defect	closed	high	1.9.2	FMI	1.9.0Beta	fixed		Willi Braun
