Opened 14 years ago
Last modified 12 years ago
#1248 closed defect
Backend: Sorting simple equations and algorithm sections — at Initial Version
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | Backend | Version: | 1.6.0 |
Keywords: | Cc: | Martin Sjölund |
Description
The following generates wrong code (h = 0 after initialization, and the first time step causes derx=x=NaN)
The problem is that code for simple equations and algorithms are generated separately, which means it can't possibly handle even harder models.
{{{model A
Real x(start=37);
Real derx;
Real h = 0.01; time step
algorithm
x=15+time, der(x)=??? weird during init due to start being wrong?
derx := (15+time-x)/h;
x := x+derx*h;
end A;}}}
Note:
See TracTickets
for help on using tickets.