Opened 11 years ago
Closed 11 years ago
#2230 closed defect (fixed)
model does not build - a discrete initialization generation bug ?
Reported by: | Pavol Privitzer | Owned by: | Mahder Alemseged Gebremedhin |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.0 |
Component: | Code Generation | Version: | trunk |
Keywords: | Cc: |
Description
Attached model does not build/simulate.
Build error (1 sample):
<<<
Dilution.c: In function 'eqFunction_83':
Dilution.c:1310: error: incompatible types when assigning to type 'modelica_real' from type 'real_array'
The problem bubbles also into C# generation, so the problem is somewhere in the SimCode or backend (??).
The attempted generated equations are from functionInitialEquations(), where seemingly unnecessary assignments of values to pre-values are generated.
The values are already set by the runtime, so the assignments are overshooting.
They are also using inappropriate ASUBs (with temporary arrays creation) instead direct crefs.
I'd recommend to filter them out completely to reduce bloating the generated code.
Attachments (1)
Change History (6)
by , 11 years ago
Attachment: | Dilution.mo added |
---|
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 11 years ago
Owner: | changed from | to
---|
comment:3 by , 11 years ago
seem to be connected to #2217.
My guess is that the generation of pre variables while the symbolic initialization is wrong, but it's just a guess.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
after fix, it should be able to simulate till stopTime=50