Opened 10 years ago
Closed 10 years ago
#3196 closed defect (fixed)
OMEdit vectorization support
Reported by: | Rüdiger Franke | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.9.3 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: | Adrian Pop, massimo ceraolo |
Description
OMEdit already supports vector connections with the Connect Array dialog. This dialog expects positive integer values, like 1
to connect u1
to y3[1]
in the example below. Additionally it should allow:
- enter no values and press ok -- e.g. to connect
u2
toy2
in the example below - enter array_subscripts with colon, like
2:3
for the connection ofu2
toy3[2:3]
in the example below
Moreover OMEdit does not seem to support the creation of vectors of components yet.
- The Attributes dialog should support names with a dimension specifier, like
y2[2]
and pass these unchanged to the Modelica text (currently such names lead to some undefined behavior).
See also the attached screenshot.
model Vectorization Modelica.Blocks.Interfaces.RealInput u1 annotation(Placement(visible = true, transformation(origin = {-30, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {-52, 64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealInput u2[2] annotation(Placement(visible = true, transformation(origin = {-30, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {-50, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealOutput y2[2] annotation(Placement(visible = true, transformation(origin = {30, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {38, 62}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealOutput y3[3] annotation(Placement(visible = true, transformation(origin = {30, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {30, 64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); equation connect(u1, y3[1]) annotation(Line(points = {{-30, 60}, {22, 60}, {22, 60}, {22, 60}}, color = {0, 0, 127})); connect(u2, y3[2:3]) annotation(Line(points = {{-30, 40}, {0, 40}, {0, 58}, {22, 58}, {22, 58}}, color = {0, 0, 127})); connect(u2, y2) annotation(Line(points = {{-30, 40}, {24, 40}, {24, 40}, {24, 40}}, color = {0, 0, 127})); annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2}))); end Vectorization;
Attachments (1)
Change History (7)
by , 10 years ago
Attachment: | OMEdit_Vectorization.png added |
---|
comment:1 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
comment:2 by , 10 years ago
Cc: | added |
---|
comment:3 by , 10 years ago
r25186 fixed point 1 and 2. For point 3 we first need to enhance OMC API to support the component dimension attribute.
comment:4 by , 10 years ago
Added setComponentDimensions(class, component, {dim1, dim2, dim3})
API in r25289.
comment:5 by , 10 years ago
Cc: | added |
---|
Note:
See TracTickets
for help on using tickets.
Milestone changed to 1.9.3 since 1.9.2 was released.