First page
EITN95 Simulation, 2019/2020
Welcome to the course in simulation, EITN95.
There will be a first meetup using zoom during the first lecture slot Tuesday March 24, to test out the communication platforms we use. If you are signed up for the course you should have received an email about this meeting.
Due to the COVID19 outbreak, the course will be offered as an online course this year. This means that there will be some ongoing development of material and procedures to make it work as well as possible.
Students will sign up and register themselves through the usual channels, (Studentportalen, LADOK).
I will email student's that are signed up when the course starts details on how to access Canvas, where assignments will be handed in.
The laboratory excercises will be replaced with online submissions of smaller assignment components. There will also be some kind of forum for discussions/questions, I have to figure out exctly what.
Course content
The course consists of two parts:
 discrete event simulation
 heuristic methods (with optimization)
The course is quite practical in the sense that much of the learning is done by doing (programming). The material will cover two different aspects of simulation, 1) modeling and investigating different aspects of a system behaviour, performance etc. and 2) optimisation of a system through simulation. For completeness, simulation is put in the context of programming optimisation methods and the suitability of using different methods is discussed.
Teachers and administrators
Björn Landfeldt, Bjorn.landfeldt@eit.lth.se (course coordinator, teacher)
MohammadHassan Safavi, mohammadhassan.safavi@eit.lth.se (teacher, heuristics)
Erik Göthe, erik.gothe@eit.lth.se (course administrator)
Lectures and exercise classes
Day and time 
Type 
Contents 
Tue 24 March, 1315 
Lecture S1 

Wed 25 March, 1012 
Lecture S2 

Tue 31 March, 1315 
Lecture S3 
random number generation, validation and verification, error propagation 
WedThu 12 April, 1012, also 1315 (Wed) 
Lab Exercise 1 
discrete event simulation (problems to be solved during exercise) Event scheduling (program for exercise and home assignment) Process interaction (program for exercise and home assignment) 
Tue 7 April 1315 
Lecture S4 

Tue 27 April 1012 
Lecture S5/O1 
Large scale simulations, scripting and state machines, dynamic simulations. introduction to optimization, linear programming, duality, simplex method, sensitivity 
Tue 28 April 1315 
Lecture O2 
Mixed integer programming, branch and bound method, examples 
Tue 29 April 1012

Lecture H1 
Introduction to heuristic methods, Local Search (LS) (lecture notes) 
WedThu 67 May 1012, also 1315 (Wed) 
Lab Exercise 2 
solving optimization problems in MATLAB A brief introduction to MATLAB solvers for Linear and Integer programs Example 1: linear program (MATLAB file) Example 2: integer program (MATLAB file) Example 3: linear program and sensitivity analysis (Excel file) Lab Exercise: Solving Linear and Integer Programs using MATLAB (download pdf) 
Tue 12 May 1315 
Lecture H2 
Simulated Annealing (SA), Tabu Search (TS), and Iterated Local Search (ILS) (lecture notes) 
Wed 13 May 1012 
Lecture H3 
Genetic Algorithms (GA) (lecture notes) 
TueWed 1920 May1012, also 810 (Wed) 
Lab Exercise 3 
Heuristic methods: simulated annealing, genetic algorithms, and Tabu search Lab Exercise: Metaheuristic simulations (code and instructions) 
The times and places can be found by using LTH’s schedule generator.
Take Home assignments
The assignments can be done in groups of two students or individually.
If you need help with assignments, you can come to Björn's office (room E:2542) at the following times:
 Tuesday 14 April 10.0012.00
 Tuesday 21 April 13.0015.00
 Tuesday 12 May 10.0012.00
 Tuesday 19 May 13.0015.00
There are two takehome assignments that you must complete to pass the course. There will be one on basic discrete event simulation and one on largescale and dynamic simulations. The deadlines for the assignments can be found below. If a takehome assignment is not approved you will get a second chance to hand it in, but not later than one week after you got it back with feedback.
Submissions are done through the Canvas system at https://canvas.education.lu.se. Password is handed out during lectures. You SHOULD submit a report in pdf format plus a zip archive of all code organised by task.
The deadlines for the takehome assignments:
 Discrete Event Simulation foundations: 1 May
 Large scale simulations:29 May
The takehome assignments:
Material for take home assignment 1
If you want to write to a file that can be used as input to matlab, you can do it as in this example. The example is almost the same as "Event scheduling approach" above. One class is added (SimpleFileWriter). An instance is created and used in State, and the file is closed in Template2006.
Laboratory Exercises
There are three labs in the course. Lab 1 is voluntary and aimed at getting started with the programming. Labs 2 and 3 are mandatory and must be passed in order to pass the course.
TakeHome exam
To get a higher grade than 3, you must pass the takehome exam. From the takehome exam you can get the grades not passed, passed and passed with distinction. Observe that the takehome exam is to be done individually, that is, you may not do it in cooperation with other students. The deadline for the take home exam is June 12, the week after the normal exam period.
Exam
Final grade
Your final grade will be determined by the table below.
Home assignments and labs 
Home exam 
Final grade 
Passed 
Not done or not passed 
3 
Passed 
Passed 
4 
Passed 
Passed with distinction 
5 
Literature
For the discrete event simulation part of the course the following books can be used:
 C.A. Chung, Simulation Modeling Handbook – A Practical Approach, CRC Press (the book can be found as a free ebook in the univeristy library, see http://www.crcnetbase.com/ISBN/9780203496466 should be free for computers connected to the university's network)
 H. Perros, Computer Simulation Techniques: The Difinitive Introduction, available online.
Another good book that deals much more with the statistical side of discrete event simulation is:
 S. M. Ross, Simulation 4th ed., Academic Press 2006
For more exensive analysis of time series from a statistical POV.
 Andreas Jakobsson, An Introduction to Time Series Modeling 2nd ed., Studentlitteratur 2015
An excellent free textbook on convex optimization (including linear) is available for free here.
Matlab has a good introduction to working with optimisation in their environment. This is useful for the optimisation lab.
Here is a link to a list of error propagation rules using logarithmic transformation