Universitatea Babeş-Bolyai Cluj-Napoca
Facultatea de Matematică şi Informatică
Ciclul de studii: Masterat
Domeniul: Informatică
Programul de studii: Modelare si simulare - în limba engleză
Limba de predare: Engleză

SYLLABUS

I. General data
Code	Subject	
MID1022	Simulation Languages	

Semester	Hours: C+S+L	Category	Status	
2	2+0+1	speciality	compulsory	

II. Full status faculty members
Name and	Scientific	Didactic	Chair	Type of activity	
surname	title	title		C	S	L	
POP Horia Florin	Ph.D.	Prof.	Programming  Languages and Methods	*		*	

Associated faculty members
Name and	Scientific	Institution	Type of	Type of activity	
surname	title		position	C	S	L	

III. Course objectives
The students will gain basic concepts of simulation modeling analysis; will learn different specific simulation languages and environments useful in the modeling and simulation of specific problems. The students will be able to: recognize mathematical parameters as if they were physical variables and vice-versa; be able to follow general mathematical concepts of derivation scientific result and possess the mathematical skill to link those concepts; be able to understand the relevance of the mathematical results to real world applications; have the ability to use computational tools for finding graphical, numerical, statistical and analytic solutions to problems; have the ability to use systems simulations appropriate to real world practice; be able to identify input, output, and operating variables as appropriate in various units; be able to identify technical relationships between the input, output and variables and use the relationships to predict mutual changes. 	

IV. Course contents
Part I. Theory of Computer Simulation
•	1. Introduction to simulation
The nature of simulation
Systems, models and simulations 
Discrete event simulation
Other types of simulation
Advantages and disadvantages of simulation
2. Simple examples of simulation problems
Single server queuing system problem
3. Probability and statistics for simulation
Brief coverage of probability and statistics 
Selecting input probability distributions
Random number generators
4. Writing simulation programs
List processing in simulation
Queuing systems
A simple simulation library
5. Modeling complex systems
More examples of simulation problems
6. Simulation software design
Comparison of simulation packages with programming 
Classification of simulation software 
Desirable features simulation software
Examples and comments
Part. II. Simulation using OMNeT++
7. Overview of OMNeT++
Modeling concepts
Programming in OMNET++
Using OMNeT++
Building and running simulations
8. The NED Language
NED overview
The import directive
Channel definitions
Simple module definitions
Compound module definitions
Network definitions
Expressions
Parameterized compound modules
Large networks
XML binding for NED files
9. Simple Modules
Simulation concepts
Packet transmission modeling
Defining simple module types
Adding functionality to cSimpleModule
Finite State Machines in OMNeT++
Sending and receiving messages
Accessing module parameters
Accessing gates and connections
Walking the module hierarchy
Direct method calls between modules
Dynamic module creation
10. Messages
Messages and packets
Message definitions
11. The Simulation Library
Class library conventions
Logging from modules
Simulation time conversion
Generating random 
Container classes 
The parameter class: cPar 
Routing support: cTopology 
Statistics and distribution estimation 
Recording simulation results
Watches and snapshots
Deriving new classes 
Object ownership management
12. Building and Running Simulations
Overview
Building using Unix and gcc 
Building using Windows and Microsoft Visual C++
User interfaces
The configuration file: omnetpp.ini
Dynamic NED loading
Setting module parameters in omnetpp.ini
Configuring output vectors
Configuring the random number generators
Cmdenv: the command-line interface
Tkenv: the graphical user interface
Repeating or iterating simulation runs
Multiple Replications in Parallel 
Typical issues
Examples
13. Analyzing Simulation Results
Output vectors
Scalar statistics
Analysis and visualization tools
14. Parallel Distributed Simulation
Introduction to Parallel Discrete Event Simulation
Assessing available parallelism in a simulation model
Parallel distributed simulation support in OMNeT++
Part III. Other simulation languages and tools
Process-oriented simulation. The HSL language
Object-oriented discrete event simulation in C++: C++Sim
Object-oriented discrete event simulation in Java: JavaSim
Object-oriented discrete event simulation in Java: DesmoJ	

