Code Monkey home page Code Monkey logo

nibac's Introduction

nibac

Status: Complete, but the code is very old (circa 2004). I will likely be rewriting this soon.

C++ Nonisomorphic Branch-and-Cut

This is the code that I used to generate results for my Master's Thesis in computer science. It is based in part on a series of papers by Francois Margot in order to produce a branch-and-cut search / generation algorithm where the symmetry group of the problem is either specified or determined, and used to prune nodes from the search space so that only one solution per isomorphism class (i.e. one orbit per the partition of solutions as induced by the symmetry group) is produced.

Warning

While I am trying to clean it up for public distribution, this code is messy and disorganized. Use at your own risk.

It still compiles, provided you set the paths properly in src/Makefile. After installing glpk and nauty (see below), you should make and then make install. The examples should then properly compile. While nauty is not yet built into the final library, the plan is to include it.

Right now things might break as I am migrating from a plain makefile to CMake for configuration of the project and to include nauty in the final library to facilitate usage. I am working in CLion and thus, there are CLion project files included in the repository.

LP Solver

nibac requires the use of an external LP solver in order to solve LPs at each node. Support is currently provided for both (older versions of) the commercial CPLEX and the free, open source GLPK. I recommend you use GLPK 4.47, as that was the API under which this code was written, and significant, incompatible changes have been introduced into GLPK in later versions.

You can obtain it here: http://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz

I intend to write a plugin for Clp, the COIN-OR LP solver. More information can be found here:

https://projects.coin-or.org/Clp

It was last tested with CPLEX 7; as I no longer have access to CPLEX and it is a commercial application, CPLEX support for updated versions will likely not be provided.

nauty

Brendan McKay's nauty (released under the Apache License 2.0) is also necessary. We recommend version 22, and as it doesn't install nicely and comes with many features unnecessary for nibac, we include a heavily pared down bare-bones version in src_extern/nauty22 that, when the update to this project is completed, should be configured, built, and bundled automatically in the final nibac library. In the interim, you will have to provide access to the headers and .o files by modifying src/Makefile.

For more information about nauty, please visit:

http://users.cecs.anu.edu.au/~bdm/nauty

Final notes

The core code for nibac is contained in src.

Examples using nibac are contained in examples and are not built by default.

nibac's People

Contributors

sraaphorst avatar

Watchers

 avatar  avatar

nibac's Issues

Investigate upgrading nauty

Check to see if newer versions of nauty offer faster isomorphism checking algorithms, and if so, update the version of nauty in this project from 22, which will entail:

  1. Either updating the bundled nauty source code, or, if nauty has evolved far enough, unbundling the source code completely and requiring users to install it separately. (A third choice of providing the option for either could be given in the base CMakeLists.txt as well.)

  2. Updating the nibac source code to support the new version of nauty.

Design namespace superduper initialization.

It seems we only use superduper (see superduper.h and superduper.c) when we are doing design-theoretic work: thus, we can probably move initialization of superduper to be automatically done directly into the nibac_design.h mass header instead of requiring users to initialize superduper explicitly.

C++ version

Determine if we actually will rely on C++17 features.

If not, can be pare down to C++11 or C++14 features?

Major code update

Modernize the code so that we are not adhering to C++98 standards.

Clean up build system

Make a build system that does not require any manual modification of makefiles.

The goal is to switch to CMake instead, to generate the nibac library and install it, and then also provide support for building the included examples.

Updated CPLEX support

It would be nice - but is very unlikely possible - to provide support for newer versions of CPLEX. We currently only support version 7, but version 12 is available.

Simplify use to generic ILPs

Create an implementation where the user can simply feed in an ILP in some format, with some command-line parameters.

nibac already has the capability to automatically find the symmetry group of a general ILP (although this can be slow and specifying the symmetry group is always better if it is known, which we could allow for as well), and then can solve the ILP to find one solution, or all (perhaps no) solutions up to isomorphism.

This way, nibac could be built into a simple application, and would require no programming experience on the part of the user.

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.