Opened 12 years ago
Last modified 8 years ago
#2246 closed defect
Variable index model gives incorrect results — at Version 2
| Reported by: | Francesco Casella | Owned by: | probably noone |
|---|---|---|---|
| Priority: | high | Milestone: | 1.13.0 |
| Component: | Backend | Version: | trunk |
| Keywords: | Cc: |
Description (last modified by )
The following model
model foo
Real x1, x2;
equation
der(x1) = 2;
if x1 < 1 then
der(x2) = 1;
else
x2 = 1;
end if;
end foo;
simulated for one second gives as results x1 = 2*time (which is correct) and x2 = time, which is wrong for time > 0.5.
I understand an error should be generated at time = 0.5, or maybe right at compile time, unless we can handle variable structure systems, which we obviously can't (or can we?).
Change History (2)
comment:1 by , 12 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 12 years ago
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.
