Opened 8 years ago
Closed 6 years ago
#4739 closed defect (fixed)
Erroneous equation count with arrays
| Reported by: | massimo ceraolo | Owned by: | somebody |
|---|---|---|---|
| Priority: | high | Milestone: | 1.14.0 |
| Component: | *unknown* | Version: | |
| Keywords: | Cc: |
Description (last modified by )
The following model:
model errorSize
Real x[:](start={ 0.2, 0.4, 0.6});
equation
der(x[1:3])+x[1:3]=fill(1/(time+0.1),3);
end errorSize;
gives rise to the following result when checking:
Check of errorSize completed successfully. Class errorSize has 3 equation(s) and 1 variable(s). 1 of these are trivial equation(s).
and the model obviously won't run.
AFAIK this is valid modelica
If I repeat checking with -d=newInst I get, instead:
[1] 16:20:30 Translation Error [Es1: 2:1-2:34]: Failed to deduce dimension 1 of x due to missing binding equation.
Tested with OM v1.13.0-dev-380-g8b177b9 (WIN 64-bit)
Change History (5)
comment:1 by , 8 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 8 years ago
comment:4 by , 6 years ago
| Milestone: | 1.14.0 → 1.16.0 |
|---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:5 by , 6 years ago
| Milestone: | 1.16.0 → 1.14.0 |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
This model now simulates with the NF
Note:
See TracTickets
for help on using tickets.

The specification doesn't say anything about how to deduce unknown dimensions in non-functions, see this ticket, so this is not strictly valid Modelica. However, we already deduce unknown dimensions from binding equations, since that's the de facto standard. Since Dymola also allows using the start attribute for this I added the same behaviour for the new frontend in 70d5639f. Note that the example model still doesn't simulate with the new frontend due to other unrelated issues though.