table of contents - faculty personal homepage-...

25
Systems Engineering Department SE 405 Lab # 1 INTRODUCTION AND MANUAL SIMULATION Objective 1: Introduction to Simulation. A comprehensive introduction to the problem of simulation is given in this lab. The students are introduced to the area by giving several examples from daily life. The different nature of simulation-based programming is emphasized. The concepts of timing and event list are illustrated through the use of relevant examples. Introduction to the following concepts: 1. Need of simulation in real world problems. 2. Objectives attainable by simulation. 3. Use of simulation as a tool for solving complex problems in real life. 4. Different ways of simulation of problems. 5. Use of programming languages in simulation. 6. Different commercial packages like Awesim and ProModel. 7. Reliability of the results. 8. Single server queuing problem and its variations. Objective 2: Understanding Manual Simulation. To enable the students to perform manual simulation. This lab will guide the students in understanding the basic operations behind a simulation problem in a step-by-step process. Things to do: To conduct manual simulation the following is needed.

Upload: vuphuc

Post on 09-Mar-2018

219 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 1

INTRODUCTION AND MANUAL SIMULATION

Objective 1: Introduction to Simulation.

A comprehensive introduction to the problem of simulation is given in this lab. The students are introduced to the area by giving several examples from daily life. The different nature of simulation-based programming is emphasized. The concepts of timing and event list are illustrated through the use of relevant examples.

Introduction to the following concepts:

1. Need of simulation in real world problems.2. Objectives attainable by simulation.3. Use of simulation as a tool for solving complex problems in real life.4. Different ways of simulation of problems.5. Use of programming languages in simulation.6. Different commercial packages like Awesim and ProModel.7. Reliability of the results.8. Single server queuing problem and its variations.

Objective 2: Understanding Manual Simulation.

To enable the students to perform manual simulation. This lab will guide the students in understanding the basic operations behind a simulation problem in a step-by-step process.

Things to do:

To conduct manual simulation the following is needed.

1. Define objectives of the single-server queue simulation problem.2. Initialization of the problem.3. Define Events and Event List.4. Understand How to update state variables every time an event happens.5. Understand the collection of statistics.6. Stopping rule.

Assignment

The students are requested to perform manual simulation as given in the example from the textbook for the single server queuing model. Tables are provided for recording the stepwise change in the state variables and different parameters.

Page 2: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 1

INTRODUCTION AND MANUAL SIMULATION

Assignment

Single Server Queuing System – Manual Simulation.

Consider the Example given in Page 11 in your text book for single server queuing

system. Event wise Table representation on manual simulation is explained. The

explanation in the book is done till the number delayed reaches to 6. Using the

following data, continue working on the same problem till the number delayed

reaches 10.

Arrival Times: A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4,

A9=1.9, A10=0.8, A11=1.2, A12=0.2, A13=1.0, A14=1.5, A15=0.5.

Service Times: S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6, S7=1.0, S8=0.5,

S9=1.5, S10=2.0, S11=1.2, S12=0.5, S13=1.3, S14=1.5, S15=0.5.

Calculate the following performance measures when you stop the simulation at the

number delayed as 10 customers.

a) Average number of customers in the Queue.

b) Average delay per customer.

c) Utilization of the server.

Also Provide the graphs for the number of customers in the queue Q(t) and the

Utilization of the server B(t).

Page 3: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 2

SIMULATION USING FORTRANObjective:

To enable the students to perform simulation using FORTRAN. This lab exercise will guide the students in understanding the basic simulation program in a high level programming language. The logic and the flow of the program is implemented in FORTRAN simply because most of the students are familiar with it. The exercise of writing subroutines gives hands-on experience for a practical simulation problem.Things to do:

FORTRAN compilation requires following steps.

9. Understanding the flow of the program

10. Subroutines required are

a) INITb) TIMINGc) ARRIVEd) DEPARTe) REPORTf) UPTAVGg) EXPON(RMEAN)h) RAND(I)

11. Main program structure

12. Inputs required to run the program

13. Specification of the desired output statistics

14. Description of the stopping criteria

15. Report generation and interpretation.

Things to do:

Rerun the program with different input values and evaluate the results obtained.

Assignment

1. Rerun the program for different input values.

2. Edit the Fortran Program to change the stopping criteria and run for different Input values.

Page 4: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 2

SIMULATION USING FORTRAN

Assignment

The Fortran program provided to you has the stopping criteria by number of

customers. Now change the criteria based on time. Now stop the simulation for the

following data and submit reports for each output.

1) Stopping Time = 2500

Mean Interarrival Time = 2.5

Mean Service Time = 3.2

2) Stopping Time = 2500

Mean Interarrival Time = 2.0

Mean Service Time = 1.5

3) Stopping Time = 2000

Mean Interarrival Time = 1.5

Mean Service Time = 1.6

Page 5: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 2

SIMULATION USING FORTRAN

Assignment

The Fortran program provided to you has the stopping criteria by number of

customers. Now change the criteria based on time. Now stop the simulation for the

following data and submit reports for each output.

1) Stopping Time = 2500

Mean Interarrival Time = 3.5

