Coder Social home page Coder Social logo

pauldeschacht / hqucgl-of-grouped-networks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vahany/hqucgl-of-grouped-networks

0.0 1.0 0.0 2.78 MB

MIP, CP and SAT models corresponding to the declarative node placement given in section 3 of the corresponding paper.

License: MIT License

AMPL 34.65% C++ 28.50% Python 36.85%

hqucgl-of-grouped-networks's Introduction

HqUcGl-of-Grouped-Networks

MIP, CP, SAT, MIP-LNS models corresponding to the declarative node placement discussed in the paper. The CP model can be directly evaluated using any of the solvers supporting MiniZinc, including the G12 CPX constraint programming solver. The MIP model can be evaluated using G12 MIP, CPLEX, or any other supporting solver. The SAT model can be evaluated using the BumbleBEE solver. The MIP-LNS model can be evaluated using CPLEX.

We include these to highlight how little "code" is required to reproduce the layouts in the paper using modern constraint programming languages.

The CP model (HqUcGl-cp.mzn) accepts input in minizinc data format (.dzn) The MIP model (HqUcGl-mip.mod) accepts input in .dat data files.

The SAT model accepts input in .mod data files, which can be translated from a .mzn file using the mznout2mod.py the .mzn file is pretty simple to generate with the following format:
      #modules=
      1: [1]
      2: [2]
      3: [3]
      4: [1,2]
      #edges=
      (1,2)
      (3,4)
Then the gridlay2dense.py takes the .mod file as input and produces a .dense file as output, Then the dense2bee.py takes the .dense file as input and produces a .bee file as output, then the .bee file is solved using the BumbleBEE solver.

The MIP model (opt_center_complete.mod) accepts input in .dat data files. However, in contrast to the regular MIP model, this one has parameters for ordering constraints and edge length constraints between nodes. These values are gathered from the layout generated by Force-Directed Grid-Snap using WebCola. (https://github.com/tgdwyer/WebCola)

The following are examples of graph layouts produced by the models: alt tag "links between major composers, arranged with our model with the solver choosing the best orientation (vertical / horizontal) for nodes. Layout took 37.422 seconds using the SAT solver - disjunctions due to variable node orientation expand the search space."

alt tag The state-machine graph drawn using WebCola (https://github.com/tgdwyer/WebCola) alt tag The state-machine graph drawn using WebCola's grid-snap feature (https://github.com/tgdwyer/WebCola) alt tag "Here is the same state-machine shown using our ultra-compact grid-based layout which has grid dimensions 4x4 leaving only three empty grid-cells. This optimally compact solution was found in 0.464 seconds using the SAT solver. Although we do not explicitly minimise bends or crossings, our layout is equal to the TSM output in these respects and significantly reduces the overall area and edge-length. With the additional node area we are able to include more detailed descriptions of each state."

alt tag "An example software-dependency graph with routing detail and the final result. Solved in 0.732 seconds with the SAT solver. This network shows dependencies between types, methods and properties in C# code and was obtained in a debugging scenario using the Visual Studio Code Map tool. This layout neatly illustrates the cause of the bug: that Square is the only sub-class of Figure not created by the GetNextFigure method. Code snippets and icons on each of the nodes give added context."

The characters from Les-Miserables represented as nodes. Characters that appear in the same scene are connected. The colouring is based on communities. alt tag Drawn using WebCola (https://github.com/tgdwyer/WebCola) alt tag Drawn using WebCola's grid-snap feature (https://github.com/tgdwyer/WebCola) alt tag Layout solved using CPLEX with LNS and to 473.61 seconds to solve.

hqucgl-of-grouped-networks's People

Contributors

vahany avatar

Watchers

James Cloos 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.