Difference between revisions of "Inspection Commands"

Line 1: Line 1:
 
[[Category:Typescript Commands]]
 
[[Category:Typescript Commands]]
 
[[Category:Inspection Commands]]
 
[[Category:Inspection Commands]]
 +
 +
 +
__TOC__
 +
 
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'''
 
:'''AllShow'''
  
Line 15: Line 17:
  
 
== Attribute ident ==
 
== Attribute ident ==
 
 
:''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:  
 
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:  
Line 22: Line 23:
  
 
=== Examples ===
 
=== Examples ===
definition Time
+
:<code>definition Time</code>
units Weight
+
:<code>units Weight</code>
Title Revenue_details
+
:<code>Title Revenue_details</code>
  
 
== Clock ==
 
== Clock ==
 
 
:'''Clock'''
 
:'''Clock'''
  
 
Prints the date and time and information about memory usage.
 
Prints the date and time and information about memory usage.
  
 +
<pre style="background:white; border:white">
 
  >Clock
 
  >Clock
 
  Thu, Jan 29, 2009 12:33 PM
 
  Thu, Jan 29, 2009 12:33 PM
 
   Memory Size  Max Used  In Use    Free      % Full
 
   Memory Size  Max Used  In Use    Free      % Full
 
   4.295G      15.72M    15.72M    4.279G    0.3661%
 
   4.295G      15.72M    15.72M    4.279G    0.3661%
 +
</pre>
  
 
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'''
  
Line 56: Line 57:
  
 
=== Examples ===
 
=== Examples ===
 
+
:<code>List Object</code>
:<code>List Object</code> Displays a list of all class types.  These are the valid names that can appear as the ''k'' parameter.
+
::Displays a list of all class types.  These are the valid names that can appear as the «k» parameter.
:<code>List Command</code> Displays all typescript commands.
+
:<code>List Command</code>  
:<code>List Decision</code> Shows all your decision variables
+
::Displays all typescript commands.
:<code>List Chance</code> Shows all your chance variables
+
:<code>List Decision</code>  
:<code>List Index</code> All user-defined index variables
+
::Shows all your decision variables
:<code>List Variable</code> Shows all general variable types.  This does not include Chance, Decision, index, etc.
+
:<code>List Chance</code>  
:<code>List Function</code> lists all your user-defined functions
+
::Shows all your chance variables
:<code>List Attribute</code> all attributes, both system-defined and user-defined.
+
:<code>List Index</code>  
:<code>List Keyword</code> Displays a list of all keywords.  These are reserved words that cannot be used for identifiers.
+
::All user-defined index variables
:<code>List SysVar</code> Displays all system variables.
+
:<code>List Variable</code>  
:<code>List GraphStyleTemplate</code> Displays the identifiers of all graph style templates.
+
::Shows all general variable types.  This does not include Chance, Decision, index, etc.
:<code>List "carbon"</code> Lists all identifiers that contain the word "carbon"
+
:<code>List Function</code>  
:<code>List SysVar "Null|Undef"</code> Lists all system variables that contains the word "Null" or the word "Undef"
+
::lists all your user-defined functions
:<code>List Function "^Max"</code> Lists all user-defined functions that start with the letters ''Max''
+
:<code>List Attribute</code>
 +
:: all attributes, both system-defined and user-defined.
 +
:<code>List Keyword</code>  
 +
::Displays a list of all keywords.  These are reserved words that cannot be used for identifiers.
 +
:<code>List SysVar</code>  
 +
::Displays all system variables.
 +
:<code>List GraphStyleTemplate</code>
 +
:: Displays the identifiers of all graph style templates.
 +
:<code>List "carbon"</code>  
 +
::Lists all identifiers that contain the word "carbon"
 +
:<code>List SysVar "Null|Undef"</code>  
 +
::Lists all system variables that contains the word "Null" or the word "Undef"
 +
:<code>List Function "^Max"</code>  
 +
::Lists all user-defined functions that start with the letters ''Max''
  
 
== News ==
 
== News ==
Line 76: Line 90:
 
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.
 
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.
  
 +
<pre style="background:white; border:white">
 
  >News
 
  >News
 
  8 Sep 2008
 
  8 Sep 2008
Line 85: Line 100:
 
  Los Gatos, CA 95033
 
  Los Gatos, CA 95033
 
  Support: 650-212-1212, support@lumina.com.
 
  Support: 650-212-1212, support@lumina.com.
 +
</pre>
  
 
== PrintTable ==
 
== PrintTable ==
 
 
:'''PrintTable''' ''v''
 
:'''PrintTable''' ''v''
 
Prints a summary of a result «v», 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
+
:<code>>PrintTable Health_damage</code>
Table(Reduction)
+
:<code>Table(Reduction)</code>
  
 
== Profile ==
 
== Profile ==
 
 
:'''Profile''' ''o''
 
:'''Profile''' ''o''
  
Line 101: Line 115:
  
 
== Show ==
 
== Show ==
 
 
:'''Show''' ''o''
 
:'''Show''' ''o''
  
Line 111: Line 124:
  
 
== ShowAskAttribute ==
 
== ShowAskAttribute ==
 
 
'''ShowAskAttribute''' ''objectClass''
 
'''ShowAskAttribute''' ''objectClass''
  
Line 117: Line 129:
  
 
== Tree ==
 
== Tree ==
 
 
:'''Tree''' ''o''
 
:'''Tree''' ''o''
  
Line 124: Line 135:
 
=== Examples ===
 
=== Examples ===
  
In the <code>Txc.ana</code> model:
+
<pre style="background:white; border:white">
 
  >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
Line 132: Line 143:
 
  +++  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)
 +
</pre>
  
 
== What ==
 
== What ==
 
 
:'''What''' ''o''
 
:'''What''' ''o''
  
Line 140: Line 151:
  
 
== Why ==
 
== Why ==
 
 
:'''Why''' ''v''
 
:'''Why''' ''v''
  
Line 146: Line 156:
  
 
=== Examples ===
 
=== Examples ===
 
+
<pre style="background:white; border:white">
 
  >Why Health_damage
 
  >Why Health_damage
 
  Health_damage        : Health Damage (d/yr) = Table(Reduction)
 
  Health_damage        : Health Damage (d/yr) = Table(Reduction)
Line 157: Line 167:
 
  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
 +
</pre>
  
 
== WhyAll ==
 
== WhyAll ==
 
 
:'''WhyAll'''
 
:'''WhyAll'''
  

Revision as of 21:13, 29 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

 >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.