Incorporating a Module into the FRAMEwork System (FRAMES)


Title Page
Legal Notice
Table of Contents
Introduction
Example
STEP 1
STEP 2
STEP 3
STEP 4
STEP 5
APPENDIX A
APPENDIX B
APPENDIX C
APPENDIX D
 

Step 2: Define Model Inputs and Boundary Conditions

After the measure and units for the model have been defined, inputs the model will consume and outputs it will produce must be described in detail. While FRAMES 2.0 does not require object-oriented programming, using such a design process can be of great assistance. As models move from initial integration into more reusable integration, this will be a part of the process. A programmer need not learn object-oriented programming or switch languages, but an understanding of how such programming mirrors real-world objects will help in understanding how concepts get compartmentalized in the more standard dictionaries that house the datasets for inputs and outputs in FRAMES.

The term dictionary is used to refer to a collection of data about data (otherwise known as metadata). A dataset is a specific instance of values that conform to a dictionary specification. From an object-oriented programming perspective, dictionary would be the declaration of a class; the dataset would be the instance of the class. Think of a dictionary as a simple class that has all public data-members that are multi-dimensional arrays. Note that FRAMES does not use class within other classes because this would eliminate some programming languages from use (namely FORTRAN).

Metadata are entered into FRAMES through the Dictionary Editor, which provides an interface to construct the dictionaries your model will consume and produce. Note that all data flowing into and out of components in FRAMES 2.0 goes through the dictionary-dataset construct. You are not limited in the number of input and output dictionaries for your model, but each should have a real-world interpretation. You are limited to one dictionary that encompasses the input you wish to obtain from the user. This one dictionary is called a module input dictionary, and it only differs from other dictionaries in that it is populated by a user. The dictionaries in FRAMES 2.0 are where we transition from the real-world meaning of a model to its parameter meaning. Thus, it is critical that precise real-world names and descriptions be given to dictionaries and associated parameters.

When creating a dictionary within the FRAMES 2.0 Dictionary Editor, a .DIC file extension is automatically assigned to the dictionary file. FRAMES 2.0 does not require that a dictionary contain a .DIC file extension; however, the Dictionary Editor only recognizes .DIC file extensions as dictionaries. More information on creating a dictionary without using the Dictionary Editor can be found in the design documentation for that editor.

There are several different types of dictionaries in FRAMES 2.0. Model Input Dictionaries are expected to be populated by the user, while Boundary Conditions Dictionaries are used to define datasets produced or consumed by models as part of calculation. Dictionaries are not simply labeled input and output because what one model produces another consumes. There are also System Developer Dictionaries, which can be used universally by models, and Module Developer Dictionaries, which are idiosyncratic to a model or a modeling system.

To create the model's dictionaries in FRAMES,

  1. Open FRAMES
  2. Under the Editors Menu, click on Dictionary Editor.
  3. Determine the type of dictionary you are adding:
    • If you are adding a dictionary that must be available to all models and is populated by the user, click on Module Inputs under System Developer in the tree on the left.
    • If you are adding a dictionary that must be available to all models and defines datasets to be consumed or produced during calculation, click on Boundary Conditions under System Developer.
    • If you are adding a dictionary specific to your model that will be populated by the user, select Module Inputs under Module Developer.
    • If you are adding a dictionary specific to your model that will define datasets produced or consumed as part of calculation, select Boundary Conditions under Module Developer.
  4. The panel on the right will list all dictionaries currently available for that type. Click on the "New Dictionary" button.
  5. An open file form will appear. Enter a name into the filename field that does not already exist and click OK.
  6. A message box will appear notifying you that this file does not exist and prompt you to create this file. Click Yes.
  7. A new dictionary has just been created and will appear in both the list in the panel on the right and also in the tree on the left beneath the current selected node.

Once a dictionary is created, data (called variables) must be added to it and their properties defined. To add variables,

  1. Select the newly created dictionary from the tree. In the panel on the right, a list of all the variables associated with dictionary is provided.
  2. Click on the "Add Variable" button.
  3. An input box will appear. Enter the name of the new variable and click OK. Note that the name can be no longer than 40 characters and cannot include punctuation.
  4. A new variable has been added to the list. Expand the tree on the left-hand side beneath the selected dictionary. Your new variable will appear with a list of all the other variables belonging to the dictionary in question.

To define properties for each variable, select the newly created variable from the tree. A panel will appear listing all the properties of the variable. Fill in the data accordingly. Properties include the following:

  • Primary Key--[NEED A DESCRIPTION OF THIS]
  • Description--brief explanation of the parameter.
  • Data Type--choice of Float (in FORTRAN a real), String, Integer, or Logical (in Java a boolean, in C++ a bool). The string type can hold any string up to 4096 characters.
  • Dimension--number of dimensions associated
  • Minimum--lowest value allowed
  • Maximum--highest value allowed
  • Measure--as described previously
  • Unit--as described previously
  • Stochastic--a flag signifying that a parameter can be modified safely by Sensitivity, Uncertainty, and Parameter Estimation tools. Those tools are assumed not to change the value outside its given range.
  • Preposition--defines what English preposition will precede the index value. For example, if a variable ChemName had a value of "for" for the preposition, the nearly English statement of "Chemical concentration for Benzene" can be constructed out of values stored in the dataset and the dictionary.
  • Related Variables--Related Variables are the list of variables that have the same indices as the current variable. Another way of saying it is that the related variables and the current variable occur together.
  • List of Indices--what other variable in the system define the indices for a value.
  • Scalar--with dimension, set the total dimensionality of a parameter. If the scalar flag is set to Y then the dimensionality of the parameter is simply the count in the Dimension column. If however the scalar flag is set to N then a set of values can be storeD in the parameter for each element in the dimension. This has the end effect of adding one to the number of dimensions.
  • Vector--Vector / Scalar is the switch between whether the current variable contains a single value or a collection of values. Vector is a collection of values.
Step 1: Add Units and Measures
Step 3: Invoke the model
Step 4: Provide a description of the model
Step 5: Categorize the model

Battelle Logo
Home | Security and Privacy | Contact Us