﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1094	Modelica.Blocks.Interfaces.RealInput	Schubert TUD	Schubert TUD	"Hi,

I tried to use Modelica.Blocks.Interfaces.RealInput in my model. Unfortunately, the simulation failed because of too few equations. Below there is an example illustrating the problem. (The firstOrder Block does not have any infkuence on the error.) It seems that Modelica.Blocks.Interfaces.RealInput is defined in an unusual way, which confuses OpenModelica. If you look at the flattened code using 'instantiateModel', it emerges that the omc flattens 'RealInput u' to 'Real u' instead of 'input Real u'. I also cross-checked with Dymola and it worked fine.

Regards,

Christian Schubert


 
----
// works, 2 equations and 2 variables \\
model RealInputOK \\  input Real u; \\  
  Modelica.Blocks.Continuous.FirstOrder firstOrder;
 \\equation
  \\  connect(u, firstOrder.u);  
 \\end RealInputOK;

 

 

 

// fails, 3 equations and 2 variables \\
connector RealInput = input Real;	// from Modelica.Blocks.Interfaces.RealInput \\
model RealInputFail 
  \\  RealInput u;
 \\  Modelica.Blocks.Continuous.FirstOrder firstOrder; \\
equation
  \\  connect(u.x, firstOrder.u);  
 \\end RealInputFail;"	defect	closed	high				fixed		Schubert TUD
