| read_qaplib | R Documentation |
Read a problem instance and, when available, its solution from QAPLIB files.
read_qaplib(file)
file |
Path to a QAPLIB problem file with a |
If a .sln file with the same base name exists in the same
directory, the function also reads its solution and objective value.
Zero-based solutions are converted to R's one-based indexing.
The package includes QAPLIB instances and solutions in its qaplib
directory.
A list with A (the flow matrix), B (the distance matrix),
solution (a known solution, if available), and opt (its objective
value, if available). The last two components are NULL when no solution
file exists.
Burkard, R. E., Çela, E., Karisch, S. E., and Rendl, F. QAPLIB: A Quadratic Assignment Problem Library.
p <- read_qaplib(system.file("qaplib", "had12.dat", package = "qap"))
p
dir(system.file("qaplib", package = "qap"), pattern = "\\.dat$")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.