Coder Social home page Coder Social logo

haskelzinc's Introduction

Description

This package was created in the context of the GRACeFUL project.

The haskelzinc library defines an interface to the MiniZinc 2.0 constraint proramming language. It provides

  • a Haskell abstract syntax tree for the MiniZinc language, with which one can represent MiniZinc models in Haskell
  • a pretty printer to print the representation of a MiniZinc model in MiniZinc
  • a parser that returns a representation of the solutions obtained by running the MiniZinc model

An additional module gives the possibility to directly get the solutions of a MiniZinc finite domain model. Option for interactive interface is provided, as well as choice between two solvers: the G12/FD built-in solver of FlatZinc and choco3.

Requirements

  • GHC 7.10.3
  • MiniZinc 2.0

Optional

To use choco solver, also required:

Compatible with Windows and Unix systems.

Installation

This library is available on hackage. Use cabal install.

Configuration

  1. Create a file HZconf/conf.txt in the same directory level where you want to run your code.
  2. Fill in the corresponding paths by adding the equal sign (=) and the correct path.
MINIZINC_DIR: the directory where mzn2fzn and flatzinc executables are located
CHOCO_PARSER: the path of the choco parser java library
CHOCO_SOLVER: the path of the choco solver java libaray
ANTLR: the path of the antlr java libaray

Example: MINIZINC_DIR = path/to/dir

Not yet supported

  • MiniZinc annotations
  • Set constraints with the choco solver

Comments for linux users

The assumed name of the flatzinc executable is flatzinc. So if you are using fzn-gecode you may need to make sure there is a symlink from flatzinc to fzn-gecode. Furthermore the code assumes that flatzinc defaults to the -b fd setting. This will be fixed in an upcoming commit.

haskelzinc's People

Contributors

klaramar avatar maximilianalgehed avatar

Watchers

 avatar  avatar  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.