﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1669	Modelica.Blocks.Sources.BooleanPulse weird simulation results	Adrian Pop	Lennart Ochel	"Hi,\\
\\
It seems we have issues with initialization of:\\
Modelica.Blocks.Sources.BooleanPulse\\
[http://www.openmodelica.org/index.php/forum/topic?id=402]\\
I looked at initialization and event handling at time 0 and there seems to be an issue there:
{{{
adrpo@ida-liu050 /c/Users/adrpo/AppData/Local/Temp/OpenModelica/OMEdit
$ ./TestSignal.exe -lv LOG_DEBUG
....
initDelay called with startTime = 0.000000
Allocated simulation result data storage for method 'mat' and file='TestSignal_res.mat'
Recognized solver: dassl.
| info LOG_SOLVER | Calculated bound parameters
info    | initialization | initialization method: state
info    | initialization | optimization method:   simplex
| info LOG_EVENTS | Calling sample(1.500000,1.000000)
| info LOG_EVENTS |    -NO event at time: 0.000000       tmp: 1.000000
Discrete Var mySrc.y : 0 to 1
| info LOG_EVENTS | discrete Var changed. Iteration needed!
| info LOG_EVENTS | Calling sample(1.500000,1.000000)
| info LOG_EVENTS |    -NO event at time: 0.000000       tmp: 1.000000
info    | initialize | initialization by method: nelder_mead_ex
info    | initialize | fixed attribute for states:
info    | initialize | $dummy(fixed=true)
info    | initialize | number of non-fixed variables: 0
info    | no initial values to calculate
| info LOG_EVENTS | Calling sample(1.500000,1.000000)
| info LOG_EVENTS |    -NO event at time: 0.000000       tmp: 1.000000
Discrete Var mySrc.y : 0 to 1
| info LOG_EVENTS | discrete Var changed. Iteration needed!
| info LOG_EVENTS | Calling sample(1.500000,1.000000)
| info LOG_EVENTS |    -NO event at time: 0.000000       tmp: 1.000000
| info LOG_ZEROCROSSINGS | Save ZeroCrossings!
| info LOG_SOLVER | Wrote parameters to the file after initialization (for output formats that support this)
| info LOG_ZEROCROSSINGS | Save ZeroCrossings!
| info LOG_EVENTS | Check for Sample Events. Current Index: 0
| info LOG_EVENTS | *** Next step : 0.020000
}}}

mySrc.y goes to 1 at time 0 when it shouldn't!\\
\\
Cheers,\\
Adrian Pop/\\"	defect	closed	normal		Backend		fixed		Adrian Pop Lennart Ochel Willi Braun
