Elektro- och informationsteknik

Lunds Tekniska Högskola | Lunds universitet

EITN95 Simulering

Första sida




Assignement 2 has been updated and uploaded.

Information about assignment submissions added below. Details in lecture.

Welcome to the first lecture, Tuesday 26/3.


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, (course coordinator, teacher)

MohammadHassan Safavi, (teacher, heuristics)

Erik Göthe, (course administrator)

Lectures and exercise classes

Day and time



Tue 26 March, 13-15

Lecture S1

introduction to simulation, examples

Wed 27 March, 10-12

Lecture S2

event scheduling and process interaction approach

Tue 2 April, 13-15

Lecture S3

random number generation, validation and verification, error propagation

Wed-Thu 3-4 April, 10-12, also 13-15 (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 9 April 13-15

Lecture S4

Dealing with stochastic processes

Tue 10 April 10-12

Lecture S5/O1

Large scale simulations, scripting and state machines, dynamic simulations.

introduction to optimization,  linear programming, duality, simplex method, sensitivity

Tue 16 April 13-15

Lecture O2

Mixed integer programming, branch and bound method, examples 

Tue 7 May 13-15


Lecture H1

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

Wed-Thu 8-9 May 10-12, also 13-15 (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)

Optimisation in Excel

Sensitivity analysis in Excel

Lab Exercise: Solving Linear and Integer Programs using MATLAB (download pdf)

Fri 10 May 13-15

Lecture H2

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

Tue 14 May 13-15

Lecture H3

Genetic Algorithms (GA) (lecture notes)

Wed-Thu 15-16 May10-12, also 13-15 (Thu)

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:3145) at the following times:

  • Tuesday 16 April 10.00-12.00
  • Tuesday 23 April 10.00-12.00
  • Tuesday 14 May 10.00-12.00
  • Tuesday 21 May 10.00-12.00

There are two take-home assignments that you must complete to pass the course. There will be one on basic discrete event simulation and one on large-scale and dynamic simulations. The deadlines for the assignments can be found below. If a take-home 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 EIT moodle system at 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 take-home assignments:

  1. Discrete Event Simulation foundations: 26 April
  2. Large scale simulations:24 May

The take-home assignments:

  1. Assignment 1
  2. Assignment 2 

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.

Write to

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.

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. The deadline for the take home exam is June 14, the week after the normal exam period.


Final grade

Your final grade will be determined by the table below.

Home assignments and labs

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 books can be used:

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