Difference between revisions of "Inspection Commands"

Line 4: Line 4:
  
  
= AllShow =
+
== AllShow ==
  
:AllShow
+
:'''AllShow'''
  
 
Displays all of the user-specified objects in a model, including all their user-specified attributes.
 
Displays all of the user-specified objects in a model, including all their user-specified attributes.
  
:AllShow m
+
:'''AllShow''' ''m''
  
Shows the attributes of module m, and of all objects contained within m.   
+
Shows the attributes of module «m», and of all objects contained within «m».   
  
= «attribute» «ident» =
+
== 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».
+
:''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 «attribute» and «ident», as in:  
 +
 
 +
:''attribute'' '''Of''' ''ident''.
  
 
=== Examples ===
 
=== Examples ===
 +
definition Time
 +
units Weight
 +
Title Revenue_details
  
:definition Time
+
== Clock ==
:units Weight
 
:Title Revenue_details
 
 
 
= Clock =
 
  
:Clock
+
:'''Clock'''
  
 
Prints the date and time and information about memory usage.
 
Prints the date and time and information about memory usage.
Line 37: Line 39:
 
See also Function [[Today]]() for obtaining the current date and time.
 
See also Function [[Today]]() for obtaining the current date and time.
  
= List =
+
== 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''.
+
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
+
:'''List''' ''k''
  
Displays the identifiers of all objects in the global namespace of a particular kind.  The possible ''kinds'' can be obtained using:
+
Displays the identifiers of all objects in the global namespace of a particular kind «k».  The possible kinds can be obtained using:
:List Object
+
:'''List''' ''Object''
  
:List "«pattern»"
+
:'''List''' ''"pattern"''
  
Displays all identifiers that match the regular expression «pattern».  This can be combined with the object type: <code>List k "«pattern»"</code>
+
Displays all identifiers that match the regular expression «pattern».  This can be combined with the object type:  
 +
:'''List''' ''k "pattern"''
  
 
=== Examples ===
 
=== Examples ===
  
:List Object: Displays a list of all class types.  These are the valid names that can appear as the ''k'' parameter.
+
:<code>List Object</code> Displays a list of all class types.  These are the valid names that can appear as the ''k'' parameter.
:List Command: Displays all typescript commands.
+
:<code>List Command</code> Displays all typescript commands.
:List Decision: Shows all your decision variables
+
:<code>List Decision</code> Shows all your decision variables
:List Chance: Shows all your chance variables
+
:<code>List Chance</code> Shows all your chance variables
:List Index: All user-defined index variables
+
:<code>List Index</code> All user-defined index variables
:List Variable: Shows all general variable types.  This does not include Chance, Decision, index, etc.
+
:<code>List Variable</code> Shows all general variable types.  This does not include Chance, Decision, index, etc.
:List Function: lists all your user-defined functions
+
:<code>List Function</code> lists all your user-defined functions
:List Attribute: all attributes, both system-defined and user-defined.
+
:<code>List Attribute</code> all attributes, both system-defined and user-defined.
:List Keyword: Displays a list of all keywords.  These are reserved words that cannot be used for identifiers.
+
:<code>List Keyword</code> Displays a list of all keywords.  These are reserved words that cannot be used for identifiers.
:List SysVar: Displays all system variables.
+
:<code>List SysVar</code> Displays all system variables.
:List GraphStyleTemplate: Displays the identifiers of all graph style templates.
+
:<code>List GraphStyleTemplate</code> Displays the identifiers of all graph style templates.
:List "carbon": Lists all identifiers that contain the word "carbon"
+
:<code>List "carbon"</code> Lists all identifiers that contain the word "carbon"
:List SysVar "Null|Undef": Lists all system variables that contains the word "Null" or the word "Undef"
+
:<code>List SysVar "Null|Undef"</code> Lists all system variables that contains the word "Null" or the word "Undef"
:List Function "^Max" : Lists all user-defined functions that start with the letters <code>Max</code>
+
:<code>List Function "^Max"</code> Lists all user-defined functions that start with the letters ''Max''
 
 
= News =
 
  
Displays some basic information about the current edition and release of Analytica that you are using, date it was compiled, some copyright info, and Lumina contact info.  Works in ADE also.
+
== News ==
 +
:'''News'''
 +
Displays some basic information about the current edition and release of Analytica that you are using, date it was compiled, some copyright info, and Lumina contact info.  Works in [[ADE]] also.
  
 
  >News
 
  >News
Line 83: Line 86:
 
  Support: 650-212-1212, support@lumina.com.
 
  Support: 650-212-1212, support@lumina.com.
  
= PrintTable =
+
== PrintTable ==
  
:PrintTable ''v''
+
:'''PrintTable''' ''v''
Prints a summary of a result, for example showing just the indexes, to typescript.
+
Prints a summary of a result «v», for example showing just the indexes, to typescript.
  
 
  >PrintTable Health_damage
 
  >PrintTable Health_damage
 
  Table(Reduction)
 
  Table(Reduction)
  
= Profile =
+
== Profile ==
  
:Profile o
+
:'''Profile''' ''o''
  
Displays all attributes of an object, both user-defined and computed.  Primarily of interest to system developers.
+
Displays all attributes of an object «o», both user-defined and computed.  Primarily of interest to system developers.
  
= Show =
+
== Show ==
  
