Hi everybody,
I am creating a library for System Dynamics modeling which unlike the existing free library by Cellier is making use of acausal connectors. For “Flow” - Elements I have a generic flow class that defines the interfaces:
partial model GenericFlow "Flow Template with replaceable ports"
replaceable FlowPort portA "Flow from/to Stock A";
replaceable FlowPort portB "Flow to/from Stock B";
end GenericFlow;
Its Icon looks like this and includes the magenta colored connectors:
For some special cases I will use different ports (e.g. class SpecialFlowPort). As an example I do have a class called “Outflow” which will redeclare the connector class used for portA:
model Outflow "Outflow from a stock"
extends Interfaces.GenericFlow(redeclare Interfaces.SpecialFlowPort portA);
[...]
end Outflow;
Its icon will automatically show the red colored SpecialFlowPort that has been exchanged for portA (left side):
Now if I am using this component in a new model (drag and drop) it will show the original magenta colored FlowPort connector again and also show that class name upon hovering over the port connector. (Note: The correct SpecialFlowPort is used though as a connection to a (correctly colored) magenta port (FlowPort - connector) is prohibited.)
Why will the redeclared connector class not be used in the model-diagram?
UPDATE:
Here is a picture of the class Outflow with the false color for the left side port showing (i.e. magenta instead of red):
I have cross-posted this question now on Stack Overflow to increase my chances of getting an answer.