Mean Service Time = 3.0

2) Stopping Time = 2500

Mean Interarrival Time = 2.0

Mean Service Time = 2.5

3) Stopping Time = 2000

Mean Interarrival Time = 2.5

Mean Service Time = 2.6

Page 6: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 3

INTRODUCTION TO AWESIM

Objective:

The students are introduced to the simulation package AWESIM. The concept of

single server queuing model is discussed and a model is developed in AWESIM.

AWESIM description of the following nodes:

1. CREATE

2. ACTIVITY

3. QUEUE

4. TERMINATE

AWESIM description of the following CONTROL statement.

INITIALIZE

The above statement is added in the list of statements in Control file to stop

simulation based on the simulation time.

Assignment:

The students are asked to rework on the single server model developed in AWESIM

by changing the interarrival times (distributions), terminating criteria, service times,

etc.

Page 7: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 3

INTRODUCTION TO AWESIM

Assignment

Build an Awesim model for the following data. Copy the Network, Control and

Output in MS WORD for the Assignment.

1) Stopping Time = 2500

Interarrival Time = E(2.5)

Service Time =N( 3.2,1.5)

Number of servers = 1, Single Queue.

2) Number of Customers = 500

Interarrival Time = E(2.0)

Service Time =U( 2.5,3.5)

Number of servers = 1, Single Queue.

3) Stopping Time = 2500

Interarrival Time = E(2.5)

Service Time =N( 3.2,1.5)

Number of parallel servers = 2, Single Queue.

4) Number of Customers = 500

Interarrival Time = E(2.0)

Service Time =U( 2.5,3.5)

Number of parallel servers = 2, Single Queue.

Clearly identify the following from each of the reports (4) generated above.

a) Average number of customers in the queue

b) Average delay(or waiting time) for the customers

c) Average utilization of the server.

Page 8: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 3

INTRODUCTION TO AWESIM

Assignment

Build an Awesim model for the following data. Copy the Network, Control and

Output in MS WORD for the Assignment.

1) Stopping Time = 1000

Interarrival Time = E(5)

Service Time =N( 5,1.5)

Number of servers = 1, Single Queue.

2) Number of Customers = 500

Interarrival Time = E(3.0)

Service Time =U( 3.5,4.5)

Number of servers = 1, Single Queue.

3) Stopping Time = 1000

Interarrival Time = E(5)

Service Time =N( 5,1.5)

Number of parallel servers = 2, Single Queue.

4) Number of Customers = 500

Interarrival Time = E(3.0)

Service Time =U( 3.5,4.5)

Number of parallel servers = 2, Single Queue.

Clearly identify the following from each of the reports (4) generated above.

d) Average number of customers in the queue

e) Average delay(or waiting time) for the customers

f) Average utilization of the server.

Page 9: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 4

CONDITIONAL AND PROBABLISTIC BRANCHING

Objective:

AWESIM description of the following nodes/Variables:

1. ASSIGN2. GOON3. COLCT4. TNOW5. NNQ

Routing Entities: Probabilistic and deterministic.

Probability Specification

The sum of the probabilities must be equal to 1.

Conditional Specification:

Relational Code Definition

< Less than<= Less than or equal== Equal> Greater than>= Greater than or equal

Solving Illustrations 4-1, 4-2 and 4-4 from the Hand out.

Assignment:

1. Consider a situation where there are customers coming into a bank with interarrival times exponentially distributed with a mean of 7 minutes. There are two queues one for each server in this bank. Each customer would like to join the smallest queue. The service time for each customer is uniformly distributed with a minimum of 6 and a max of 9 minutes on any server. Run the simulation for 100 customers and submit the report with the three performance measures and in the regular assignment format.

2. In the above model change the service time with the current service time and a small additional service time depending on the queue they are coming from. If the customer comes from queue 1 then add to the current service time an additional time of 2 minutes and if the customer comes from queue 2 then add an additional time of 3 minutes. Run the simulation for 100 customers and submit the report with the three performance measures and in the regular assignment format.

Page 10: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 4

CONDITIONAL AND PROBABLISTIC BRANCHING

Objective:

AWESIM description of the following nodes/Variables:

1. ASSIGN2. GOON3. COLCT4. TNOW5. NNQ

Routing Entities: Probabilistic and deterministic.

Probability Specification

The sum of the probabilities must be equal to 1.

Conditional Specification:

Relational Code Definition

< Less than<= Less than or equal== Equal> Greater than>= Greater than or equal

Assignment:

1. Consider a situation where there are customers coming into a bank with interarrival times exponentially distributed with a mean of 7 minutes. There are two queues one for each server in this bank. 50% of customers go to queue1 and 50% to queue2. The service time for each customer is uniformly distributed with a minimum of 6 and a max of 9 minutes on any server. Run the simulation for 100 customers and submit the report with the three performance measures and in the regular assignment format.

2. In the above model change the service time with the current service time and a small additional service time depending on the queue they are coming from. If the customer comes from queue 1 then add to the current service time an additional time of 2 minutes and if the customer comes from queue 2 then add an additional time of 3 minutes. Run the simulation for 100 customers and submit the report with the three performance measures and in the regular assignment format.

