Abstraction Layers


An abstraction layer is analogous to a new worksheet in an Excel™ workbook that is linked to a main worksheet.  Any value in the primary model can be “published” to the abstraction layers.  When an abstraction layer is created, the published values in the primary model layer (or in any other abstraction layer) are made available to a separate model in the new abstraction layer.  The abstraction layer model is built and modified in the same manner as the primary layer model with any additional model components and relationships that the user chooses to incorporate into the abstraction layer.  Internal variables on an abstraction layer may be selected from the published or ABSTRACTED values in a pull-down or pop-up list. 


An abstraction layer has the following basic file structure:

  1. METEDATA - the minimum metadata to accomplish ownership, version control, security, traceability, and searchability

  2. PREFERENCES - a set of settings that affects appearance, abstraction and other lsyer-specific qualities

  3. COMPONENT LIST - the unique set of registered names of model components and fragments contained in the abstraction layer


An abstraction layer has the following minimum metadata:

  1. MODEL NAME REG - the label assigned to the model by the Model Builder

  2. LAYER NAME STRING - the plain language name of the fragment

  3. LAYER NAME REG - registered name; the label assigned to the fragment by the Model Builder

  4. LAYER OWNER - the Model Builder user who initially defined the layer in the model

  5. LAYER VERSION NUMBER - the fragment base reference version number

  6. LAYER VERSION OWNER - the modeler information such as organization name and model URL

  7. LAYER VERSION DATE - the published date

  8. LAYER REVISION NUMBER - an appended fragment revision number

  9. LAYER REVISION OWNER - the user who last revised the fragment revision

  10. LAYER REVISION DATE - the date of fragment revision changes if changes are allowed

  11. LAYER COMPLIANCE - the version of the global system dynamics modeling standard followed by the Model Builder process used to build the layer

  12. LOCK LAYER - a value of “NO” (default) or “YES” to prevent Model Builder changes by a user who is not the model owner, model version owner, model revision owner, layer owner, layer version owner, layer revision owner or authorized by a password

  13. LAYER DESCRIPTION - an abstract of the layer’s scope and use – a “Read Me”


Support for an abstraction layer is built into the System Dynamics Calculator to augment the standard model.  The abstraction layer operates on values that have been explicitly “published” or ABSTRACTED in the primary model layer.  The ABSTRACTED values in the model’s primary layer are available in a pick list for internal variables used in the abstraction layer primarily by factories. 


The following functions are required in the abstraction layer:

  1. a list of ABSTRACTED values that are available to abstraction layers to pick from when defining formulas for any model component that is placed in the abstraction layer


Fragments


A Fragment is a subset of a particular model that the user defines for convenience – a set of stocks, flows, converters, variables, transformers and factories in the model that are related to each other.  A typical relationship would be a causal loop in the model. 


The Fragment symbol is rectangle that contains a stock, flow and converter symbol superimposed.  The following is the fragment symbol:


Fragment


Attributes configured by the Model Builder user for any fragment:

  1. COMPONENT LIST - the unique set of registered names of model components and fragments contained in the fragment


The fragment component list is retained in a manner that allows the fragment’s contained components to be easily distinguished from the rest of the model components.  In this way, the fragment can be “exploded” to expose its constituent model pieces and reconstructed to conceal its constituent model pieces on demand by the user without loosing information that describes connectivity with the rest of the model. 


Scripts


Scripting is a system-level feature that provides control over system attributes and various calculator features.  A script can be warehoused, sold and distributed by third parties.  A script type is placed on a new palette when the first script is defined.  To operate a script, it is simply placed on the canvas.  A script on the canvas is executed every time the simulation is run.  More than one script can be run with a simulation. 


The script symbol is a stylized oval such as the following:


Script


The script has the following basic file structure:

  1. METEDATA - the minimum metadata to accomplish naming, ownership, version control, traceability, and searchability

  2. SCRIPT - the sequence of instructions


The script has the following minimum metadata:

  1. SCRIPT NAME STRING - the plain language name of the script

  2. SCRIPT NAME REG - the label assigned to the script by the Model Builder

  3. SCRIPT OWNER - the Model Builder user who initially defined the script

  4. SCRIPT VERSION NUMBER - the script base reference version number

  5. SCRIPT VERSION OWNER - the modeler information such as organization name and script URL

  6. SCRIPT VERSION DATE - the published date

  7. SCRIPT REVISION NUMBER - an appended script revision number

  8. SCRIPT REVISION OWNER - the user who last revised the script revision

  9. SCRIPT REVISION DATE - the date of script revision changes if changes are allowed

  10. SCRIPT CUSTOMIZED SYMBOL - customized tiff file for this script

  11. LOCK SCRIPT - a value of “NO” (default) or “YES” to prevent Model Builder changes to the script by a user who is not the script owner, script version owner, script revision owner or authorized by a password

  12. SCRIPT DESCRIPTION - an abstract of the script’s scope and use – a “Read Me”


Many controls performed by a script are evident by “verbs” of “get” and “set” from the function list that the calculator supports.  For example, scripting supports the following controls and functions:

  1. Get / Set an attribute (of a named model component in a named model)

  2. Get / Set Date and Time, Get / Set Date, Get / Set Time, Get / Set Time Zone

  3. Get User

  4. Get / Set Location, Language

  5. Get / Set Number System, Convert Number from / to

  6. Get / Set Currency System, Convert Currency from / to

  7. Get / Set Unit System, Convert Unit from / to

  8. Wake, Sleep, Shut Down


The following controls are functions of the model simulator that can be scripted:

  1. Load, Unload (a model)

  2. Select (a page, palette, simple table/graph)

  3. Start, Stop, Pause, Resume (a simulation, movie)

  4. Display, Clear Display (a result, text string, picture)

  5. Print (a model, graph or table)


Controls may be executed immediately upon or “On” the detection of system events such as the following events:

  1. Calculator Start-Up / Shut-Down

  2. User Login / Logout

  3. Simulator Idle / Running

  4. Simulation Start / Finish, Trial Start / Finish, Interval Start / Finish

  5. Character entry, String entry

  6. Network Services Established / Lost, Available / Unavailable

  7. External Power Connected / Disconnected, Available / Unavailable

  8. Internal Power Available / Unavailable, 100%, >25%, >5%, >0%


Controls may be executed “At” a specific date and time, or just at a specific time on every date, or after an interval of time from now, or “After” an interval of time from a specified date and time.  Controls may be executed conditionally with an “If, Then, Else” logic.  A script may perform or “Do” another named script. 


System Dynamics Calculator  

The SD Model in Depth  ↑

Functions →

 

        System Dynamics Calculator

                The Calculator

                The SD Model in Depth

                        Stocks

                        Flows

                        Transformers

                        Converters

                        Variables

                        Factories

                        Customized Factory Packages

                        Abstraction Layers, Fragments and Scripts

                        Functions

                The Model Builder

                The Model Simulator

                Appendix: The Modeling Process

                System Dynamics CalculatorR1.pdf

                SD2ProjectProposalSDS.pdf