Page 142 - ExtendSim User Guide
P. 142

116
Tutorial
Adding complexity
Change the label of the bottom bay to Wash/Wax Bay.
Enter Delay: 8 in that bay’s dialog, to indicate that waxing and washing takes longer
than washing alone.
Each item generated by the Create block will now have a Preference attribute. In 75% of the cases the car will be characterized as Wash Only; 25% of the time the cars will be designated as Wash and Wax.
The next step is to have the model determine which car is which.
Checking the attribute
In the dialog of the Select Item Out block:
Choose to Select output based on: property.
In the property popup menu, select the string attribute named Preference. Check the box to Display string attributes in table.
This causes the Preference attribute to be listed in the table’s header and puts popup menus for that attribute’s strings in the table.
☞ The Select Item Out block routes items to its outputs based on the selection conditions and internal rules. When attributes are used to select the outputs, the block’s top output is refer- enced as number 0, the second output as 1, and so forth.
To cause cars that don’t need waxing to be routed to the top output:
In the table’s first row, select Wash Only from the Preference popup menu.
Enter 0 in the Select Output column for the Wash Only row. That setting will route the Wash Only cars to the top output.
To cause cars that need waxing to be routed to the second output:
In the table’s second row, select Wash and Wax from the Preference popup menu.
Enter 1 in the Select Output column for the Wash and Wax string. That setting will route the Wash and Wax cars to the second output.
Close the dialog, save the model, and run the simulation.
You may notice that fewer cars pass through this car wash than in the example without attri- butes or attendants. This is due to the problem of a car with a particular attribute following another car with the same attribute. There is only one entrance to the bays, and the bays now have designated purpose. This means that the second car must wait for the first one to finish even if the other bay is free. Note, however, that every time you run the model, the numbers for the two lines in the Exit block indicate that the cars have been processed in roughly the same proportion as specified in the Random Number block.
Discrete Event


































































































   140   141   142   143   144