﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1097	Calculation of initialisation values	Schubert TUD	Schubert TUD	"Hi,

I found another strange behaviour of OpenModelica with respect to initialisation values which I would like to point out. Consider the following model:

model Test \\  Real x; \\  Real b(start = 1); \\equation \\  der(x) = 1; \\  b = x; \\end Test;

 

If you simulate this model, you will notice that b starts at 0 instead of 1. Writing Real x(fixed = false); instead of Real x yields an even more surprising result since then x starts at 0.5?! 

Clearly, x is the state and I agree that one should not equip an algebraic variable like b with an initialisation value. However, due to the equality between b and x, it is very easy to derive the correct init value for x. I also cross checked with Dymola and there you get a warning that not all initial conditions are fully specified but it starts at x=1.

I think enhancing the calculation of initialisation values would improve usability of OpenModelica a lot.

Regards,

Christian Schubert"	defect	closed	high		Simulation Code Generation		fixed		Schubert TUD
