1 / 20

Advanced Container Options

Advanced Container Options. Overview. The Information Tab Localizing Containers Protecting Containers Conditional Containers Looping Containers Cloning Containers Adding an Internal Clock Saving Results Using Containers Controlling Graphics Using Containers.

morey
Download Presentation

Advanced Container Options

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advanced Container Options

  2. Overview • The Information Tab • Localizing Containers • Protecting Containers • Conditional Containers • Looping Containers • Cloning Containers • Adding an Internal Clock • Saving Results Using Containers • Controlling Graphics Using Containers

  3. Localizing Containers (Defining New Scopes) • Element ID’s can only be duplicated if they are within different scopes. • You create different scopes by localizing Containers (using context menu). • You can recognize a localized Container: • the “+” is red • default symbol in graphics pane is “closed” • icon in browsers is closed • Can only globalize a Container if it causes no naming conflicts

  4. Referencing Outputs in a Localized Container • Outputs can only be “seen” inside the Container, unless they are exposed • Once exposed, it is referenced as: ContainerID.OutputID • You can expose an output in four ways: • any outputs referenced outside the Container when it is localized are exposed (automatic) • Using the Link Cursor (automatic) • Using the Insert Link dialog (verified) • Manually using the Output’s context menu

  5. Nesting Localized Container

  6. Defining an Alias for an Exposed Output • Since the output is referenced as ContainerID.OutputID, what if there are two elements of the same type in the Container whose outputs you wish to expose? • GoldSim solves this by defining an alias for each exposed output • default alias is the OutputID • if there is a conflict, alias is OutputID_n • you can customize the alias

  7. Search Logic for Linking to an Output Present in Multiple Scopes • Although outputsfrom an element in a localized Container can only be referenced if they are exposed, inputsto an element in a localized Container can come from anywhere in the “upward search path”

  8. Example: Localization • Create a Container called X • Localize it • Inside the Container, add a Expression element named A (= 1 m3/yr) • Inside the Container, add two Reservoirs (R1 and R2) • Give each an upper bound of 10 m3 and an inflow rate of 10 m3/day • Outside of X: • Create an Expression element named A (=2 m3/yr) • Create a Sum element named B • Sum the Expressions and the two Overflow Rates

  9. Sealing Containers • Lowest level of protection you can use • No security • Intended to be used as a mechanism to help you check off those parts of your model have been QA’d • When a Container is sealed: • The user, the date/time, and a comment are added to the Container’s property dialog • Cosmetic changes can be made • In order to make any other kind of change, you must “break the seal”

  10. Sealing Containers (cont.) • A seal is broken by making any (non-cosmetic) change inside the Container • When a seal is broken: • The original user who sealed the Container, the user who broke the seal, and the date/time the seal was broke are added to the Container’s property dialog • You can also remove a seal directly through the Container’s property dialog

  11. Sealing Containers (cont.) • When you seal a Container that contains other Containers, all of the child Containers are sealed also • When you break a seal of a child Container, seal of parent is also broken • When you remove a seal of a child Container, the parent seal remains intact • Making a change inside a child Container that is not sealed does not break the seal of the parent

  12. Locking Containers • Highest level of protection • Can secure through a password • Intended to be used as a mechanism to prevent parts of a model from being modified • When a Container is locked: • The user, the date/time, and a comment are added to the Container’s property dialog • No changes at all can be made to the contents of the Container

  13. Locking Containers (cont.) • To unlock a Container you must provide a password • A Container can be locked with no password also • If you have forgotten the password to a Container, we can provide a “skeleton key” if you provide: • The filename • The Container name • Date and Time you want the key to become active (it remains active for 24 hours)

  14. Conditional Containers • Containers can be conditional • A conditional container can be active or inactive • If inactive, all of its contents are inactive • Before becoming active, an element propagates its Initial Value (if it has one), its actual value (if the element is static), or zero (most other elements) • After becoming inactive, an element continues to propagate its last output value(s) • Conditional Containers have “local” variables • Duration • Num_Activations

  15. Looping Containers • You can specify that a Container is a looping Container • Looping Containers carry out calculations repeatedly every timestep • The number of loops carried out is determined by a specified “Loop While” or “Loop Until” condition • Often used in conjunction with Previous Value element • Can reference “local” variable • LoopCount

  16. Cloning Containers • When a Container is cloned, • All contents are cloned • Adding a new element to one Container adds it to the Container’s clones • Deleting an element to one Container deletes it from the Container’s clones • Cloned Containers can be used to reuse algorithms at multiple places in a model • You only need to change the algorithm in one location

  17. Using Cloned Containers Localized Localized A B A B Clone2 Clone1 X = f(A,B) X = f(A,B)

  18. Adding an Internal Clock

  19. Saving Results Using Containers

  20. Controlling Graphics Using Containers

More Related