We get a complete bipartite graph
The algorithms are implemented in Rust. Therefore, Rust must be installed in advance. On most Unix-like systems, you can install Rust with:
curl --proto '=https' --t1sv1.2 -sSf https://sh.rustup.rs | sh
After that you can modify the code as you wish and compile using the preinstalled cargo
package manager:
cargo build --release
The input format is strictly dictated and cannot be changed without changing the code. You can create Instances of BPR
using Python3 and scripts/createData.py with the following command:
python3 scripts/createData.py --number <Number of Graphs> \
--na_min <Minimum Number of Regulators> \
--na_max <Maximum Number of Regulators> \
--nb_min <Minimum Number of Positions> \
--nb_max <Maximum Number of Positions> \
--vs_min <Minimum Size of Support> \
--vs_max <Maximum Size of Support> \
--output <Output Directory>
[--name <Custom Name>]
You can see an example file here: EXAMPLE
Alternatively, you can create graph instances at runtime with prespecified parameters
As there are multiple possibilities of choosing
target/release/bpr --file <Input Graph file> \
--log <Path to log-file> \
--instances <Number of Instances> \
--goal <Goal Function> \
--algorithm <Algorithm> \
--parameters <Number> \
[--not-opt]
Parameters
is used to run on every possible fraction-combination of parameters
If you wish to create graph instances at runtime, instead use
target/release/bpr --log <Path to log-file> \
--na <Number of Regulators> \
--nb <Number of Positions> \
--vs <Size of Support> \
--iterations <Number of Graph Instances> \
--instances <Number of Instances per Graph Instance> \
--parameters <Parameters as above> \
--goal <Goal Function> \
--algorithm <Algorithm>
[--poisson] <Should Support model a Poisson Distribution>
[--not-opt]
Goal | Input | Name | Runtime | Approximation Factor | Source |
---|---|---|---|---|---|
MAX / SUM | OPT | OptimalOfflineAlgorithm | - | ||
MAX / SUM | AMP | AdaptiveMyopicPolicy | SMSM | ||
MAX / SUM | NAMP | NonAdaptiveMyopicPolicy | SMSM | ||
COV | OPT | OptimalOfflineAlgorithm | MSM | ||
COV | AMP | AdaptiveMyopicPolicy | - | SMSM | |
COV | NAMP | NonAdaptiveMyopicPolicy | - | SMSM |
To run all algorithms on a specified goal, use ALL
and use --not-opt
if you do not want to run OPT
- otherwise it is always run and logged.
There are
For
For
The jobs
folder contains all bash files to run the algorithms for comparison on the Goethe-HHLR cluster.
The scripts folder contains all script files. Note that Python must be installed beforehand. The scripts are:
- Data Generation using
createData.py
- Data Compression using
bprTimeCompression.py
,bprParametersCompression.py
orbprValuesCompression
to compress logged results into small data that then can be plotted - Plotting Data using
timePlot.py
,parametersPlot.py
orvaluesPlot.py
Installing the necessary python packages can be done via
pip install -r scripts/requirements