411 REFERENCE · Wikibooks
Simulation with AnyLogic/Discrete Event Simulation/Bank Model/Step 5. Adding custom animations for clients
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Step 5. Adding Custom Animations for Clients
At the moment bank clients are displayed on the animation as small rectangles. Now we want to define some custom animation for bank clients. You can use for that any existing image or draw some sophisticated animation using primitive AnyLogic shapes.
File:Step_1._Creating_a_new_model1.gif Draw a group of shapes to represent a bank client
Draw animation for customer as shown in the following figure. Draw it using polyline and oval.File:Step 5. Adding custom animations for clients1.png
File:Step_1._Creating_a_new_model1.gif Add just drawn shapes to the group
Select the oval and the polyline.
Right-click the selection and choose Grouping|Create a group from the popup menu.
You will see the group icon appeared in the centre of the selection.File:Step 5. Adding custom animations for clients 2.png
Select the group and modify its properties.Name the group customerShape.File:Step 5. Adding custom animations for clients 3.png
Select shapes and belittle them by dragging the handles.
We want to place the group outside the presentation area. Therefore, drag the diagram down with right mouse button pressed. Then drag the group of shapes above the flowchart as shown on the figure.File:Step 5. Adding custom animations for clients 4.pngSuccessfully added shapes will move along with the group. If some shape stays where it is, it means it was not added to the group and you need to redo the previous steps.
Now tell the source object that generated entities should be represented by this group of shapes.
File:Step_1._Creating_a_new_model1.gif Modify the source properties
Select the source object.
Type customerShape as Entity animation shape. You can use code completion assistant.File:Step 5. Adding custom animations for clients 5.png
Run the model and view the animation.
File:Step 5. Adding custom animations for clients5.pngYou can see customers are represented by our custom shapes now.
This model demonstrated the basics of the Enterprise Library. Now we are ready to create more advanced model.