Class Attribute

From Planimate Knowledge Base
Jump to: navigation, search

Class Attributes

A Class Attribute is an attribute that is SHARED between all items of a particular class.

Because the Attribute is a single figure, it is capable of being logged and displayed using a Attribute View.

Class Attributes are found in the Item Edit Menu of each Item Class.

When this option is selected, a list appears.

If the list has no entries, then a single line will appear, prompting you to Add a New Class Attribute. Class Attributes are created and edited in the same manner as other Attributes, with similar dialogs and options.

Uses for Class Attributes

When an attribute applies to EVERY item in one class, then it is much more efficient to keep one common copy of the value, as a Class Attribute. Class Attributes are useful for deriving information about behaviour or results from the group of items as a whole. Class Attributes become group counters or accumulators because only the items of that class can contribute to their own class attribute.

Class Attributes are the obvious place that a class can accumulate information on itself.

For Example:

  • total trips for a specific class of transport.
  • total overtime worked by a shift,
  • maximum overtime worked by a class of employee,
  • total kilometres travelled
  • carrying capacity

A Class Attribute name can be applied to a range of item classes, with each class given a different setting. This enables the Attribute to be generically referenced in the model.

Generically Referencing Class Attributes

This enables the Attribute to be generically referenced in the model.

Having the ability to generically reference a number of Class's Attributes enables you to cut down on the number of Portal Attributes, Change Objects and Switches you require to control attribute calculations, path selection and model behaviour.

  • For example, you can set the Maximum Quantity of items picked up from a PickUp to reference a Class Attribute of the Carrier Item doing the pick-up.
  • If a Portal Attribute was used by the PickUp/DropOff, you would require a series of Change Objects and perhaps Switches to achieve the same result.

When Class Attributes are referenced in a Distribution Dialog, then they are acting similarly to a standard interaction parameter, in that the attribute only needs to be specified in (and referenced from) one place, and the delay time will vary from class to class.

Creating, Editing Class Attributes


Right Click on an Item Class in the Item Palette and select Class Attributes from the Menu.

Attributes already present are then displayed in a list, along with their initial values.

Right Click to select an Item Attribute to be edited or Click the Add Attribute button to create a new Class Attribute.

Fields, Settings and Buttons

These are the fields, settings and buttons that are available when creating or editing Class Attributes.


Field/Setting
Description

Name
Enter/Edit the Name of the Attribute.
Attribute names do NOT carry any case sensitivity in Planimate®.
Comment
Enter/Edit an optional comment, to guide those who come after you.
Initial Value
Enter/Edit the value applied to this Attribute upon the model being loaded.
Units
Select a Display format for this Attribute.

Planimate® tries to determine the format automatically. eg. typing 100s or 25:32 or 3d will interpret as a time; typing $123.45 will interpret as money; typing values greater than 60 will interpret as a value.

Option Settings

Clear Contents at Start
The Attribute's Clear Value will be applied to the Attribute at the beginning of each run.
Clear Value
The value applied to the Attribute whenever its contents are cleared (at Run Start or via an Operation in a routine).
Constant During Run
Specifies a condition that the Attribute can only be Read, and not be written to, during a run. An attempt to alter the value of this attribute will be detected and produce a run time error. This speeds up comparisons, and detects model errors where the "constant" may be accidentally modified.
Retain on Paste Replace
(Usage unknown, possibly not a valid option)


Buttons

Attribute
Displays a Menu of Options
  • Show References
Displays a References list showing (if relevant): Source Object; Location; Modified Flag; Reference; Routine Line Number; Routine Operation. Right Click on a Source to switch to that object's panel and have it highlighted by a flashing box.
  • Add View
Adds a View of this Attribute to the currently visible Panel.
Remove
Deletes the Attribute.
Warns if any references exist for this Attribute.