Code Monkey home page Code Monkey logo

minimum-spaning-tree-gurobi's Introduction

Minimum-Spaning-Tree-Gurobi


Minimum Spaning Tree Solutiın with/without constraints using Gurobi Library

Prerequisites:

  • C++ complier
  • C++ Gurobi Solver

In this repository you will find two different formulation of Minimum Spaning Tree solver. These two formulation are widely used by researchers and business people to solve MST problems.

Miller, Tucker and Zemlin Formulation

Filename: MSTP - Miller, Tucker Zemlin.cpp
For an example model file check out: MSTP - Miller, Tucker Zemlin.lp

Simply MTZ formulation first apear in 1960 and still a popular formulation to solve Travelling Salesman Problem (TSP) or Minimum Spanning Trees (MST). It uses an Integer Programming approach to solve models. For more information you may check out the paper they published (https://dl.acm.org/citation.cfm?id=321046) and also search for new papers with 'Miller-Tucker-Zemlin Formulation' keyword.


Gavish and Graves Formulation

Filename: MSTP - Gavish, Graves.cpp
For an example model file check out: MSTP - Gavish, Graves.lp

Gavish and Graves first published their paper on Integer Programming solution for TSP solution on 1978 you may check out the paper via (http://hdl.handle.net/1721.1/5363), with their different approach the formulation is still a hot topic for researchers.

In my coding files, you may find a vector based approach to read Integer Programming (IP) Models from multiple *.txt files and contruct Gurobi models and run Gurobi IP Solver, then get the results for each run.
One addition to formulation I use conflicting edges as constraints but not include all the constraints at once (because time complexity goes sky high).
My approach is:

  • Step 1: Solve model without constraint
  • Step 2: Check current solution has any conflicting edges
  • Step 3.1: Add constraints for conflicting pairs into model
  • Step 3.2: Run again and Go to Step 2
  • Step 4: Print out the results

minimum-spaning-tree-gurobi's People

Contributors

faydogan avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mangecoeur

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.