Simulation with AnyLogic/Discrete Event Simulation/Bank Model/Step 5. Adding custom animations for clients

''' 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.

Draw a group of shapes to represent a bank client
 * 1) 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]]

Add just drawn shapes to the group
 * 1) Select the oval and the polyline.
 * 2) Right-click the selection and choose Grouping|Create a group from the popup menu.
 * 3) You will see the group icon appeared in the centre of the selection. [[File:Step 5. Adding custom animations for clients 2.png]]
 * 4) Select the group and modify its properties.Name the group customerShape. [[File:Step 5. Adding custom animations for clients 3.png]]
 * 5) Select shapes and belittle them by dragging the handles.
 * 6) 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.png]] Successfully 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.

Modify the source properties
 * 1) Select the source object.
 * 2) 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.png]] You 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.