#3794 closed defect (fixed)
Frontend eats input / output qualifiers
Reported by: | Rüdiger Franke | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Frontend | Version: | v1.10.0-dev-nightly |
Keywords: | Cc: |
Description
See the following example:
package HierarchicalConnector connector IO input Real u; output Real y; end IO; model Test IO io; equation io.y = 2*io.u; end Test; model Test2 IO[1] io; equation io.y = 2*io.u; end Test2; end HierarchicalConnector;
The frontend generates for HierarchicalConnector.Test the correct flat model:
class Test input Real io.u; output Real io.y; equation io.y = 2.0 * io.u; end Test;
For HierarchicalConnector.Test2 it generates:
class Test2 Real io[1].u; Real io[1].y; equation io[1].y = io[1].u * 2.0; end Test2;
The translation fails with:
Too few equations, under-determined system. The model has 1 equation(s) and 2 variable(s).
This is critical for FMI export.
Change History (7)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 9 years ago
I'm not totally sure model Test
generates the expected results. We only keep input/output on the top-level class, right? If you use model IO
, you get the expected results from how the front-end was designed (which is what @rfranke thinks is the wrong result).
comment:3 by , 9 years ago
IO is a connector so I think is correct what we generate for Test and it should be the same for Test2.
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
9d2b906/OMCompiler shall fix this. I'm adding a test too.
comment:5 by , 9 years ago
I had this fix also but had to go on a car trip for 7 hours and you fixed it in the meantime :)
This seems to be an scalar vs array issue.