Skip to content

noahares/portfolio_solver

Repository files navigation

Setup

Set up the git-hook for formatting:

# inside the repo root
ln -s ../../scripts/pre-commit .git/hooks/pre-commit

Run with config file

# to generate a portfolio
cargo run --release --bin portfolio_solver -- -c <config>.json

# to execute the portfolio
# <config> will be generated by the portfolio_solver and can be found in the set output directory
cargo run --release --bin portfolio_executor -- -c <config>.json

CLI Customization

All fields of the json configuration can be overwritten by cli-options.

A list of options can be displayed with the --help flag:

cargo run --release --bin portfolio_solver -- --help

will produce:

Usage: portfolio_solver [OPTIONS] --config <CONFIG>

Options:
  -c, --config <CONFIG>
          Path to the json config
  -f, --files [<FILES>...]
          List of CSV files containing the input data
      --ks [<k>...]
          Filter instances by number of blocks (k)
      --feasibility-thresholds [<e>...]
          Filter instances by feasibility threshold (epsilon)
  -g, --graphs <FILE>
          Path to a CSV file containing a list of graphs
  -s, --slowdown-ratio <SLOWDOWN_RATIO>
          Filter algorithms to get a portfolio with gmean-expected slowdown (Values < 1.0 mean speedup)
  -n, --num-seeds <NUM_SEEDS>
          How often a portfolio run is sampled for each instance
  -o, --out-dir <DIR>
          Path to the output directory
  -t, --timeout <TIMEOUT>
          Timeout for the LP solver in seconds
  -k, --num-cores <NUM_CORES>
          Number of cores available to the portfolio
  -i, --initial-portfolio
          Write initial portfolio to output (Only if different from final portfolio)
  -r, --random-portfolio
          Write random portfolio to output (Only if at least 1 sequential algorithm remains after slowdown filtering)
  -h, --help
          Print help
  -V, --version
          Print version

See run experiments script for cli-usage examples and config for the json config.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published