Skip to content

Graph convolutional neural network (GCNN) for cutting plane selection.

License

Notifications You must be signed in to change notification settings

stefanvanberkum/gcnn-cut-selector

Repository files navigation

GCNN cut selector

A graph convolutional neural network (GCNN) for cutting plane selection.

Installation

Usage

The experiments can either be run from an editor (one long run) or via the command line (many short runs). If you run on a single machine, running from the editor is the most straightforward. The command line is especially useful if you would like to run multiple jobs concurrently. Both the editor and command line make use of parallelization wherever possible. Optional plotting of node counts can be done in R.

Editor

The main.py module can be used to run all the experiments, simply by specifying what should be run in the run configurations.

Note. When using GPU for TensorFlow, if many memory errors occur during model training, consider reducing the batch size. If there are just a few, the algorithm will skip these batches that are too large. Moreover, when training the models sequentially, it seems that GPU memory can get clogged if many batches are skipped, so restarting your computer and rerunning from the part that yields errors might help too.

Command line

The following commands can be used to run all the experiments.

Instance generation

python instance_generator.py

Optional arguments:

  • --n_jobs: The number of jobs to run in parallel (default: all cores).
  • --seed: The seed value used for the program.

Sampling

The following loop runs all sampling sequentially, but it can be split up into parts to run concurrently.

for problem in setcov combauc capfac indset
do
  for set in train valid test
  do
    python data_collector.py $problem $set
  done
done

Optional argument:

  • --n_jobs: The number of jobs to run in parallel (default: all cores).

Model training

The following loop runs all training sequentially, but it can be split up into parts to run concurrently.

for problem in setcov combauc capfac indset
do
  for iteration in {1..5}
  do
    python model_trainer.py $problem $iteration
  done
done

Model testing

The following loop runs all testing sequentially, but it can be split up into parts to run concurrently.

for problem in setcov combauc capfac indset
do
  for iteration in {1..5}
  do
    python model_tester.py $problem $iteration
  done
done

Model evaluation

python model_evaluator.py

Optional argument:

  • --n_jobs: The number of jobs to run in parallel (default: all cores).

Model benchmarking

python model_benchmarker.py

Optional argument:

  • --n_jobs: The number of jobs to run in parallel (default: all cores).

Summarizing

python summarizer.py

File description

  • data_collector.py
    • Module used for sampling expert (state, action) pairs.
    • Parallelized over multiple cores.
  • instance_generator.py
    • Module used for randomly generating set covering, combinatorial auction, capacitated facility location, and maximum independent set problem instances.
  • main.py
    • Main execution environment.
  • model.py
    • Module that provides the GCNN model functionality.
  • model_benchmarker.py
    • Module used for benchmarking the GCNN approach.
    • Parallelized over multiple cores.
  • model_evaluator.py
    • Module used for evaluating trained models.
    • Parallelized over multiple cores.
  • model_tester.py
    • Module used for testing trained models.
  • model_trainer.py
    • Module used for training models.
  • plotter.R
    • Module used for plotting node counts in R.
  • summarizer.py
    • Module used to summarize all obtained results.
  • utils.py
    • Module that provides some general utility methods.

About

Graph convolutional neural network (GCNN) for cutting plane selection.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published