qap v0.1-0

0

Monthly downloads

0th

Percentile

by Michael Hahsler

Heuristics for the Quadratic Assignment Problem (QAP)

Implements heuristics for the Quadratic Assignment Problem (QAP). Currently only a simulated annealing heuristic is available.

Readme

qap - Heuristics for the Quadratic Assignment Problem (QAP) - R package

Implements heuristics for the Quadratic Assignment Problem (QAP). Currently only a simulated annealing heuristic described in

R.E. Burkard and F. Rendl. A thermodynamically motivated simulation procedure for combinatorial optimization problems. European Journal of Operations Research, 17(2):169-174, 1984.

is available.

Installation

You can install this package directly from github. Open R and execute the following

## install and load devtools
install.packages("devtools")
library(devtools)

## install qap
install_github("mhahsler/qap")

Note: You will need a working development environment. For Linux you need a compiler and various libraries, for Windows install Rtools, and for OS X you need to install Xcode.

Simple Example

Now you can sove a QAP from QAPLIB

## load the had12 QAPLIB problem
p <- read_qaplib(system.file("qaplib", "had12.dat", package="qap"))

## run 100 repetitions
a <- qap(W, D, rep = 100)
a

## compare with known optimum (% above optimum)
(attr(a, "opt") - p$opt)/p$opt * 100

Functions in qap

Name Description
read_qaplib Read QAPLIB Files
qap Solve Quadratic Assignment Problems (QAP)
No Results!

Last month downloads

Details

Date 2015-10-05
License GPL-3
NeedsCompilation yes
Packaged 2015-10-05 14:14:37 UTC; hahsler
Repository CRAN
Date/Publication 2015-10-05 22:14:30

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/qap)](http://www.rdocumentation.org/packages/qap)