EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

34
EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering IENG461 System Modeling and Simulation Course Fall 2012-2013 Laboratory Session 01

description

EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering. IENG 4 6 1 System Modeling and Simulation Course Fall 2012-2013 Laboratory Session 01. Open Microsoft office> Microsoft Excel File> New> Blank Workbook. IF FUNCTION - PowerPoint PPT Presentation

Transcript of EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Page 1: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

EASTERN MEDITERRANEAN UNIVERSITYFACULTY OF ENGINEERNG

Department of Industrial Engineering

IENG461 System Modeling and Simulation CourseFall 2012-2013

Laboratory Session 01

Page 2: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Open Microsoft office> Microsoft Excel

File> New> Blank Workbook

Page 3: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

IF FUNCTION

Formula: =if(condition,expression1,expression2)

TRUE FALSEExample1:

Page 4: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Write the formula in C2

Page 5: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Enter and drag outside selection to extend series.

Page 6: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

A NESTED IF FUNCTION

Formula: =if(condition1,expression1,IF(condition2,expression2,expression3))

Example2:

Page 7: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Write the formula in C2

Page 8: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Enter and drag outside selection to extend series.

Page 9: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Using an AND condition in an IF function

Formula: =if(AND(condition1,condition2),expression1,expression2)

Both True Any of them is wrongExample3:

Page 10: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Write the formula in C2

Page 11: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Enter and drag outside selection to extend series.

Page 12: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Using an OR condition in an IF function

Formula: =if(OR(condition1,condition2),expression1,expression2)

At least one True Both wrongExample4:

Page 13: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Write the formula in D2

Page 14: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Enter and drag outside selection to extend series.

Page 15: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Using LOOKUP Function

LOOKP tables are used when you want to compare a particular value to a set of values, and depending on where your value falls, assign a given answer.

Formula: =VLOOKUP(lookup value, table_arrey, col_index_num, [range lookup])

Example5:

Page 16: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Write the formula in G3

Page 17: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Enter and drag outside selection to extend series.

Page 18: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering
Page 19: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering
Page 20: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Example6:

Lets say you want to assign letter grades to students based on a pre-spesified scale, which is shown in the following table.

Page 21: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering
Page 22: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

VLOOKUP Vertical LookupHLOOKUP Horizontal Lookup

HLOOKUP ExampleExample7: Using HLOOKUP function of excel, find matching departments of the

following instructors:

Page 23: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering
Page 24: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Example8:

Power Example

Formula: =POWER(number,power)

Page 25: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering
Page 26: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Mod Example

Example9: Formula: =MOD(number,devisor)

Page 27: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering
Page 28: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Countif Example

Example9: Formula: =Countif(range,criteria)

Page 29: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering
Page 30: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Random Number generation

Formula: =RAND()*(b-a)+a Random number between a and b

When you use above formula each time that you open excel the generated random numbers will change. To stop this automatic change you should do following adjustment:File>Option>Formulas>Manual> remove Recalculate thick> OK

Page 31: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Lab HOMEWORK#1:

A small grocery has only one checkout counter. Customers arrive at this checkout counter at random from 1 to 9. each possible value of inter-arrival time has the different probability of occurrence as shown in table 1 below. The service times vary from 1 to 6 minutes with the probabilities shown in table 2. the problem is to analyze the system by simulating the arrival and service of 20 customers by using simulation table.

Time Between Arrivals (minutes) Probability Cumulative Probability Random-Digit Assignment

1 0.12

2 0.225

5 0.13

7 0.225

8 0.14

9 0.16

Table1. Distribution of time between arrivals

Page 32: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Service Time (minutes) Probability Cumulative Probability Random-Digit Assignment

1 0.1

2 0.2

3 0.3

4 0.25

5 0.1

6 0.05

Table2. Service Time Distribution

The random digits between arrivals (3 digitsis needed) and service times (2 digits is needed) are going to putted in table 3 and 4 respectively.

Customer Random digits Customer Random Digits

1 11

2 12

3 13

4 14

5 15

6 16

7 17

8 18

9 19

10 20

Table3. Random digits for time-between-arrivals determination

Page 33: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

Customer Random digits Customer Random Digits

1 11

2 12

3 13

4 14

5 15

6 16

7 17

8 18

9 19

10 20

Table4. Random digits for service time determination

Conduct a simulation of the above system by using EXCEL and find the following performance measures related with the system:• The average waiting time for a customer and probability that a customer has to

wait.• The average service time and average inter-arrival time.• The average time a customer spends in the system .• The average waiting time of those who wait.

Page 34: EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERNG Department of Industrial Engineering

The End