Difference between revisions of "Manage attributes"
(Added in 5.0 and other missing attributes to table. Hyperlinks to attributes. Notes column.) |
|||
(8 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
<breadcrumbs>Analytica User Guide > Working with Large Models > {{PAGENAME}}</breadcrumbs> | <breadcrumbs>Analytica User Guide > Working with Large Models > {{PAGENAME}}</breadcrumbs> | ||
+ | {{ReleaseBar}} | ||
− | Each object, such as a variable, module, or function, is a collection of [[Attributes]]. Some attributes, notably class, identifier, title, and description, apply to all objects of any [[Class]]. Others apply only to selected classes. For example, Definition, Inputs, and Outputs apply to Variables and Functions, but not Modules. See [[Attributes]] for a brief explanation of these (and other) attributes | + | Each object, such as a variable, module, or function, is a collection of [[Attributes]]. Some attributes, notably class, identifier, title, and description, apply to all objects of any [[Class]]. Others apply only to selected classes. For example, Definition, Inputs, and Outputs apply to Variables and Functions, but not Modules. You can see the Attributes of an object in the [[Object Window]] and in the [[Attribute panel]], and edit some of them in Edit mode. See [[Attributes]] for a brief explanation of these (and other) attributes. |
− | + | See below to [[#To show optional attributes for an Object]] or the [[#Attributes dialog]] to show or hide them for all objects of a Class: | |
− | This table shows which attributes you can see in these views, ''always'', marked as <span style="color:#32CD32">'''✓'''</span>, or '''optional''', marked as +. (Blank means the attribute does not apply to that class of objects.) | + | |
+ | == Attributes by Object Class == | ||
+ | |||
+ | This table shows which attributes you can see in these views, ''always'', marked as <span style="color:#32CD32">'''✓'''</span>, or '''optional''', marked as +. (Blank means the attribute does not apply to that class of objects.) | ||
:{| class="wikitable" | :{| class="wikitable" | ||
Line 15: | Line 19: | ||
!Function | !Function | ||
!Module | !Module | ||
+ | ! | ||
!Notes | !Notes | ||
|- | |- | ||
Line 21: | Line 26: | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
+ | |Classes of object include Decision, Variable, Function, Model, Module, and Attribute itself | ||
| | | | ||
|- | |- | ||
Line 27: | Line 33: | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
+ | |The unique name of the object. Up to 20 characters starting with a letter | ||
| | | | ||
|- | |- | ||
Line 33: | Line 40: | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
+ | |Explains what this object represents | ||
| | | | ||
|- | |- | ||
Line 39: | Line 47: | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
+ | |Brief text that appears in the objects node in a Diagram | ||
| | | | ||
|- | |- | ||
Line 45: | Line 54: | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
| | | | ||
+ | |A number, array, or expression from which to compute the value of this variable or function | ||
| | | | ||
|- | |- | ||
Line 51: | Line 61: | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
| | | | ||
+ | |For example, km/hr, KWh, or Btu | ||
| | | | ||
|- | |- | ||
Line 57: | Line 68: | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
+ | |If specified, this text appears in balloon when you move the cursor over a node, instead of the Description | ||
| | | | ||
|- | |- | ||
Line 63: | Line 75: | ||
| | | | ||
| | | | ||
+ | |The range of numbers or list of numbers or text values valid for this variable. | ||
| | | | ||
|- | |- | ||
Line 69: | Line 82: | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
| | | | ||
+ | |List of variables and functions used in the Definition | ||
| | | | ||
|- | |- | ||
Line 75: | Line 89: | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
| | | | ||
+ | |List of variables and functions that use this variable in their Definitions | ||
| | | | ||
|- | |- | ||
Line 81: | Line 96: | ||
| | | | ||
| | | | ||
+ | |The computed mid (deterministic) value of a variable | ||
| | | | ||
|- | |- | ||
Line 87: | Line 103: | ||
| | | | ||
| | | | ||
+ | |For nonlinear optimization, the solver uses this as the starting value for a Decision when finding its optimal value. | ||
| Optimizer edition, decision nodes | | Optimizer edition, decision nodes | ||
|- | |- | ||
Line 93: | Line 110: | ||
| | | | ||
| | | | ||
+ | |Set true for an Index that contains handles to variables which should not be evaluated in this index. | ||
| | | | ||
|- | |- | ||
Line 99: | Line 117: | ||
| | | | ||
| | | | ||
+ | |For a user input, an expression to evaluate when the user changes the definition of the variable. | ||
|Shown in [[Object window]] only for [[User Input nodes|user inputs]]. | |Shown in [[Object window]] only for [[User Input nodes|user inputs]]. | ||
|- | |- | ||
Line 105: | Line 124: | ||
| | | | ||
| | | | ||
+ | |For a Button, a script to evaluate when the user clicks the Button. | ||
|Obsolete. Use [[OnClick]] and [[OnChange]] instead. | |Obsolete. Use [[OnClick]] and [[OnChange]] instead. | ||
|- | |- | ||
Line 111: | Line 131: | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
| | | | ||
+ | |The list of parameters of a user-defined Function | ||
| | | | ||
|- | |- | ||
Line 117: | Line 138: | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
| | | | ||
+ | |Set true if the function can call itself. | ||
| | | | ||
|- | |- | ||
Line 123: | Line 145: | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
| | | | ||
+ | |Evaluate this expression to check the validity of the value whenever the Variable or Function is evaluated. | ||
| | | | ||
|- | |- | ||
Line 129: | Line 152: | ||
| | | | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
+ | |The name(s) of the person (people) who created this model. | ||
| | | | ||
|- | |- | ||
Line 135: | Line 159: | ||
| | | | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
+ | |Date this module was created. | ||
| | | | ||
|- | |- | ||
Line 141: | Line 166: | ||
| | | | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
+ | |The name of the file into which this model was last saved. | ||
| | | | ||
|- | |- | ||
Line 147: | Line 173: | ||
| | | | ||
|<span style="color:#32CD32">'''✓'''</span> | |<span style="color:#32CD32">'''✓'''</span> | ||
+ | |The date this model was last saved. | ||
| | | | ||
|- | |- | ||
Line 153: | Line 180: | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
+ | |You can create your own attributes to do what you want. | ||
| | | | ||
|- | |- | ||
Line 159: | Line 187: | ||
| | | | ||
| | | | ||
+ | |Specifies whether the variable should cache its value after computing it, or reclaim the memory for other purposes. | ||
| | | | ||
|+ | |+ | ||
− | |[[ | + | |[[AcpStyles]] |
| <nowiki>+</nowiki> | | <nowiki>+</nowiki> | ||
| <nowiki>+</nowiki> | | <nowiki>+</nowiki> | ||
| <nowiki>+</nowiki> | | <nowiki>+</nowiki> | ||
+ | |Flags and codes that specify styles and options used by the Analytica Cloud Player. | ||
| | | | ||
|+ | |+ | ||
Line 171: | Line 201: | ||
| | | | ||
| | | | ||
+ | |The default value(s) to use in a new cell (row, column, or slice) of an Edit table when one of its Indexes is expanded. | ||
|Does not appear for non-tables | |Does not appear for non-tables | ||
|- | |- | ||
Line 177: | Line 208: | ||
| | | | ||
| | | | ||
+ | |An expression that computes the format of a table cell -- for example, making negative numbers red. | ||
|[[Analytica 5.0]] or later | |[[Analytica 5.0]] or later | ||
|- | |- | ||
Line 183: | Line 215: | ||
| | | | ||
| | | | ||
+ | |Light gray text that appears in a user input field to prompt on what kind of input is expected. | ||
|[[Analytica 5.0]] or later | |[[Analytica 5.0]] or later | ||
|- | |- | ||
Line 189: | Line 222: | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
| | | | ||
+ | |List(s) of possible values for function parameters that allow only selected values. | ||
| | | | ||
|- | |- | ||
Line 195: | Line 229: | ||
| | | | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
+ | |The identifier of a variable in the module used as the default input when you draw an arrow to the module node. | ||
| | | | ||
|- | |- | ||
Line 201: | Line 236: | ||
| | | | ||
|<nowiki>+</nowiki> | |<nowiki>+</nowiki> | ||
+ | |The identifier of a variable in the module used as the default output when you draw an arrow from the module node. | ||
| | | | ||
|} | |} | ||
Line 210: | Line 246: | ||
: + optionally displayed | : + optionally displayed | ||
− | == | + | {{Release|6.3|| |
− | + | == To show optional attributes for an Object == | |
+ | |||
+ | By default, the Object view and Attribute panel don't show optional attributes. Here's how to see them (or hide them again) for a given Object -- you must be in [[Edit mode]]: | ||
+ | |||
+ | From the [[Object Window]], click the hover icon in the bottom left corner to see the menu to show or hide attributes. Move the mouse in the Object window, to show the button. | ||
+ | |||
+ | :[[image:showHideAttributeHoverInObjectWindow.png]] | ||
+ | |||
+ | From the Attribute menu in the [[Attribute panel]], chose the '''More ▸''' submenu. You can select which attributes to show or hide from the main Attribute menu: | ||
+ | |||
+ | :[[image:showHideAttributeFromAttributePane.png]] | ||
+ | |||
+ | In each case, the changes to which attributes are visible applies only to the currently selected object. If you want to change which attributes appear by default for all objects, see the next section. | ||
+ | }} | ||
+ | |||
+ | == Attributes dialog == | ||
+ | The Attributes dialog lets you select which optional attributes to display the [[Object window]] and [[Attribute panel]] and define new attributes. From the [[Object menu]], select the '''Attributes...''' dialog: | ||
:[[File:Chapter19_12.png]] | :[[File:Chapter19_12.png]] | ||
− | * '''Class: '''Use this menu to select variables, modules, or functions, so you can see and select the '''Attributes''' for that class. | + | * '''Class: '''Use this menu to select variables, modules, or functions, so you can see and select and control the '''Attributes''' for that class. |
− | * '''Attribute list: ''' | + | * '''Attribute list: ''' shows the attributes that may be visible for the selected class. An asterisk (*) identifies attributes that it always displays in the [[Object window]] and [[Attribute panel]]. Other Attributes with a checkmark are displayed optionally |
=== Display optional attributes === | === Display optional attributes === | ||
Line 223: | Line 275: | ||
To display an optional attribute in the [[Object window]] and [[Attribute panel]], click the attribute once to select it, then again to show a checkmark (√) to indicate it will be shown in these two views. | To display an optional attribute in the [[Object window]] and [[Attribute panel]], click the attribute once to select it, then again to show a checkmark (√) to indicate it will be shown in these two views. | ||
− | To hide an | + | To hide an attribute, click it once to select it, then again to remove the checkmark. |
=== Create new attributes === | === Create new attributes === | ||
− | |||
− | To create a new | + | You can create your own "User-Defined Attributes". For example, you could use a '''Source''' attribute to include a bibliographic reference or URL for information on which this number or expression of the Variable is based. |
+ | |||
+ | To create a new User-Defined Attribute (UDA) in the '''Attributes''' dialog: | ||
# Select '''new Attribute''' from the attribute list to show the new ''Attribute Title'' field and the '''Create''' button. | # Select '''new Attribute''' from the attribute list to show the new ''Attribute Title'' field and the '''Create''' button. | ||
# Enter the title for the new attribute in the ''Title'' field. The title can contain a maximum of 14 characters; 10 characters are the maximum recommended for visibility with all screen fonts. | # Enter the title for the new attribute in the ''Title'' field. The title can contain a maximum of 14 characters; 10 characters are the maximum recommended for visibility with all screen fonts. | ||
# Click the '''Create''' button to define the new attribute. | # Click the '''Create''' button to define the new attribute. | ||
− | + | By default, it displays a newly created attribute for modules, variables, and functions. You can switch off display for modules, variables, and/or functions, using the [[Class]] popup menu in the '''Attributes '''dialog, and clicking to turn off the checkmark. | |
=== Rename an attribute === | === Rename an attribute === | ||
+ | |||
To rename a created attribute: | To rename a created attribute: | ||
# Select it in the '''Attribute''' list. The ''Title'' field and the '''Rename''' button appear. | # Select it in the '''Attribute''' list. The ''Title'' field and the '''Rename''' button appear. | ||
Line 242: | Line 296: | ||
== See Also == | == See Also == | ||
− | * [[Attributes]] | + | * [[Attributes]]: Describes all attributes, including obscure inside attributes not usually visible to users, |
− | * [[Attribute panel]] | + | * [[Attribute panel]]: Panel that you can open below a Diagram window to view selected attributes. |
+ | * [[Object Window]]: WIndow that shows selected attributes of an Object | ||
* [[Objects_and_Their_Attributes_-_Part_1_of_3|Objects and Their Attributes]] | * [[Objects_and_Their_Attributes_-_Part_1_of_3|Objects and Their Attributes]] | ||
* [[Attrib of Obj]] | * [[Attrib of Obj]] |
Latest revision as of 19:46, 5 February 2025
Release: |
4.6 • 5.0 • 5.1 • 5.2 • 5.3 • 5.4 • 6.0 • 6.1 • 6.2 • 6.3 • 6.4 • 6.5 |
---|
Each object, such as a variable, module, or function, is a collection of Attributes. Some attributes, notably class, identifier, title, and description, apply to all objects of any Class. Others apply only to selected classes. For example, Definition, Inputs, and Outputs apply to Variables and Functions, but not Modules. You can see the Attributes of an object in the Object Window and in the Attribute panel, and edit some of them in Edit mode. See Attributes for a brief explanation of these (and other) attributes.
See below to #To show optional attributes for an Object or the #Attributes dialog to show or hide them for all objects of a Class:
Attributes by Object Class
This table shows which attributes you can see in these views, always, marked as ✓, or optional, marked as +. (Blank means the attribute does not apply to that class of objects.)
Attribute Variable Function Module Notes Class ✓ ✓ ✓ Classes of object include Decision, Variable, Function, Model, Module, and Attribute itself Identifier ✓ ✓ ✓ The unique name of the object. Up to 20 characters starting with a letter Description ✓ ✓ ✓ Explains what this object represents Title ✓ ✓ ✓ Brief text that appears in the objects node in a Diagram Definition ✓ ✓ A number, array, or expression from which to compute the value of this variable or function Units ✓ ✓ For example, km/hr, KWh, or Btu Help + + + If specified, this text appears in balloon when you move the cursor over a node, instead of the Description Domain + The range of numbers or list of numbers or text values valid for this variable. Inputs + + List of variables and functions used in the Definition Outputs + + List of variables and functions that use this variable in their Definitions Value + The computed mid (deterministic) value of a variable Initial Guess + For nonlinear optimization, the solver uses this as the starting value for a Decision when finding its optimal value. Optimizer edition, decision nodes MetaOnly + Set true for an Index that contains handles to variables which should not be evaluated in this index. OnChange + For a user input, an expression to evaluate when the user changes the definition of the variable. Shown in Object window only for user inputs. Script + For a Button, a script to evaluate when the user clicks the Button. Obsolete. Use OnClick and OnChange instead. Parameters + The list of parameters of a user-defined Function Recursive + Set true if the function can call itself. Check + + Evaluate this expression to check the validity of the value whenever the Variable or Function is evaluated. Author ✓ The name(s) of the person (people) who created this model. Created ✓ Date this module was created. File Info ✓ The name of the file into which this model was last saved. Last Saved ✓ The date this model was last saved. User-created (up to 5) + + + You can create your own attributes to do what you want. Caching Method + Specifies whether the variable should cache its value after computing it, or reclaim the memory for other purposes. AcpStyles + + + Flags and codes that specify styles and options used by the Analytica Cloud Player. Cell Default + The default value(s) to use in a new cell (row, column, or slice) of an Edit table when one of its Indexes is expanded. Does not appear for non-tables Cell Format Expression + An expression that computes the format of a table cell -- for example, making negative numbers red. Analytica 5.0 or later Cue Text + Light gray text that appears in a user input field to prompt on what kind of input is expected. Analytica 5.0 or later Parameter Enumerations + List(s) of possible values for function parameters that allow only selected values. Template Input + The identifier of a variable in the module used as the default input when you draw an arrow to the module node. Template Output + The identifier of a variable in the module used as the default output when you draw an arrow from the module node.
Key:
- plain editable by user
- italic set by Analytica
- ✓ always displayed
- + optionally displayed
To show optional attributes for an Object
By default, the Object view and Attribute panel don't show optional attributes. Here's how to see them (or hide them again) for a given Object -- you must be in Edit mode:
From the Object Window, click the hover icon in the bottom left corner to see the menu to show or hide attributes. Move the mouse in the Object window, to show the button.
From the Attribute menu in the Attribute panel, chose the More ▸ submenu. You can select which attributes to show or hide from the main Attribute menu:
In each case, the changes to which attributes are visible applies only to the currently selected object. If you want to change which attributes appear by default for all objects, see the next section.
Attributes dialog
The Attributes dialog lets you select which optional attributes to display the Object window and Attribute panel and define new attributes. From the Object menu, select the Attributes... dialog:
- Class: Use this menu to select variables, modules, or functions, so you can see and select and control the Attributes for that class.
- Attribute list: shows the attributes that may be visible for the selected class. An asterisk (*) identifies attributes that it always displays in the Object window and Attribute panel. Other Attributes with a checkmark are displayed optionally
Display optional attributes
To display an optional attribute in the Object window and Attribute panel, click the attribute once to select it, then again to show a checkmark (√) to indicate it will be shown in these two views.
To hide an attribute, click it once to select it, then again to remove the checkmark.
Create new attributes
You can create your own "User-Defined Attributes". For example, you could use a Source attribute to include a bibliographic reference or URL for information on which this number or expression of the Variable is based.
To create a new User-Defined Attribute (UDA) in the Attributes dialog:
- Select new Attribute from the attribute list to show the new Attribute Title field and the Create button.
- Enter the title for the new attribute in the Title field. The title can contain a maximum of 14 characters; 10 characters are the maximum recommended for visibility with all screen fonts.
- Click the Create button to define the new attribute.
By default, it displays a newly created attribute for modules, variables, and functions. You can switch off display for modules, variables, and/or functions, using the Class popup menu in the Attributes dialog, and clicking to turn off the checkmark.
Rename an attribute
To rename a created attribute:
- Select it in the Attribute list. The Title field and the Rename button appear.
- Edit the name of the attribute in the Title field.
- Click the Rename button.
See Also
- Attributes: Describes all attributes, including obscure inside attributes not usually visible to users,
- Attribute panel: Panel that you can open below a Diagram window to view selected attributes.
- Object Window: WIndow that shows selected attributes of an Object
- Objects and Their Attributes
- Attrib of Obj
- Optimizer Attributes
- Glossary
Enable comment auto-refresher