Code Monkey home page Code Monkey logo

mjwach / two-steiner-tree-algorithms-in-java Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 2.0 4.23 MB

Two algorithms in Java for building Steiner trees: one that accepts a list of unconnected points in the Euclidean plane and efficiently connects them with a tree, and one that accepts an undirected graph with weighted edges and a list of some of the graph's vertices, that it may efficiently connect those vertices with a tree-shaped subgraph.

License: Boost Software License 1.0

Java 100.00%
steiner-tree-problem steiner-tree graph-algorithms java

two-steiner-tree-algorithms-in-java's People

Contributors

mjwach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

two-steiner-tree-algorithms-in-java's Issues

Problem finding shortest path on large graphs

Did:
Created the EdgeArraysGraph with default options and weighted edges coming from distances of roads in OpenStreetMap roads graph. The graph was created using OSM data from geofabrik.de.
Tried the algorithm on a large graph (> 5000 vertices, > 100 randomly selected terminals).

Happened:
Got exception telling: "no more advancement is possible".

Expected:
To solve the Steiner minimum tree problem without errors.

Note:
I've double-checked the vertices and edges passed to the graph and the path should be found.

Steiner minimum tree not found for the graph with fixed weight on edges.

Did:
I have written a JUnit test that shows the problem of finding Steiner minimum tree.

Please see the attached:
TestFixedTwoHeuristicsSteinerTree.zip

To run the test:

  1. Unpack the zip file in the main project directory preserving the directory structure. ( there is only one JAVA file)
  2. Download and include in the project path "junit-platform-console-standalone" Jar, for example from the Maven repository.
  3. Run the JUnit test src/sl/TestFixedTwoHeuristicsSteinerTree.java

Alternatively, remove the "junit-platform-console-standalone" dependency from the src/sl/TestFixedTwoHeuristicsSteinerTree.java file (import static org.junit.jupiter.api.Assertions.assertTrue;) and assert and run the program in debug mode to see that it doesn't have the path specified in the results.

Happened:
Got missing paths resulting in the Steiner tree being not complete.

The preview of one of the missing paths:
missing-path-preview

Moreover, the algorithm also doesn't find the paths between other terminals (Steiner vertices).

Expected:
To find the Steiner minimum tree in the test so that the test would end successfully.

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.