Page 11: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 5

BALKING AND BLOCKING

Objective:

AWESIM description of the following nodes:

COLCT

Concepts of Attributes

ATRIB[I] XX[I]

LTRIB[I] LL[I]

STRIB[I] SZ[I]

Queue Balking

Queue Blocking

Slam Variables

Lastarrive

Solving Example 4-2 (illustrating probabilistic routing) and Example 4-1 (illustrating

balking and blocking of queues.

Assignment:

1) Solve problem # 4-8 from the Hand out.

2) In the design proposed for the television inspection and adjustment situation (Example 2, page 108) add a checkpoint job where after the adjustment (of 15% jobs) there is a quick check if the job needs to be sent to inspection or not. It is found that only 30 percent of the jobs are needed to be sent to inspection and the rest are acceptable. The 30% percent jobs go back for inspection and the rest are acceptable and go out of the system. Let the time taken at the check point be uniformly distributed with a minimum of 1 minutes and a maximum of 2 minutes. Modify the AWESIM model with this change and compare the results. (Clearly identify if this job made improvement in the process or not?).

Page 12: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 6

INTRODUCTION TO OUTPUT ANALYSIS

Objective:

Introduce the students to multiple run concepts and introduce an AWESIM control

statement MONTR for clearing statistics.

Solving the following problems.

Problem 4-4 (multiple runs)

Problem 4-5 (Clearing statistics using MONTR).

WRITE node.

Assignment:

Consider a new bank, which has two tellers. Each teller can handle any kind of

service required by the customers. Each teller has a different queue. After arriving

40% of the customers join first queue and the other 60% join the second queue. The

interarrival times of the customers are found to be exponentially distributed with a

mean of 10 minutes and the service time for the first teller is uniformly distributed

with a minimum of 4 minutes and a maximum of 6 minutes, while the service time for

the second teller is normally distributed with a mean of 5 minutes and standard

deviation of 2 minutes. Simulate the above situation for 480 minutes and run it for 10

runs. Provide the network, control statements and the output of the model developed.

a) Find the average time spend by the customers in the bank.

b) Find the average number of customers served.

c) Find the average utilization for each teller.

d) Find the average waiting time for each customer

e) Find the average number of customers in each queue.

f) For the above model clear the statistic for first 2 hours and repeat the above

questions.

Page 13: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 7

INTRODUCTION TO RESOURCES

Objective:

AWESIM description of the following nodes:

1. RESOURCE Block

2. AWAIT Node

3. FREE Node

4. PRIORITY Statement

Solving the following illustrations.

Illustration 5-1 (Resource usage for sequential operations)

Illustration 5-2 (Single resource processing different entity types).

Assignment:

Solve problem # 5-2 from the Hand out.

Page 14: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering DepartmentSE 405Lab # 8

MORE ABOUT RESOURCES

Objective:

Revising the AWESIM description of the following nodes:

1. RESOURCE Block

2. AWAIT Node

3. FREE Node

Describing the following:

1. ALTER NODE

2. EQUIVALENCE Statement

3. INTLC Statement

4. MONITOR Statement

Solving Example 5-1 (Inventory System with lost sales and backorders)

Assignment:

Redo Example 5-4 (PORT OPERATIONS) from the Hand out.

Page 15: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering Department

SE 405Lab # 9

COURSE PROJECT DISCUSSIONS

Objective:

This week’s lab is dedicated to help the students with their course projects in using

AWESIM.

Page 16: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering Department

SE 405Lab # 10

INTRODUCING GATES IN AWESIM

Objective:

AWESIM description of the following nodes:

1. GATE Block

2. OPEN Node

3. CLOSE Node

Solving illustration 5-5 (Gates to model Shifts) and Example 5-5 (Single Lane Traffic

Analysis).

Assignment:

Solve problem # 5-1 from the Hand out.

Page 17: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering Department

SE 405Lab # 11

BUILDING CONFIDENCE INTERVALS

Objective:

Learning how to collect required data from the AWESIM model and develop

confidence intervals for the performance measure.

Example:

A small factory consists of a machining center and inspection station in series.

Unfinished parts arrive at the factory with exponential interarrival times with a mean

of 1 minute. Processing times at the machine are uniform on the interval [0.65,0.70]

minute, and subsequent inspection times are uniformly distributed as [0.75,0.80]

minute. 90% of the parts are bad and are sent back to the machine for rework.

We would like to obtain 90% confidence interval for the steady state mean hourly

throughput. Run the model for 10 runs and assume a warm up period of 24 hours for

the run length of 160 hours. Find the confidence interval for the throughput and

determine the average production per hour for the small factory being considered.

Page 18: TABLE OF CONTENTS - Faculty Personal Homepage- …faculty.kfupm.edu.sa/SE/arifs/My_Courses/SE405... · Web viewConsider the Example given in Page 11 in your text book for single server

Systems Engineering Department

SE 405Lab # 12

HELP SESSION

Objective:

This week’s lab is dedicated to review the students with AWESIM and clear their

doubts.