:Show o
+
:'''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]].
+
Displays object «o»'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.
 
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''.
+
A more terse display is given by '''What''' ''o'', and a more verbose display is printed by '''Profile''' ''o''. See also [[Show]].
  
= ShowAskAttribute =
+
== ShowAskAttribute ==
  
ShowAskAttribute <objectClass>
+
'''ShowAskAttribute''' ''objectClass''
  
This command takes a single parameter, which is the class of an object (Variable, Chance, Decision, Index, function, Constant, Module, Library, etc).  It returns a list of the attriutes that should be shown for that object, e.g., [Class, Identifier, Title, units, description, definition, value, outputs, inputs, check].  After you check an attribute from the Attributes dialog (from the Object menu) in Analytica, or toggle this setting using the AskAttribute typescript command, the ShowAskAttribute command provides access to the state of those settings.
+
This command takes a single parameter, which is the class of an object (Variable, Chance, Decision, Index, function, Constant, Module, Library, etc).  It returns a list of the attributes that should be shown for that object, e.g., [Class, Identifier, Title, units, description, definition, value, outputs, inputs, check].  After you check an attribute from the Attributes dialog (from the '''Object''' menu) in Analytica, or toggle this setting using the [[AskAttribute]] typescript command, the [[ShowAskAttribute]] command provides access to the state of those settings.
  
= Tree =
+
== Tree ==
  
:Tree o
+
:'''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''.
+
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 ===
 
=== Examples ===
  
In the Txc.ana model:
+
In the <code>Txc.ana</code> model:
 
  >Tree Health_damage
 
  >Tree Health_damage
  +    Health Damage            (d/yr)            Health_damage = IF Conc>Thresh THEN H_damage_factor*(Conc-Thresh) ELSE 0
+
  +    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)
 
  ++    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)
 
  ++    Concentration            (ug/m^3)          Conc = Baseconc*(1-Reduction)
  +++  Emissions Reduction                        Reduction = [0,0.3,0.5,0.7,0.8,0.9,0.95]
+
  +++  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)
 
  +++  Base Concentration        (ug/m^3)          Baseconc = Lognormal(10, 1.5)
  ++    Threshold                (ug/m^3)          Thresh = Uniform(0,10)
+
  ++    Threshold                (ug/m^3)          Thresh = Uniform(0, 10)
  
= What =
+
== What ==
  
:What o
+
:'''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.
+
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
+
:'''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.
+
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 ===
 
=== Examples ===
Line 150: Line 153:
 
   otherwise it's the Health Damage Factor time the amount that the Concentration is ~
 
   otherwise it's the Health Damage Factor time the amount that the Concentration is ~
 
   above the Threshold.
 
   above the Threshold.
  Health_damage = IF Conc>Thresh THEN H_damage_factor*(Conc-Thresh) ELSE 0
+
  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
 
  H_damage_factor      : Health Damage Factor (d/yr/ug/m^3) = 333.3n
 
  Conc                : Concentration (ug/m^3) = Table(Reduction)
 
  Conc                : Concentration (ug/m^3) = Table(Reduction)
 
  Thresh              : Threshold (ug/m^3) = 5
 
  Thresh              : Threshold (ug/m^3) = 5
  
= WhyAll =
+
== WhyAll ==
  
:WhyAll
+
:'''WhyAll'''
  
 
Shows the inputs of all objects in a model.  This listing can be very lengthy.
 
Shows the inputs of all objects in a model.  This listing can be very lengthy.
 +
 +
==See Also==
 +
* [[Typescript]]

Revision as of 21:31, 21 January 2016

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

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 «attribute» and «ident», as in:

attribute Of ident.

Examples

definition Time
units Weight
Title Revenue_details

Clock

Clock

Prints the date and time and information about memory usage.

>Clock
Thu, Jan 29, 2009 12:33 PM
  Memory Size  Max Used  In Use    Free      % Full
  4.295G       15.72M    15.72M    4.279G    0.3661%

See also Function Today() for obtaining the current date and time.

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 «k». The possible kinds can be obtained using:

List Object
List "pattern"

Displays all identifiers that match the regular expression «pattern». This can be combined with the object type:

List k "pattern"

Examples

List Object Displays a list of all class types. These are the valid names that can appear as the k parameter.
List Command Displays all typescript commands.
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.
List Keyword Displays a list of all keywords. These are reserved words that cannot be used for identifiers.
List SysVar Displays all system variables.
List GraphStyleTemplate Displays the identifiers of all graph style templates.
List "carbon" Lists all identifiers that contain the word "carbon"
List SysVar "Null|Undef" Lists all system variables that contains the word "Null" or the word "Undef"
List Function "^Max" Lists all user-defined functions that start with the letters Max

News

News

Displays some basic information about the current edition and release of Analytica that you are using, date it was compiled, some copyright info, and Lumina contact info. Works in ADE also.

>News
8 Sep 2008
Optimizer edition 4.1.2 for creating and evaluating models.
Copyright © 1996-2008 Lumina Decision Systems, Inc.
This program was written with MacApp®: ©1985-1996 Apple Computer, Inc.
Lumina Decision Systems
26010 Highland Way
Los Gatos, CA 95033
Support: 650-212-1212, support@lumina.com.

PrintTable

PrintTable v

Prints a summary of a result «v», for example showing just the indexes, to typescript.

>PrintTable Health_damage
Table(Reduction)

Profile

Profile o

Displays all attributes of an object «o», both user-defined and computed. Primarily of interest to system developers.

Show

Show o

Displays object «o»'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. See also Show.

ShowAskAttribute

ShowAskAttribute objectClass

This command takes a single parameter, which is the class of an object (Variable, Chance, Decision, Index, function, Constant, Module, Library, etc). It returns a list of the attributes that should be shown for that object, e.g., [Class, Identifier, Title, units, description, definition, value, outputs, inputs, check]. After you check an attribute from the Attributes dialog (from the Object menu) in Analytica, or toggle this setting using the AskAttribute typescript command, the ShowAskAttribute command provides access to the state of those settings.

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

WhyAll

WhyAll

Shows the inputs of all objects in a model. This listing can be very lengthy.

See Also

Comments


You are not allowed to post comments.