Skip to content

Commit 5eeb583

Browse files
committed
Rename and improve docs
1 parent 749acbc commit 5eeb583

File tree

9 files changed

+47
-21
lines changed

9 files changed

+47
-21
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 JuliaDecisionFocusedLearning
3+
Copyright (c) 2025 Guillaume Dalle
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name = "MathProgBenchmarks"
1+
name = "MathOptBenchmarkInstances"
22
uuid = "f7f8d0a1-fd34-491e-a7ac-a4cf52f91fe5"
33
version = "0.1.0"
44
authors = ["Guillaume Dalle"]

README.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,50 @@
1-
# MathProgBenchmarks.jl
1+
# MathOptBenchmarkInstances.jl
22

33
A Julia package for automatic download and parsing of linear, quadratic and integer programming instances.
44

5-
Supported datasets:
5+
## Datasets
6+
7+
Please read and abide by the license of the dataset you plan to use.
8+
9+
### LP
610

711
- [x] [Netlib](https://www.netlib.org/lp/data/index.html)
8-
- [x] [MIPLIB 2017](https://miplib.zib.de/index.html)
912
- [x] [Mittelmann LP benchmark](https://plato.asu.edu/ftp/lptestset/)
1013

14+
### MILP
15+
16+
- [x] [MIPLIB 2017](https://miplib.zib.de/index.html)
17+
18+
### QP
19+
20+
- [ ] [QPLIB](https://qplib.zib.de/)
21+
- [ ] [Maros-Meszaros](https://www.doc.ic.ac.uk/~im/#DATA)
22+
1123
## Getting started
1224

13-
1. To see which instances are available, call `list_instances(dataset)` with `dataset in (Netlib, MIPLIB2017, MittelmannLP)`.
14-
2. To read a specific instance, call `read_instance(dataset, name)` where `name isa String`.
15-
3. The returned problem format is `QPSData` from [QPSReader.jl](https://github.com/JuliaSmoothOptimizers/QPSReader.jl).
25+
1. To list the datasets available, call `values(Dataset)`.
26+
2. To list the instances from a `dataset`, call `list_instances(dataset)`.
27+
3. To read a specific instance given its `name`, call `read_instance(dataset, name)`. The return value is a tuple `(problem, path)` where `problem isa QPSData` from [QPSReader.jl](https://github.com/JuliaSmoothOptimizers/QPSReader.jl) and `path` points to the decompressed source file on your computer.
1628

17-
More details are available in the docstrings.
29+
See the docstrings for details.
1830

1931
## Tips
2032

2133
The problem source files are downloaded automatically thanks to [DataDeps.jl](https://github.com/oxinabox/DataDeps.jl).
2234
Note that each download has to be validated manually from the REPL.
23-
This doesn't work well when the triggering line of code is executed with VSCode's Julia extension, better run it in the REPL directly.
35+
This doesn't work well when the triggering line of code is executed with VSCode's Julia extension, you better run it in the REPL directly.
2436
An alternative is to set `ENV["DATADEPS_ALWAYS_ACCEPT"] = true`.
2537

2638
The decompressed instances can be rather large (over 80 GB for the complete MIPLIB 2017 collection).
27-
If you need to clean up some space, you can delete unneeded files inside the folder located at `MathProgBenchmarks.MPS_SCRATCH`.
39+
If you need to clean up some space, you can delete unneeded files inside the folder located at `MathOptBenchmarkInstances.MPS_SCRATCH`.
40+
41+
## Contributing
42+
43+
To contribute a new dataset:
44+
45+
1. Add its name to the `Dataset` enum.
46+
2. Register a new `DataDep` inside the `__init__()` function of the package.
47+
3. Implement a reader based on the files downloaded by the `DataDep`. This part might need decompression or file conversion steps, for which you can use the `MPS_SCRATCH` folder.
48+
4. Write documentation and tests.
49+
50+
You can (and should) draw inspiration from the implementation of existing datasets.

src/MathProgBenchmarks.jl renamed to src/MathOptBenchmarkInstances.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module MathProgBenchmarks
1+
module MathOptBenchmarkInstances
22

33
import CodecBzip2
44
using DataDeps
@@ -17,4 +17,4 @@ export Dataset, MIPLIB2017, Netlib, MittelmannLP
1717
export read_instance
1818
export list_instances
1919

20-
end # module MathProgBenchmarks
20+
end # module MathOptBenchmarkInstances

test/Project.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[deps]
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3-
MathProgBenchmarks = "f7f8d0a1-fd34-491e-a7ac-a4cf52f91fe5"
3+
MathOptBenchmarkInstances = "f7f8d0a1-fd34-491e-a7ac-a4cf52f91fe5"
44
QPSReader = "10f199a5-22af-520b-b891-7ce84a7b1bd0"
55
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6+
7+
[sources]
8+
MathOptBenchmarkInstances = {path = ".."}

test/miplib2017.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using MathProgBenchmarks
1+
using MathOptBenchmarkInstances
22
using QPSReader
33
using Test
44

55
miplib_list = list_instances(MIPLIB2017)
66
@test length(miplib_list) == 1065
77

8-
miplib_benchmark_list = MathProgBenchmarks.list_miplib2017_instances(; benchmark_only = true)
8+
miplib_benchmark_list = MathOptBenchmarkInstances.list_miplib2017_instances(; benchmark_only = true)
99
@test length(miplib_benchmark_list) == 240
1010

1111
for name in miplib_benchmark_list[1:10]

test/mittelmann.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using MathProgBenchmarks
1+
using MathOptBenchmarkInstances
22
using QPSReader
33
using Test
44

test/netlib.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using MathProgBenchmarks
1+
using MathOptBenchmarkInstances
22
using QPSReader
33
using Test
44

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using Aqua
2-
using MathProgBenchmarks
2+
using MathOptBenchmarkInstances
33
using Test
44

55
ENV["DATADEPS_ALWAYS_ACCEPT"] = true
66

7-
@testset verbose = true "MathProgBenchmarks" begin
7+
@testset verbose = true "MathOptBenchmarkInstances" begin
88
@testset "Code quality" begin
9-
Aqua.test_all(MathProgBenchmarks; undocumented_names = true)
9+
Aqua.test_all(MathOptBenchmarkInstances; undocumented_names = true)
1010
end
1111
@testset "Netlib" begin
1212
include("netlib.jl")

0 commit comments

Comments
 (0)