Opened 12 years ago
Closed 7 years ago
#1930 closed defect (worksforme)
Wrong symbolic simplification
Reported by: | Vitalij Ruge | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | 1.13.0 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
The follow is a model with wrong symbolic simplification.
model A Real x1; Real x2; Real y; Real w; equation x1 = 0/y; y*x2 = 0; der(y) = 1; w = x1/sin(x1); initial equation y = 0; x2 = 1; end A;
Output with +d=optdaedump
Known Variables (constants) (3) ============================= 1: x1:VARIABLE(start = 0.0 ) = 0.0 .A, .Real type: Real (start = 0.0 ) 2: w:VARIABLE(start = 0.0 ) = 0.0 .A, .Real type: Real (start = 0.0 ) 3: x2:VARIABLE(start = 0.0 ) = 0.0 .A, .Real type: Real (start = 0.0 ) Initial Equations (2, 2) ) ========= 1 : y = 0.0 2 : 0.0 = 1.0
Error 1
If x1 is 0 then w is "division by zero" or 1.
Error 2
x1 is (to runtime = 0) not define (x1 =0/0).
Error 3
From y*x2 = 0 not follows x2 = 0/y = 0. In this case is correct x2 = 1, y = 0
(see initial equation).
Change History (10)
comment:1 by , 12 years ago
Component: | Backend → Frontend |
---|
comment:3 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:4 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:9 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:10 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Replying to vitalij:
Error 1
If x1 is 0 then w is "division by zero" or 1.
As of v1.13.0-dev-155-g68350e9 a division by zero error is generated and the simulation is aborted at initialization.
The error is caused by Expression Simplification because this reports the frontend