Although the outputs of an element in a localized Container can be referenced outside of the Container only if the output is exposed on that Container, the inputs to the element can come from any location in the model. That is, a localized Container is analogous to a two-way mirrored glass: you cannot look into the Container, but you can look out of it.
In cases where multiple outputs with the same name exist in a model, however, it is important to clearly identify the search logic used by GoldSim to link to outputs.
Consider the following example. Localized container L2 is contained within localized Container L1. Both L1 and L2 contain an element (with a primary output) named A1. A third element named A1 also exists outside of L1. Within L2, you create an Expression element (named B1), and specify its definition as 2*A1. Which of the three A1 elements does GoldSim create a link to?
The schematic above illustrates the search logic GoldSim would use to create the link. It would first look within its own scope (the local scope of B1). If it finds A1 there, it creates the link. If it does not find A1 in its local scope, it moves one level up in the scope hierarchy (in this case within L1) and looks for it there. If it finds A1 there, it creates the link. If it does not find A1 at that level, it continues to search upward through the various scopes that it has access to until it finds an A1, or exhausts the search (and fails to complete the link).
Warning: In the example shown above, if A1 exists in L2, it is impossible to access the outputs of the other A1 elements in the model from within L2. That is, B1 will always try to link to the "nearest" A1, and there is no way for B1 to reference one of the other A1 elements in the model. Even if you use the Link Cursor or the Insert Link dialog to explicitly link to one of these other elements, GoldSim will ignore this and link to the "nearest" A1. It will try to do this even if the output of the nearest A1 is incompatible with input requirements (and one of the other A1 has a compatible output). If you needed to access one of the other elements, you would need to change its name (to something that did not exist inside L2).