Opened 11 years ago
Closed 10 years ago
#2534 closed discussion (fixed)
simulation results. How to handle the first data point?
Reported by: | Lennart Ochel | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Run-time | Version: | trunk |
Keywords: | Cc: | Adrian Pop, Martin Sjölund, Willi Braun |
Description
What about the following example?
model Unnamed Real a; equation when sample(0, 10) then a = 1; end when; end Unnamed;
What should be the simulation result?
- a = 1 for all data points
- a = 1 for all data points with an additional data point at time=0 with a = 0
Actually, OpenModelica produces the second case and Dymola the first one…
Any comments?
Change History (4)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I propose we should change our result files to case a, because the result files are actually a simulation result files.
Version 0, edited 11 years ago by (next)
comment:3 by , 11 years ago
I think case b. is better, since the event is in the model equations and this should also be visible in the result file. The first entry in result file is the result of the initialisation.
For the following model case a. should be fine.
model Unnamed Real a; equation when initial() then a = 1; end when; end Unnamed;
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
This problem arose, because I like to compare simulation results to Dymola ... . I think we need either to change our results or the result comparing function. Otherwise it is some kind of nasty...