Course Resources

R, the free software environment for statistical computing and graphics, can be downloaded from here.

TSP

The C code from H. Hoos and T. Stützle to read the TSP instances [.tar.gz]. The code implements also a 2-opt and 3-opt iterative improvement and an ILS.

The C++ code to read the TSPLIB instances [.tgz]. The code is designed similarly to EasyLocal++, whose main concepts have been discussed in the lecture. Disclaimer: the program has not yet been tested severly.

GCP

The C code to read the instances in the DIMACS format [.c].

The C++ code to read the DIMACS instances [.tgz]. The same comments apply as for the C++ code for TSP.

A program to check the correctness of a GCP solution for an instance in DIMACS format [.tgz]. (Read the alleged instruction for the format of the solution file.)

Scheduling

The 125 instances of size 50 jobs taken from the OR-library for the SMTWTP [.txt], with their optimal solutions [.txt], and a short C code for reading the instances and computing the total weigthed tardiness of a permutation of jobs [.tgz].

T. Stützle made available from the website of the text book a C program with basic construction heuristics and iterative improvements for the Single Machine Weighted Completion Problem [.tgz]. Methods from this program can be easily mutated for solving the SMTWTP.

The program implements the following construction heuristics

The program implements the following iterative iprovement (please, attention to the change of name)

Race

The archive race-Lec-13.tgz contains the example for the automatic race shown in Lecture 13. The example will probably not work as the exectuables are compiled under MacOs. The important file to be adapted to the specific case is race.STC.R. In that file commented text should guide through the definition of the wrappers.

Once everthing has been settled launch R and exectue the following commands:

> library(race)
> source("race.R")
> source("race.STC.R")

Finally for launching the race you can copy and modify the content of the method launch in rac.STC.R.

For more information on the race package consult the R documentation.

R Code for Generating Boxplots

In order to represent results by means of boxplots they must be first transformed within the instances. The examples below assume a rank transformation. A z-score transformation can be easily obtained by substituting in the code rank with scale.

Unreplicated case

Assuming data are in a data frame ONE of the form:

> ONE
alg inst k class
1 FCNS GEOM100 416 GEOM
2 GOF-AG GEOM100 405 GEOM
3 GOF-AG+R GEOM100 404 GEOM
4 GOF-TS-R GEOM100 414 GEOM
5 GOF-TS GEOM100 414 GEOM
6 GSF-GLS GEOM100 415 GEOM
7 GSF-HEA GEOM100 410 GEOM
8 GSF-MC GEOM100 416 GEOM
9 GSF-TS GEOM100 414 GEOM
10 GSV-TS GEOM100 415 GEOM
11 FCNS GEOM100a 460 GEOM
...

then one can try one of the following:

> ONE <- ONE[order(ONE$inst),]
> boxplot(as.data.frame(t(apply(unstack(ONE,form=k~alg),1,rank))))

or

> boxplot(split(unsplit(lapply(split(ONE$k,list(ONE$inst)),rank),list(ONE$inst)),ONE$alg)))

Replicated case

Assuming data are in a data frame THREE similar to the one above, then

> boxplot(split(unsplit(lapply(split(THREE$k,list(THREE$inst)),rank),list(THREE$inst)),THREE$alg)


Mersenne Twister Home Page -- A very fast random number generator not yet used in the code above.


Last modified: Fri Jun 9 16:01:31 CEST 2006