V. Bibliography
[1] Banks, Carson, Nelson & Nicol, Discrete Event System Simulation, Prentice Hall, 2001
[2] A. Law & D. Kelton, Simulation Modeling and Analysis, Mc Graw Hill, 3rd ed., 1999.
[3] Raymond P. Jefferis III , Simulation of Business Processes, Widener University, 2006 
[4] * * *, OMNeT++, User Manual 
[5] D.P. Sanderson, R. Sharma, R. Rozin, S. Treu, The Hierarchical Simulation Language HSL; a Versatile Tool for Process-Oriented Simulation, ACM Transactions on Modeling and Computer Simulation, 1 (2), 1991, 113-153
[6] * * *, Object-oriented discrete event simulation in C++: C++Sim User Guide 
[7] * * *, Object-oriented discrete event simulation in Java: JavaSim User Guide 
[8] * * *,  Desmo-J, A Framework for Discrete-Event Modelling and Simulation, http://asi-www.informatik.uni-hamburg.de/themen/sim/forschung/Simulation/Desmo-J/index.html	

VI. Thematic of didactic activities per weeks
Schedule of courses

Week 1: Course introduction and software setup
Week 2: Introduction to simulation  [2, ch. 1], [3, ch. 3]
Week 3: Simple examples of simulation problems [2, ch. 1], [3, ch. 5, 6], 
Week 4: Selecting input probability distributions; Random number generators [2, ch. 6, 7]
Week 5: Writing simulation programs; Modeling complex systems [2, ch. 2] [3, ch. 2]
Week 6: Simulation software design [2, ch. 3] [3, ch. 4]
Week 7: Simulation with OMNeT++: overview [4, ch. 1, 2]
Week 8: The NED language [4, ch. 3]
Week 9: Building and running simulations [4, ch. 7, 8]
Week 10: Simple modules [4, ch. 4]
Week 11: Modules and messages in OMNeT++ [4, ch. 4, 5]
Week 12: The simulation library [4, ch. 6]
Week 13: Analyzing simulation results. Parallel distributed simulation [4, ch. 10, 12]
Week 14: Process-oriented simulation. The HSL language [5]

Schedule of seminars

Week 1/2,3/4: Object-oriented discrete event simulation in C++: C++Sim [6]
Week 5/6,7/8: Object-oriented discrete event simulation in Java: JavaSim [7] and DesmoJ [8]
Week 9/10,11/12: Simulation programming: OMNet++ [4]
Week 13/14: Presentation of semester projects	

VII. Didactic methods used
Expositions: description, explanation, class lectures, dialog-based lectures, lectures with demonstrations, introductive lectures, current lectures, synthesis lectures. 
Conversations: debate, dialog, introductive conversations, conversations for knowledge consolidation, conversations to systematize and synthesize knowledge 
Use of problems: use of problem questions, problems and problem situations. 
Discovery: directed and independent rediscovery, creative discovery, inductive discovery, deductive discovery, discovery by documenting, experimental discovery. 
Other methods: case study; cooperation, simulation, brainstorming, individual study, exercise, homework study.	

VIII. Assessment
The activity ends with a written final exam (grade E). The seminar homework on computer simulation will be graded (grade S). The overall students’ activity during the semester will be also considered (grade A).  The final grade is the weighted mean of the grades mentioned above. The final grade = 45%E + 45%S + 10%A. Successful passing of the exam is conditioned by the final grade that has to be at least 5. 
All university official rules with respect to students’ attendance of academic activities, as well as to cheating and plagiarism, are valid and enforced. Successful passing of the exam is conditioned by grade E to be at least 5.
The official web page of the course is http://www.cs.ubbcluj.ro/~hfpop/lsim .	

IX. Additional references
[1] Bratley, Paul, Bennett L. Fox, and Linus E. Schrage, A Guide to Simulation, Springer Verlag, New York, 1987.
[2] Evans, James R. and David L. Olson, Introduction to Simulation and Risk Analysis, Second Edition, Prentice-Hall, Englewood Cliffs, 2002.
[3] Fishman, George S., Principles of Discrete Event Simulation, John Wiley & Sons, New York, 1978.
[4] Fishwick, Paul A., Simulation Model Design and Execution, Prentice-Hall, Englewood Cliffs, 1995.
[5] H. James Harrington and Kerim Tumay, Simulation Modeling Methods, McGraw-Hill, New York, 2000.
[6] Katzela, Irene, Modeling and Simulating Communication Networks, Prentice-Hall, Englewood Cliffs, 1999.
[7] Law, Averill M. and W. David Kelton, Simulation Modeling & Analysis, McGraw-Hill, New York, 1991.
[8] F. L. Severance, System Modeling and Simulation - an Introduction, John Wiley, 2001
[9] W. D. Kelton, R. P. Sadowski, D. A. Sadowski, Simulation with Arena, , McGraw-Hill, 2005
[10] Sheldon Ross, Simulation, Academic Press, 3rd ed., 2002. 	

	Dean,							Chair head,

	Date,							Course responsible,
	October 1, 2009					Prof. POP Horia Florin, Ph.D.