Discrete Event Simulation, CASE tool built using C#

18
SimProject CASE Tool for Discrete Event Programming (Simulation) Information Systems Engineering Project, 2005 Ron Perlmuter, Avi Orenstein Ben-Gurion University

Transcript of Discrete Event Simulation, CASE tool built using C#

Page 1: Discrete Event Simulation, CASE tool built using C#

SimProjectCASE Tool for Discrete Event Programming

(Simulation)

Information Systems Engineering Project, 2005

Ron Perlmuter, Avi Orenstein

Ben-Gurion University

Page 2: Discrete Event Simulation, CASE tool built using C#

About

SimProject is a computer-aided software engineering tool that allows

development of events, procedures & variables using discrete event

simulation.

Graphical user interface resembles to Microsoft Visual Studio combined

with Visio provides an easy and intuitive way to simulation programming.

SimProject compiles the graphical model to pseudo-code and later

interpreters it using Microsoft .NET/C#.

Finally the model is executed and the simulation results are displayed in

console. Debugging and step by step execution is also supported.

SimProject was built as part of our final B.Sc. project at BGU.

Page 3: Discrete Event Simulation, CASE tool built using C#

Goals

Two primary goals:

• Educational tool for discrete event simulation

• Utility for programming advanced simulations

Alternatives, like Arena, are very pricey and don’t

justify development of small scale simulations.

Page 4: Discrete Event Simulation, CASE tool built using C#

Goals

Page 5: Discrete Event Simulation, CASE tool built using C#

How Can I Use It?

Aside from software programming and testing, is it possible to use

this tool for business cases?

Definitely, here is a real life example...

Page 6: Discrete Event Simulation, CASE tool built using C#

How Can I Use It?

You had the fortune to become a McDonald's

franchise and you opened a new restaurant in

your beloved neighborhood.

After awhile you hear complaints about long

queues, dissatisfied customers and losing

customers to the restaurant next door.

Page 7: Discrete Event Simulation, CASE tool built using C#

How Can I Use It?

You decide to create a simulation model, starting by resources:

1 chef, 2 cashiers, 10 tables.

You figure out that most of the time the restaurant works fine, but

only between 12:00 to 14:00 the problems arise.

You calculate the customers arrival rate and average time they:

• Serviced by the cashier

• Serviced by the chef

• Waiting for a seating

Also you realized that the waiting line is no longer than 5 persons, meaning you lose customers to the next restaurant.

Page 8: Discrete Event Simulation, CASE tool built using C#

How Can I Use It?

Now you can use this model in our tool and get more insights:

• Number of customers you lose per day• Waiting time per customer

• Locate the bottlenecks

Computer simulation allows you to easily (and cheaply)

investigate possible solutions:

• Adding another cashier – how will it affect the lost customers

number? How it will affect the average waiting time?

• Will increasing the number of tables create a positive effect?

• Should I hire another chef?

This problem is real, and impacts many business. Think about your

retailers and service providers…

Page 9: Discrete Event Simulation, CASE tool built using C#

Architecture

We have divided the

solution into 5 modules:

• CASE

• Project• Diagrams

• Simulation Engine

• User Interface

Page 10: Discrete Event Simulation, CASE tool built using C#

Simulation Engine

Its prime objective is to compile and execute a simulation

project.

We thought about the best implementation for this

objective, without creating a dependency on other

modules.

We were inspired by Java and .NET platforms, creating a

new programming language that compiles into

intermediate language.

The intermediate language is an internal simulation

language, adapting the graphical model to C#.

The user is not aware of any internal languages.

Page 11: Discrete Event Simulation, CASE tool built using C#

Acceptance Criteria

The robustness & performance of our tool can be

measured by the capability to model various simulations

which are studied in Computer Simulation course at Ben-

Gurion University.

Those simulations are composed from well known discrete

event idioms from the classic literature.

Our CASE tool allows the usage of the following models:

• M/M/1 – Single server with events from Markov

distribution.

• M/M/n – Multiple servers.

• Inventory models.

• Jobs scheduling models.

Page 12: Discrete Event Simulation, CASE tool built using C#

Challenges & Solutions

Page 13: Discrete Event Simulation, CASE tool built using C#

Diagrams Module

Creating a diagrams module from scratch is time consuming and

risky.

Also it was not part of our project goals.

Two solutions were possible:

1. Integration with Microsoft Visio – due to poor support and

cumbersome integration with Microsoft .NET we rejected this option.

2. Integration with Open Source – allowed us to draw diagrams

and we manually changed its code in order to enhance the

existing C# components with our requirements.

The usage of the open source was very productive.

Page 14: Discrete Event Simulation, CASE tool built using C#

User Interface Module

Like in the previous slide, we wanted to provide a Visual Studio

experience since it’s very intuitive for developers and students.

We searched for an open source solution and found a great implementation in C#.

Page 15: Discrete Event Simulation, CASE tool built using C#

Curious About Simulation?

Page 16: Discrete Event Simulation, CASE tool built using C#

More Stuff…

Computer Simulation is a technique that represents real world

using computerized program. The simulation also models it’s

internal processes with the addition of the simulation results.

Discrete Event Simulation is an evolving model which is

represented by situational variables. Those variables change on

the time axis, and precisely on specific locations in time. We call

these locations in time ‘events’.

Known Simulation Methods:

• Manual – drawing manual data flow diagrams on paper,

describing the logics and executing using trace tables.

• Textual languages – this method describes the simulation using special syntax and commands. They usually simplified and

don’t require an extensive knowledge in high level

programming languages. E.g: Siman, Simphony.

Page 17: Discrete Event Simulation, CASE tool built using C#

More Stuff…

• High level programming languages – capable of modeling

any simulation. Most of the times used for simple simulations

with simple outputs. E.g. Fortran, Java, C, VB.

• Graphical simulation languages – visual language that describes the simulation model using well known structures.

Those are adapted to textual simulation languages which later

can be used in other programming languages. E.g. Arena,

Simulink.

Page 18: Discrete Event Simulation, CASE tool built using C#

Thanks

Ron Perlmuter

www.linkedin.com/in/ronper