﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1359	OMC doesnot set the initianl values correctly	mohsen	mohsen	"Consider the below code:


{{{model Tank
  Modelica.Blocks.Continuous.TransferFunction G(b={1/A}, a={1,1/T}); //Modelica 3.1, y_start = 1/A
  parameter Real T = 15;                                //Time constant
  parameter Real A = 5; 
  // Real weight_analyt = 1/A*exp(-1/T*time); 
initial equation                            // initial equation is not yet supported in OpenModelica
  G.y = 1/A;
equation
  G.u= if time > 0 then 0 else 1e6;
 /*if time <= 0 then
    G.y = 1/A; 
   else
    G.u = 0;
  end if;*/
end Tank;}}}

The weight_analyt and G.y should be the same. Dymola works fine but omc sets the G.y to zero and does ignoe the if statement. 
neither initial equation or the if statement works.


Regards
Mohsen"	defect	closed	high				fixed		mohsen
