Shipping Splits Rules
- A rule in the following format must exist. Otherwise the program will not add any shipping split terminals.
<Enclosure from="*" to="*" location="@ShippingSplit@" rule="T" ... />
Attribute rule in the above rule specifies the terminals will be used as first choice. If no such terminals are available, the code will look for the attribute noSSTerminals of the WiringRule element (the parent node). The noSSTerminals attribute can be
- If noSSTerminals is empty and both sections have no available spare terminals, then no shipping split will be added.
- Neither the attribute rule nor the attribute noSSTerminals adds spare terminals to the connection. The code only inserts an empty panel to the panel list and marks the panel type as @shippingSplit@.
Other rules like from="*" to="@ShippingSplit@" and from="@ShippingSplit@" to= "*" should follow. ( "*" can be explicitly specified as a different panel type. And these rules will add spare terminals to the connection according to the rule attribute specified.
Let's look at an example to illustrate how the program handles shipping splits. Suppose we have a connection from panels 1:A to 2:A, and the shipping split should use T terminals.
To start with, we have panel 1:A and 2:A sorted in order.
If we specifiy
<Enclosure from="*" to="*" rule="T:" fromTermSide="" toTermSide=""location="@ShippingSplit@"/>
And a spare terminal in T panel is available, now we have
1:A -> 1:@ShippingSplit@ -> 2A.
Then the code passes the process for handling generic spare terminals. In this process the program finds that there is a connection from 1:A to 1:@ShippingSplit@. It looks for the rule from="A" to="@ShippingSplit@" location="@SameSection@" and adds a terminal specified by this rule. If this rule is not found, it looks from="*" to="@ShippingSplit" ...
If the user's requirement is that if T terminal is not available in the first stack then use T terminals in the next stack, we need to specify
noSSTerminals="next" or noSSTerminals=":T"
Now we have panels as 1:A -> 2:@ShippingSplit@ -> 2:A.
From="*" to="@ShippingSplit@" location="@DifferentStack@" rule=":T"
From="@ShippingSplit@" to="*" location="@SameStack@" rule="T"
will work for this situation.
In short, the program adds a new panel type @ShippingSplit@ for handling shipping splits. Rules for how to handle connections to/from panels typed @ShippingSplit@ need to be added.