Giter Site home page Giter Site logo

charjon / scientificmaxcutsolver Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 2.15 MB

Open source MaxCut solver

CMake 0.20% Python 0.22% C++ 6.69% M4 2.17% Monkey C 20.69% Emacs Lisp 69.23% Jupyter Notebook 0.81%
ising-model ising-spin-models maxcut optimization quantum-annealing

scientificmaxcutsolver's Introduction

sms - (Sparse | SCIP | Scientific) MaxCut Solver

Solving MaxCut to optimality via Integer Programming.

Cite

If you make use of this code, please cite the corresponding publication:

@inproceedings{DBLP:conf/acda/CharfreitagMM23,
  author       = {Jonas Charfreitag and
                  Sven Mallach and
                  Petra Mutzel},
  editor       = {Jonathan W. Berry and
                  David B. Shmoys and
                  Lenore Cowen and
                  Uwe Naumann},
  title        = {Integer Programming for the Maximum Cut Problem: {A} Refined Model
                  and Implications for Branching},
  booktitle    = {{SIAM} Conference on Applied and Computational Discrete Algorithms,
                  {ACDA} 2023, Seattle, WA, USA, May 31 - June 2, 2023},
  pages        = {63--74},
  publisher    = {{SIAM}},
  year         = {2023},
  url          = {https://doi.org/10.1137/1.9781611977714.6},
  doi          = {10.1137/1.9781611977714.6},
  timestamp    = {Sat, 28 Oct 2023 13:59:35 +0200},
  biburl       = {https://dblp.org/rec/conf/acda/CharfreitagMM23.bib},
  bibsource    = {dblp computer science bibliography, https://dblp.org}
}

External dependencies

All but one dependency of this project are manged by git (via submodules). Only SCIP needs to be "installed". The easiest way to make SCIP available on your machine is using one of the " installers" ZIB offers for download here: https://scipopt.org/index.php#download. For linux e.g. download the "SCIPOptSuite-8.0.0-Linux-ubuntu.sh" or "SCIPOptSuite-8.0.0-Linux-debian.sh" run it and it will ask you where to extract all files to. When building cmake will find SCIP now.

Building

  1. clone project
  2. make sure SCIP is installed (see step above)
  3. run git submodule update --init --recursive (see further below for bugfixes)
  4. now cmake building should work:
mkdir build && cd build
cmake ..
make -j 10 # -j 10 makes make use 10 threads

If SCIP is not on your path, or you want to use a different version of SCIP as the one on your path:

mkdir build && cd build
cmake .. -DSCIP_DIR:PATH="{my/path/to/scip}"
make -j 10 # -j 10 makes make use 10 threads

Testing

  1. build the project as described above (all CMake targets including tests get build by default)
  2. stay in the build directory
  3. execute the test binary
./test/your_test --gtest_filter=*

--gtest_filter can be used to select the test to run. For example --gtest_filter=IoTest* will run all test in the IoTest testsuite, --gtest_filter=IoTest.ParseEdgelist will only run the ParseEdgelist test.

The gtest_filter can be changed to only execute test matching the expression.

Benchmarking

Example for how to use the simexpal config:

  1. cd benchmark
  2. simex b make
  3. simex e launch --instset rest_test_set

git submodules

git submodules can be as awesome as annoying. How to hardreset all submodules: rm -fr .git/config .git/modules && git submodule deinit -f . && git submodule update --init --recursive

cli arguments

SCIP

Cutting Planes in SCIP

Event Handler in SCIP

Primal Heuristics in SCIP

Visualize B&B-Tree

Memory Management of and in SCIP

Compiling SCIP and linking against different LP-solver

Download link: https://scipopt.org/download/release/scipoptsuite-8.0.2.tgz

Linking against CPLEX

  • Download SCIP
  • Replace X.X.X by scip version, make sure all varialbes ($) are set and possibly add cplex version in the following command
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/opt/scip-X.X.X-cplex -DLPS=cpx -DCPLEX_DIR=$CPLEX_DIR -DIPOPT=off

Advanced

Not needed by default for this project

Ipopt

To allow "-DIPOPT_DIR=$IPOPT_DIR" flag:

git clone https://github.com/coin-or/Ipopt.git
cd Ipopt
mkdir build && cd build
../configure --prefix=/path/to/install/dir
make -j
make install

Compiling SCIP

Download link: https://scipopt.org/download/release/scipoptsuite-8.0.2.tgz

With CPLEX

cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/opt/scip-X.X.X-cplex -DLPS=cpx -DCPLEX_DIR=$CPLEX_DIR -DIPOPT=off

Advanced

Ipopt

git clone https://github.com/coin-or/Ipopt.git
cd Ipopt
mkdir build && cd build
../configure --prefix=/path/to/install/dir
make -j
make install

Linking against CPLEX

cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/opt/scip-X.X.X-cplex -DLPS=cpx -DCPLEX_DIR=$CPLEX_DIR -DIPOPT_DIR=$IPOPT_DIR

scientificmaxcutsolver's People

Contributors

charjon avatar

Stargazers

dxyzx avatar  avatar Julian Meffert avatar Mohammed Ghannam avatar Daniel Rehfeldt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.