Vensim software work required for 3 students 3 copies

profileLisa09
06.pdf

Dr. Daniel Xing Email: [email protected]

EBUS-504

Operations Modelling and Simulation

Lecture 5

Use of variables and attributes

University of Liverpool

Management School,

UK

Key learning outcomes

1. What are variables and attributes?

2. Use variables and attributes under different scenarios

3. Use variables and attributes in Witness to improve your

model

Recall the definitions

Variables

Variables provide an abstraction for features of the model whose values typically change as the

model evolves over the course of the observation interval

Attributes • Characteristic of all entities: describe, differentiate

• All entities have same attribute “slots” but different values for different entities, for example:

• Time of arrival

• Due date

• Priority

• Color

• Attribute value tied to a specific entity

• Like “local” (to entities) variables

• Some automatic in Arena, some you define

Recall the definitions

Variables Attributes

Independent Attached to one group of entities

Their values change as model evolves Each entity can have a collection of attributes

Information under one attribute remain unchanged

e.g. e.g.

Number of outputs the colour of your parts

Time to despatch a delivery the number of components for an assembly

Number of serviced customers/day the age of someone in 2020

A simple scenario

A simple scenario

, B3, B4

, B2, B4

, B2, B4

A simple scenario

A simple scenario

M1 Logic

A simple scenario

M2,3,4 Logic

A simple scenario

A simple scenario

Free set of questions

• Q1: How many parts have arrived from each kind?

• Q2: For how long they are in the system?

• Q3: Which buffer holds the most of the parts?

• Q4: How long does each part wait in every buffer or conveyor?

• Q5: In average, how long does it take to generate one A5?

A simple scenario

A simple scenario

In the following example, an attribute will be created in order to

capture the arrival time from Part A2, A3, A4 to B2, B3 and B4.

Therefore, we will calculate how long a part a A2, A3, and A4 stay at

each buffer.

In order to calculate this time, three variables are going to be

created, which will capture this time.

In Witness, we use the internal variable TIME to know the exact time

of the simulation.

A simple scenario

Attr_A2_Time_in: attribute that captures the arrival time for A2 to

B2. In this case, at B2 Actions on input the following expression is

considered: Attr_A2_Time_in = Time

Remark: it will be the same for A3 and A4.

A simple scenario

A2_waiting, A3_waiting and A4_waiting are variables

representing the total waiting time for the most recent outputted A2,

A3, and A4 in their corresponding buffers.

At Actions on output in each buffer, we have:

A2_waiting = TIME - Attr_A2_Time_in

A3_waiting = TIME - Attr_A3_Time_in

A4_waiting = TIME - Attr_A4_Time_in

Why not attributes here?

A simple scenario

Run simulation to 1000 minutes

Proposed Exercise

1. Numbers of parts A1, A2, A3, A4, and A5 generated;

2. Time it takes to generate a part A5

3. How long does it take for the 100th A5 to be produced?

New scenarios

Company ABC purchases a group of white balls to produce different

final products. The purchasing will be done every 10 minute with

batch size 5 and there is 2 balls in initial stock. M1 can paint all the

white balls (one at a time and it costs 3 minutes) into three different

colours (blue, red and green). Then based on the colour of a ball, a

blue ball will be further processed by M2-M3 and red ball will be

further processed by M3-M4 and a green ball will be further

processed by M2-M4. All M2, M3, M4 are single machines with cycle

time 5 minutes.

How can we use variables and attributes to better simulate above

system?

Dr. Daniel Xing Email: [email protected]

EBUS-504

Operations Modelling and Simulation

Lecture 5

Use of variables and attributes

University of Liverpool

Management School,

UK