Electrical and Information Technology

Faculty of Engineering LTH | Lund University

First page

ETS061 Simulation, 2016/2017



For the students who havemet all initial deadlines and wish to attempt a higher grade, the take home exam is now available here. Note that the deadline for the exam to be handed into Moodle is September 1 and the exam has to be done individually.



Questions and Answers session is shifted from 16th of May (13-15 PM) to 18th of May (13-15 PM). It will be in my room (E:3129A).


Slides for lecture 4 available.


Example solutions are avaiable to the second task in Lab1


It is now possible to sign up for lab sessions (lab 1). see menu on the left. Labs are done in groups of two on level 4 in the E-building.

The specification for assignment 1 has been updated with correct submission procedure through moodle.




The course consists of two parts:

  • discrete event simulation
  • heuristic methods (with optimization)

Teachers and administrators

Björn Landfeldt, Bjorn.landfeldt@eit.lth.se (course coordinator, teacher)

Saeed Bastani, Saeed.Bastani@eit.lth.se (teacher)

Marianne Greiff-Svensson, marianne.greiff_svensson@eit.lth.se (course administrator)

Lectures and exercise classes

Day and time



Tue 21 March, 13-15

Lecture S1

introduction to simulation, examples

Thu 23 March, 8-10

Lecture S2

event scheduling and process interaction approach

Tue 28 March, 13-15

Lecture S3

random number generation, validation and verification, error propagation

Thu-Fri 30-31 March, 8-10, 13-15 (Thu)

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 4 April 13-15

Lecture S4

Dealing with stochastic processes

Thu 6 April 8-10

Lecture O1

introduction to optimization, linear programming, duality, simplex method, examples (lecture notes)

Tue 25 April 13-15

Lecture O2

introduction to optimization, mixed integer programming, branch and bound method, examples (lecture notes)

Wed-Thu 27-28 April 8-10, 13-15 (27/4)

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 2 May 10-12

Lecture H1

Introduction to heuristic methods, Local Search (LS) (lecture notes)

Thu 4 May 10-12

Lecture H2

Simulated Annealing (SA), Tabu Search (TS), and Iterated Local Search (ILS) (lecture notes)

Tue 9 May 13-15

Lecture H3

Genetic Algorithms (GA) (lecture notes)

Thu-Fri 11-12 May 8-10, 13-15 (11/5)

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 take home assignments can be done in groups of two students or individually.

If you need help with take home assignment 1, you can come to Björn's office (room E:3145) at the following times:

  • Wednesday 3 May 10.00-12.00
  • Thursday 4 May 13.00-15.00

If you need help with take home assignments 2 and 3, you can come to Saeed's office (room E:3129A) at the following times:

  • Thursday 18 May 8.00-10.00
  • Thursday 18 May 13.00-15.00

There are tree take-home assignments that you must complete to pass the course. There will be one on discrete event simulation and two on heuristic methods. The deadlines for the assignments can be found below. If a take-home assignment is not approved in the due time, you will get a second chance to hand it in, but not later than one week after when you got it back. If you miss any such deadline, you cannot get a grade higher than 3.

The deadlines for the take-home assignments:

  1. Discrete Event Simulatioin: 5 May
  2. Heuristic Methods I: 26 May
  3. Heuristic Methods II: 9 June

The take-home assignments:

  1. Assignment 1
  2. Assignment 2 
  3. Assignment 3 (and a code template)  

Material for take home assignment 1

For take-home assignment 1 you need a matlab program that calculates confidence intervals by estimating the correlation between samples:

Link to a program for calculating the confidence intervals of your resutls.

Link to a description to the output of the program above.

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.







Take-Home exam

To get a higher grade than 3, you must pass the take-home exam. From the take-home exam you can get the grades not passedpassed and passed with distinction. Observe that the take-home exam is to be done individually, that is, you may not do it in cooperation with other students.

Final grade

Your final grade will be determined by the table below.

Home assignments and project

Home exam

Final grade


Not done or not passed


Passed within deadline



Passed within deadline

Passed with distinction



For the discrete event simulation part of the course the following book can be used:

  • C.A. Chung, Simulation Modeling Handbook – A Practical Approach, CRC Press (the book can be found as a free e-book in the univeristy library, see http://www.crcnetbase.com/ISBN/9780203496466 should be free for computers connected to the university's network)

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