Difference between revisions of "Inspection Commands"
Line 2: | Line 2: | ||
This page describes typescript commands that are used to display Analytica objects and attributes. | This page describes typescript commands that are used to display Analytica objects and attributes. | ||
+ | |||
= AllShow = | = AllShow = | ||
+ | |||
+ | :AllShow | ||
+ | |||
+ | Displays all of the user-specified objects in a model, including all their user-specified attributes. | ||
+ | |||
+ | :AllShow m | ||
+ | |||
+ | Shows the attributes of module m, and of all objects contained within m. | ||
+ | |||
+ | = «attribute» «ident» = | ||
+ | |||
+ | Typing the name of an attribute followed by the identifier of an object displays the value of the indicated attribute and object. Optionally, the keyword "Of" can occur between, as in: «attribute» Of «ident». | ||
+ | |||
+ | === Examples == | ||
+ | |||
+ | :definition Time | ||
+ | :units Weight | ||
+ | :Title Revenue_details | ||
= List = | = List = | ||
+ | |||
+ | :List | ||
+ | |||
+ | Lists every identifier in the global namespace. This is a horribly long list you probably don't want to see, although it does provide a way to check to see what identifiers are already in use. Equivalent to ''List Any''. | ||
+ | |||
+ | :List k | ||
+ | |||
+ | Displays the identifiers of all objects in the global namespace of a particular kind. The possible ''kinds'' can be obtained using: | ||
+ | :List Object | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | :List Decision -- Shows all your decision variables | ||
+ | :List Chance -- Shows all your chance variables | ||
+ | :List Index -- All user-defined index variables | ||
+ | :List Variable -- Shows all general variable types. This does not include Chance, Decision, index, etc. | ||
+ | :List Function -- lists all your user-defined functions | ||
+ | :List Attribute -- all attributes, both system-defined and user-defined. | ||
+ | |||
= Profile = | = Profile = | ||
+ | |||
+ | :Profile o | ||
+ | |||
+ | Displays all attributes of an object, both user-defined and computed. Primarily of interest to system developers. | ||
= Show = | = Show = | ||
+ | |||
+ | :Show o | ||
+ | |||
+ | Displays an object's user-specified attributes. In Analytica Enterprise, it also displays the amount of CPU time that has been spent evaluating this object -- the same information viewed from the [[Performance Profiler]]. | ||
+ | |||
+ | This is the most commonly used commands within the typescript window for viewing object information. | ||
+ | |||
+ | A more terse display is given by ''What o'', and a more verbose display is printed by ''Profile o''. | ||
= Tree = | = Tree = | ||
+ | |||
+ | :Tree o | ||
+ | |||
+ | Displays the inputs of an object (variable, function, etc), the inputs of those inputs, etc. Each line is prefaced with ''N'' '+' characters to indicate ''N'' generations of ancestry from ''o''. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | In the Txc.ana model: | ||
+ | >Tree Health_damage | ||
+ | + Health Damage (d/yr) Health_damage = IF Conc>Thresh THEN H_damage_factor*(Conc-Thresh) ELSE 0 | ||
+ | ++ Health Damage Factor (d/yr/ug/m^3) H_damage_factor = Fractiles( [0, 0, 0, .25, .6, 1, 1.5, 2.2, 3, 5, 10]/3M) | ||
+ | ++ Concentration (ug/m^3) Conc = Baseconc*(1-Reduction) | ||
+ | +++ Emissions Reduction Reduction = [0,0.3,0.5,0.7,0.8,0.9,0.95] | ||
+ | +++ Base Concentration (ug/m^3) Baseconc = Lognormal(10, 1.5) | ||
+ | ++ Threshold (ug/m^3) Thresh = Uniform(0,10) | ||
= What = | = What = | ||
+ | |||
+ | :What o | ||
+ | |||
+ | Displays a very brief summary of object ''o''. If ''o'' is a variable, it prints its identifier, title, units and value. If its value is an array, it prints only the indexes of its value. | ||
= Why = | = Why = | ||
+ | |||
+ | :Why v | ||
+ | |||
+ | Prints the identifier, title, units and value of variable ''v'', and of all those variables on which it depends (its inputs). Used for examining why the variable has the value it does. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | >Why Health_damage | ||
+ | Health_damage : Health Damage (d/yr) = Table(Reduction) | ||
+ | Description: The increment in annual death rate per individual from exposure to TXC. | ||
+ | This is zero if the concentration is less than the health damage factor,~ | ||
+ | otherwise it's the Health Damage Factor time the amount that the Concentration is ~ | ||
+ | above the Threshold. | ||
+ | Health_damage = IF Conc>Thresh THEN H_damage_factor*(Conc-Thresh) ELSE 0 | ||
+ | H_damage_factor : Health Damage Factor (d/yr/ug/m^3) = 333.3n | ||
+ | Conc : Concentration (ug/m^3) = Table(Reduction) | ||
+ | Thresh : Threshold (ug/m^3) = 5 | ||
= WhyAll = | = WhyAll = |
Revision as of 17:56, 29 January 2009
This page describes typescript commands that are used to display Analytica objects and attributes.
AllShow
- AllShow
Displays all of the user-specified objects in a model, including all their user-specified attributes.
- AllShow m
Shows the attributes of module m, and of all objects contained within m.
«attribute» «ident»
Typing the name of an attribute followed by the identifier of an object displays the value of the indicated attribute and object. Optionally, the keyword "Of" can occur between, as in: «attribute» Of «ident».
= Examples
- definition Time
- units Weight
- Title Revenue_details
List
- List
Lists every identifier in the global namespace. This is a horribly long list you probably don't want to see, although it does provide a way to check to see what identifiers are already in use. Equivalent to List Any.
- List k
Displays the identifiers of all objects in the global namespace of a particular kind. The possible kinds can be obtained using:
- List Object
Examples
- List Decision -- Shows all your decision variables
- List Chance -- Shows all your chance variables
- List Index -- All user-defined index variables
- List Variable -- Shows all general variable types. This does not include Chance, Decision, index, etc.
- List Function -- lists all your user-defined functions
- List Attribute -- all attributes, both system-defined and user-defined.
Profile
- Profile o
Displays all attributes of an object, both user-defined and computed. Primarily of interest to system developers.
Show
- Show o
Displays an object's user-specified attributes. In Analytica Enterprise, it also displays the amount of CPU time that has been spent evaluating this object -- the same information viewed from the Performance Profiler.
This is the most commonly used commands within the typescript window for viewing object information.
A more terse display is given by What o, and a more verbose display is printed by Profile o.
Tree
- Tree o
Displays the inputs of an object (variable, function, etc), the inputs of those inputs, etc. Each line is prefaced with N '+' characters to indicate N generations of ancestry from o.
Examples
In the Txc.ana model:
>Tree Health_damage + Health Damage (d/yr) Health_damage = IF Conc>Thresh THEN H_damage_factor*(Conc-Thresh) ELSE 0 ++ Health Damage Factor (d/yr/ug/m^3) H_damage_factor = Fractiles( [0, 0, 0, .25, .6, 1, 1.5, 2.2, 3, 5, 10]/3M) ++ Concentration (ug/m^3) Conc = Baseconc*(1-Reduction) +++ Emissions Reduction Reduction = [0,0.3,0.5,0.7,0.8,0.9,0.95] +++ Base Concentration (ug/m^3) Baseconc = Lognormal(10, 1.5) ++ Threshold (ug/m^3) Thresh = Uniform(0,10)
What
- What o
Displays a very brief summary of object o. If o is a variable, it prints its identifier, title, units and value. If its value is an array, it prints only the indexes of its value.
Why
- Why v
Prints the identifier, title, units and value of variable v, and of all those variables on which it depends (its inputs). Used for examining why the variable has the value it does.
Examples
>Why Health_damage Health_damage : Health Damage (d/yr) = Table(Reduction) Description: The increment in annual death rate per individual from exposure to TXC. This is zero if the concentration is less than the health damage factor,~ otherwise it's the Health Damage Factor time the amount that the Concentration is ~ above the Threshold. Health_damage = IF Conc>Thresh THEN H_damage_factor*(Conc-Thresh) ELSE 0 H_damage_factor : Health Damage Factor (d/yr/ug/m^3) = 333.3n Conc : Concentration (ug/m^3) = Table(Reduction) Thresh : Threshold (ug/m^3) = 5
Enable comment auto-refresher