Page 141 - ExtendSim User Guide
P. 141

Tutorial 115
Adding complexity
As discussed in “Item attribute types” on page 126, ExtendSim supports both string and value attributes for items. The following example uses a string attribute type.
Creating a string attribute
Add a Set block (Item library) between the Create and Queue blocks so they look like the screenshot to the right. Label the Set block “Set Attribute”.
In the Set block’s dialog, choose New String Attribute from the table’s Property Name popup menu.
Name the string attribute Preference and click OK.
This causes the Executive block’s Item Attributes tab to appear. The table in this tab is where
the attribute values (and the corresponding strings) for the Preference attribute are declared.
In the table for entering string values for an attribute, enter the strings Wash Only and Wash and Wax as shown in the screen shot to the right.
Close the dialogs of the Executive and Set blocks.
☞ The Executive block’s lookup table provides a descriptive text label (string) for each attribute value. That string can then be used in the model in place of the corresponding attribute value, making the model more understandable. But the underlying architecture is that the values for an attribute are still numbers. In this case, the values for the Preference attribute are 1 (for Wash Only) and 2 (for Wash and Wax).
Generating the correct types of cars
To specify that items are correctly generated as 75% Wash Only and 25% Wash and Wax: Add a Random Number block (Value library) to the model.
Connect its value output to the first value input of the Set block.
Choose an Empirical table for the distribution in the Random Number block. In the dialog that appears, give the table 2 rows.
☞ Connecting to a Set block causes the Random Number block’s empirical table to be aware of attributes. In this case, connecting the Random Number block to the Set block’s first value input causes the empirical table to be populated with popup menus that relate to the first attri- bute (Preference) in the Set block’s properties table.
In the first row of the empirical table, select Wash Only from the popup menu and enter a Probability of 0.75.
In the second row of the empirical table, select Wash and Wax from the popup menu and enter a Probability of 0.25.
Close the Random Number dialog.
So that there will be sufficient attendants to drive all the cars that are generated, in the dialog
of the Resource Pool block enter Initial number: 2.
Since the bottom bay will now be used for cars that also need waxing:
Discrete Event


































































































   139   140   141   142   143