Exam paper


Choose to upload files for:

General notes

This exam paper consists of three exercises. If you do one of them perfectly, you will have full marks. As perfection is in the eye of the beholder (us, the authors of this exam paper), don't be fooled into thinking your exam will be perfect. So aim to complete one exercise and try to start some other exercise with your spare time. But do try and concentrate on one exercise first.

Each exercise requires you to formulate a problem by its mathematical programming formulation using the AMPL1 language, choose an appropriate solver (you can use cplex for LP/MILPs and convex quadratic MIPs, ipopt/snopt for cNLPs and local solutions of NLPs, bonmin for cMINLPs and local solutions of MINLPs, and boncouenne for global solutions of NLPs/MINLPs), write three separate files (model, data, and run) and obtain a solution on the computer. If the formulation is nonlinear, then you should reformulate it so that it becomes linear; aim to use the same data file as for the original problem, and CPLEX as a solver.

You are free to use whatever didactical material (paper or online) you see fit. But don't waste too much time on studying other material.

For each exercise you attempt (or complete), you will submit: three ASCII files (surname.mod, surname.dat, surname.run) encoding the model, data and run commands for the original problem. In case your original formulation was nonlinear, you will also submit two ASCII files (surname-ref.mod, surname-ref.run) encoding the model and run commands for the reformulated problem. You should use the same data file as for the original problem.

In all cases, replace surname in the file name with your own surname! In order to correct the electronic part of your exam papers (the AMPL files), we will simply run these files on our computers, so please do make sure that typing "ampl surname.run" and "ampl surname-ref.run" yield the desired solution. If we find that your run file does not work, you automatically lose some points (even if it was because of a stupid syntax error).


1Warning: if AMPL/CPLEX give you some license errors, use the "student" versions: at the command prompt, type setenv PATH "/usr/local/AMPL:$PATH", then proceed as usual. In order to re-set to the licensed version (if the license trouble goes away), simply exit the shell and open another terminal, or at worst log out and log back into your workstation.