Skip to content

Number Assignment Module

Arena Blog

Changing Attribute Values in a Queue or Group

Share:

By Melanie Barker, Arena Simulation Consultant
Published: January 23, 2017

Categories: Tips & Tricks

Welcome to the Arena Tips and Tricks column! We’ll be using this section of the newsletter to highlight features of Arena that we want to call to your attention – either they may not be as well known, or they’re very valuable and deserve a second glance. For our first column, we’ll be starting with the A() Variable.

You’ve probably used the Assign module to change the value of an entity’s attribute. But what if you need to change the attribute value of an entity that’s in a queue or group and you can’t remove it? That’s where the A() Variable can come in handy. The A() Variable is a General Attribute Variable; every attribute value for every entity can be accessed and changed using this variable. For entities in queues and groups, you can look up their attribute values with the AQUE() or AG() variables. However, these only return the value; you can’t change the attribute value with them. To change the value, that’s where you’ll need to use the A() Variable.

The A() Variable has two parameters: the attribute number and the entity number. The attribute number is the value that Arena uses to reference that particular construct. You can either explicitly set the attribute numbers yourself using the Attributes Element in the Element panel, or you can ask Arena to look it up for you with the NSYM() function. To use the NSYM() function, you’ll use the attribute name as its parameter. For example, if your attribute is called a DueDate, you can use NSYM (a DueDate) to find the internal number for the a DueDate attribute.

Now you need the entity number. If you don’t know the entity number, you can use the ENTATRANK() or ENTINGROUP() to find the entity number of an entity in a queue or group, respectively. Once you have those two pieces of information, you can use them as the parameters in your A() Variable to assign a new value to that entity’s attribute. Let’s say that you need to change the due date of entity 15 to be time 20. See the dialog box below for the right way to define that assignment in the Assign module.

Since you’re using an Assign module, you still need an entity to make this change to the other entity. This will typically be done using an entity as a control entity to make changes to your system.

If you’d like to see an example of the A() Variable in use, you can take a look under the Smarts Advanced Concepts models; the “Advanced Concept Change Attribute with A Variable.doe” model shows you how to search a queue and assign a new value to the queued entity’s attribute.

Share:

Sign up for the Newsletter

Arena User Group

Arena has a very active user community on LinkedIn. Ask questions, learn about best practices and connect with other simulation professionals.

Join the Community

Module 4 Homework Assignment PART I: SHORT RESPONSE 1. Number each step of the police selection process in the order in which it appears in your text. Numbers should be 1 through 10. 1. Short application 2. Detailed application 3. Medical examination 4. Physical ability test 5. Written examination 6. Background investigation 7. Psychological testing 8. Oral interview/oral board 9. Academy training 10. Probation 2. According to your textbook, Robert B. Mills states that police applicants should possess nine psychological qualities. Name five of these qualities. Five of the nine psychological qualities a police officer should possess according to Robert B. Mills include; motivation for a police career, normal self-assertiveness, emotional stability under stress, sensitivity toward minority groups and social deviates, and collaborative leadership skills. 3. Your textbook lists seven advantages to hiring college-educated police officers. Name four of these advantages. Four of the seven advantages to hiring college-educated police officers according to the text book are; there will be better written reports, better communication with the public, more effective job performance, and fewer citizen complaints.