Skip to content

Commit

Permalink
Prepare for paper release
Browse files Browse the repository at this point in the history
  • Loading branch information
Felerius committed Oct 21, 2021
1 parent a4540d9 commit ee92194
Show file tree
Hide file tree
Showing 36 changed files with 435 additions and 388,431 deletions.
784 changes: 400 additions & 384 deletions Pipfile.lock

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# An Efficient Branch-and-Bound Solver for Hitting Set

Implementation of a Minimum Hitting Set solver described in a soon to be released paper.
Implementation of a Minimum Hitting Set solver described in the An Efficient Branch-and-Bound Solver for Hitting Set research paper.
Also included is the code used for the evaluation section of the paper.

*Note*: In the Github releases you can find the earlier version of this solver described in my master thesis.

## Building

The solver is implemented in the [Rust programming language](https://rust-lang.org).
It is structured as a project using the Cargo project manager included with Rust.
The solver is implemented in the [Rust programming language](https://rust-lang.org) using the Cargo project manager included with it.
All dependencies are listed in the project format and will be downloaded automatically.
To get started, `cargo build --release` creates an optimized build in the `target/release` directory.

Expand All @@ -19,10 +20,8 @@ For all further details, refer to the included help messages in the command-line

### Hypergraph format

The solver expects hypergraphs in a text-based format.
The first line should contain two non-negative integers: the number of vertices and the number of hyperedges.
Each of the following lines represents a hyperedge.
They should first contain the number of vertices in the edge, followed by the zero-based indices of the vertices.
The solver expects hypergraphs in the following text-based format: an initial line containing the number of vertices and hyperedges followed by one line per hyperedge.
Each hyperedge line should contain the number of vertices in it followed by the zero-based indices of the vertices.

The following file represents a hypergraph of three vertices and two hyperedges {0, 1} and {1, 2}:

Expand All @@ -49,9 +48,9 @@ The settings file is a json file in the same format as this example:
}
```

The possible values for `greedy_mode` are: `Never`, `Once`, `AlwaysBeforeBounds`, and `AlwayseBeforeExpensiveReductions`.
The possible values for `greedy_mode` are: `Never`, `Once`, `AlwaysBeforeBounds`, and `AlwaysBeforeExpensiveReductions`.

## Evaluation

The code for the evaluation is in the [`evaluation/paper`](evaluation/paper) directory.
The code for the evaluation is in the [`evaluation`](evaluation) directory.
Refer to its readme for details.
107 changes: 0 additions & 107 deletions data/calc_stats.py

This file was deleted.

1 change: 1 addition & 0 deletions evaluation/paper/.gitignore → evaluation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/settings/
/findminhs
/instance-sizes.json
/plots/
26 changes: 26 additions & 0 deletions evaluation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Evaluation

This directory contains the code for the evaluation section of the paper.
Detailed below are the steps to reproduce our results.

## Building

Run `./build.sh` to build the solver and copy it to this directory.
This uses version 1.53 of Rust to build the solver for the `x86_64-unknown-linux-gnu` target.
Make sure you have Rust 1.53 as well as the standard library and a linker for this target installed.

## Running the Experiments

An archive containing all the hitting set instances used can be found in the Github release.
Extract it into an `instances` directory in this folder, then use `python3 run.py all` to run all experiments.
This requires Python 3.6 or later as well as the dependencies listed in the `Pipfile` in the root of this repository.
The latter can be installed using [`pipenv`](https://pipenv.pypa.io/en/latest/).
Additionally, Gurobi's command line tool `gurobi_cl` must be available for the Gurobi experiments.
We used Gurobi 9.1.2 in our experiments.

You may want to adjust the time limit and number of cores used inside `run.py`.

## Evaluating

Use the `evalution.ipynb` [Jupyter](https://jupyter.org/) notebook to evaluate the results.
See the previous section for details on how to install the Python dependencies for this step.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 0 additions & 24 deletions evaluation/paper/README.md

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion evaluation/thesis/.gitignore

This file was deleted.

Loading

0 comments on commit ee92194

Please sign in to comment.