Opened 5 years ago
Last modified 5 years ago
#5635 assigned enhancement
Multi(---) connection issue
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | OMEdit | Version: | |
Keywords: | Cc: |
Description
In OpenModelica,
- it allows to make the connection between two vectorized connectors even when the parameter that is used for specifying the connector size has not been declared. For example in below case, I can still make the connection even when the nZon has not been declared.
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1[nZon](k = 1) annotation(Placement(visible = true, transformation(extent = {{-60, -60}, {-40, -40}}, rotation = 0))); Buildings.Controls.OBC.CDL.Continuous.MultiMax multiMax1(nin=nZon) annotation(Placement(visible = true, transformation(extent = {{-12, -60}, {8, -40}}, rotation = 0))); equation connect(con1.y, multiMax1.u) annotation(Line(points = {{-38, -50}, {-14, -50}, {-14, -50}, {-14, -50}}, color = {0, 0, 127}, thickness = 0.5));
- it allows to make the connection between two vectorized connectors which have different size. The auto-generated connection statement does not specify the element-to-element connection between the two connector. For example in below case, output connector vector of con1 has size 2 and input connector vector of multiMax1 has size 3, the connection is still allowed.
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con1[2](k = 1) annotation(Placement(visible = true, transformation(extent = {{-60, -60}, {-40, -40}}, rotation = 0))); Buildings.Controls.OBC.CDL.Continuous.MultiMax multiMax1(nin=3) annotation(Placement(visible = true, transformation(extent = {{-12, -60}, {8, -40}}, rotation = 0))); equation connect(con1.y, multiMax1.u) annotation(Line(points = {{-38, -50}, {-14, -50}, {-14, -50}, {-14, -50}}, color = {0, 0, 127}, thickness = 0.5));
Attachments (1)
Change History (4)
by , 5 years ago
Attachment: | MultiMaxTotal.mo added |
---|
follow-up: 2 comment:1 by , 5 years ago
comment:2 by , 5 years ago
Replying to casella:
Determining the connector size in general could be difficult, or impossible. For example, you may connect two components in a certain model M, and then instantiate that model within a cointainer model that actually gives values to the array sizes.
What would be your requirement, exactly?
Ideally, I would expect that OpenModelica would allow to make the connection only when feed-in connector vector and the receiving connector vector have the same size that is specified by a declared parameter (may or may not assign value).
Also, the receiving connector vector would expand if there is another feed-in connector.
comment:3 by , 5 years ago
Component: | *unknown* → OMEdit |
---|---|
Milestone: | Future → 2.0.0 |
Owner: | changed from | to
Status: | new → assigned |
Adeel, after working on #5628 would you have any ideas about this?
Determining the connector size in general could be difficult, or impossible. For example, you may connect two components in a certain model M, and then instantiate that model within a cointainer model that actually gives values to the array sizes.
What would be your requirement, exactly?