libminizinc

The MiniZinc compiler

https://github.com/minizinc/libminizinc

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    13 of 58 committers (22.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.8%) to scientific vocabulary

Keywords from Contributors

constraint-programming integer-programming minizinc optimisation-problem sat-solver argument-parser interactive mesh interpretability sequences
Last synced: 7 months ago · JSON representation ·

Repository

The MiniZinc compiler

Basic Info
  • Host: GitHub
  • Owner: MiniZinc
  • License: other
  • Language: MiniZinc
  • Default Branch: master
  • Homepage: http://www.minizinc.org
  • Size: 27 MB
Statistics
  • Stars: 559
  • Watchers: 39
  • Forks: 85
  • Open Issues: 124
  • Releases: 63
Created about 11 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License Citation

README.md


Logo

MiniZinc

A high-level constraint modelling language that allows you to easily express and solve discrete optimisation problems.
Visit our website »

View Documentation · Report Bug · Request Feature

Table of Contents

About The Project

MiniZinc is a free and open-source constraint modeling language.

You can use MiniZinc to model constraint satisfaction and optimisation problems in a high-level, solver-independent way, taking advantage of a large library of pre-defined constraints. Your model is then compiled into FlatZinc, a solver input language that is understood by a wide range of solvers.

MiniZinc is developed at Monash University with support from OPTIMA.

Getting Started

To get a MiniZinc up and running follow these simple steps.

Installation

The recommended way to install MiniZinc is by the use of the bundled binary packages. These packages are available for machines running Linux, Mac, and Windows.

The latest release can be found on the MiniZinc website.

Usage

Once the MiniZinc bundle is installed on your machine, you can start expressing and solving discrete optimisation problems. The following code segment shows a MiniZinc model for the well known n-queens problem.

```minizinc int: n = 8; % The number of queens.

array [1..n] of var 1..n: q;

include "alldifferent.mzn";

constraint alldifferent(q); constraint alldifferent(i in 1..n)(q[i] + i); constraint alldifferent(i in 1..n)(q[i] - i); ```

You have two easy options to solve this model:

  • In the MiniZincIDE: Select your preferred solver and press the "Run" button.
  • With the minizinc executable available on your path: run minizinc --solver gecode nqueens.mzn.

For more example MiniZinc models and more information about working with MiniZinc, please refer to our Documentation

Building

The following instructions will help you compile the MiniZinc compiler. Note that this repository does not include the IDE, findMUS, or any solvers that are part of the MiniZinc project. These can be found in the following repositories:

Prerequisites

  • CMake (>=3.4)
  • A recent C++ compiler - Compilation is tested with recent versions of Clang, GCC, and Microsoft Visual C++.
  • (optional) Bison (>=3.4) and Flex (>=2.5) - To make changes to the MiniZinc lexer or parser.
  • (optional) Gecode - To compile the internal Gecode solver interface (included in the MiniZinc bundle)
  • (optional) Coin OR's CBC - To compile the internal CBC solver interface (included in the MiniZinc bundle)
  • (optional) Proprietary solver headers (CPLEX, Gurobi, SCIP, Xpress) - To load these solvers at runtime (included in the MiniZinc bundle)

Compilation

The MiniZinc compiler is compiled as a CMake project. CMake's User Interaction Guide can provide you with a quick introduction to compiling CMake projects. The following CMake variables can be used in the MiniZinc project to instruct the compilation behaviour:

| Variable | Default | Description | | -------------------------------------------- | ------- | ----------------------------------------------------------- | | CMAKEBUILDTYPE | Release | Build type of single-configuration generators. | | CMAKEINSTALLPREFIX | | Install directory used by --target install. | | CMAKEPOSITIONINDEPENDENTCODE | TRUE | Whether to create a position-independent targets | | **<solvername>_ROOT | | Additional directory to look for ** | | CMAKEDISABLEFINDPACKAGE | FALSE | Disable compilation of 's solver interface | | CPLEX_PLUGIN | TRUE | Load CPLEX at runtime (instead of static compilation) |

Possible values for are CPlex, Geas, Gecode, and OsiCBC.

Testing

The correctness of the MiniZinc compiler is tested using a PyTest test suite. Instruction on how to run the test suite and how to add new tests can be found here

License

Distributed under the Mozilla Public License Version 2.0. See LICENSE for more information.

Acknowledgements

This research was partially funded by the Australian Government through the Australian Research Council Industrial Transformation Training Centre in Optimization Technologies, Integrated Methodologies, and Applications (OPTIMA), Project ID IC200100009.

Contact

🏛 MiniZinc Community

🏛 Monash Optimisation Group

Owner

  • Name: MiniZinc
  • Login: MiniZinc
  • Kind: organization
  • Location: Australia

MiniZinc is a free and open-source constraint modeling language

Citation (CITATION.cff)

# This file contains metadata to help users cite MiniZinc in academic
# publications. To add more details, see https://citation-file-format.github.io
# for help.

cff-version: 1.2.0
title: MiniZinc
message: >-
  Please use the conference paper “MiniZinc: Towards a Standard CP Modelling
  Language” as the primary citation for MiniZinc. *In addition* please consider
  using the contained software citation to cite the specific version of MiniZinc
  you are using.
type: software
preferred-citation:
  title: "MiniZinc: Towards a Standard CP Modelling Language"
  type: conference-paper
  authors:
    - given-names: Nicholas
      family-names: Nethercote
      affiliation: National ICT Australia and the University of Melbourne
    - given-names: Peter J.
      family-names: Stuckey
      orcid: 'https://orcid.org/0000-0003-2186-0459'
      affiliation: National ICT Australia and the University of Melbourne
    - given-names: Sebastian
      family-names: Brand
      affiliation: National ICT Australia and the University of Melbourne
    - given-names: Gregory J.
      family-names: Duck
      email: guido.tack@monash.edu
      affiliation: National ICT Australia and the University of Melbourne
      orcid: 'https://orcid.org/0000-0002-0837-9671'
    - given-names: Guido
      family-names: Tack
      affiliation: Programming Systems Lab, Saarland University
      orcid: 'https://orcid.org/0000-0003-3357-6498'
  conference:
    name: Principles and Practice of Constraint Programming 2007
    location: Providence, RI, USA
  collection-type: proceedings
  collection-title: Principles and Practice of Constraint Programming - CP 2007
  editors:
    - given-names: Christian
      family-names: Bessière
  pages: "529-543"
  year: 2007
  publisher: Springer
  url: 'https://doi.org/10.1007/978-3-540-74970-7_38'
  doi: 10.1007/978-3-540-74970-7_38
authors:
  - given-names: Guido
    family-names: Tack
    email: guido.tack@monash.edu
    affiliation: 'Monash University & OPTIMA ARC Training Centre'
    orcid: 'https://orcid.org/0000-0003-3357-6498'
  - given-names: Jip J.
    family-names: Dekker
    email: jip.dekker@monash.edu
    affiliation: 'Monash University & OPTIMA ARC Training Centre'
    orcid: 'https://orcid.org/0000-0002-0053-6724'
  - given-names: Kevin
    family-names: Leo
    email: kevin.leo@monash.edu
    affiliation: Monash University
    orcid: 'https://orcid.org/0000-0003-4720-4265'
  - given-names: Gleb
    family-names: Belov
    affiliation: Monash University
    orcid: 'https://orcid.org/0000-0002-6120-8484'
  - given-names: Jason
    family-names: Nguyen
    email: jason.nguyen@monash.edu
    affiliation: 'Monash University & OPTIMA ARC Training Centre'
    orcid: 'https://orcid.org/0009-0002-1038-8961'
  - given-names: Maria
    family-names: Garcia de la Banda
    email: maria.garciadelabanda@monash.edu
    affiliation: 'Monash University & OPTIMA ARC Training Centre'
    orcid: 'https://orcid.org/0000-0002-6666-514X'
  - given-names: Peter J.
    family-names: Stuckey
    email: peter.stuckey@monash.edu
    orcid: 'https://orcid.org/0000-0003-2186-0459'
    affiliation: 'Monash University & OPTIMA ARC Training Centre'
repository-code: 'https://github.com/MiniZinc/libminizinc'
url: 'https://www.minizinc.org/'
abstract: >-
  MiniZinc is a free and open-source constraint modelling language.

  You can use MiniZinc to model constraint satisfaction and optimization
  problems in a high-level, solver-independent way, taking advantage of a large
  library of pre-defined constraints. Your model is then compiled into FlatZinc,
  a solver input language that is understood by a wide range of solvers.
keywords:
  - constraint modelling
  - optimisation
  - constraint programming
  - Boolean Satisfiability
  - mixed integer programming
license: MPL-2.0
identifiers:
  - type: doi
    value: 10.5281/zenodo.7340323
    description: Zenodo Software Archival DOI

GitHub Events

Total
  • Create event: 5
  • Commit comment event: 1
  • Release event: 3
  • Issues event: 128
  • Watch event: 48
  • Issue comment event: 117
  • Push event: 74
  • Pull request review comment event: 2
  • Pull request review event: 2
  • Pull request event: 10
  • Fork event: 4
Last Year
  • Create event: 5
  • Commit comment event: 1
  • Release event: 3
  • Issues event: 128
  • Watch event: 48
  • Issue comment event: 117
  • Push event: 74
  • Pull request review comment event: 2
  • Pull request review event: 2
  • Pull request event: 10
  • Fork event: 4

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 6,369
  • Total Committers: 58
  • Avg Commits per committer: 109.81
  • Development Distribution Score (DDS): 0.48
Past Year
  • Commits: 179
  • Committers: 7
  • Avg Commits per committer: 25.571
  • Development Distribution Score (DDS): 0.497
Top Committers
Name Email Commits
Guido Tack g****k@m****u 3,315
Jip J. Dekker j****p@d****e 830
Jason N a****n@c****g 744
Gleb Belov g****v@m****u 673
Kevin Leo k****o@g****m 287
Andrea Rendl a****l@n****u 103
Gleb Belov b****7@g****t 88
Pierre WILKE w****e@g****m 44
Tai Tran t****4@y****n 41
matthieu.herrmann m****n 36
Boris Almonacid b****d@g****m 27
Jip J. Dekker j****p@d****i 24
Jason Nguyen j****n@m****u 17
Tias Guns t****s@c****e 13
Domingo Alvarez Duarte m****d@g****m 13
Samuel Gratzl s****l@g****t 10
Chris Mears c****s@c****u 9
unknown g****b@M****U 7
hbierlee b****k@g****m 7
钟卓炜 z****6@g****m 7
Peter Stuckey p****y@n****u 6
Karsten k****n@s****m 6
Pierre WILKE p****e@b****) 6
Pierre Wilke p****e@s****u 5
Edward Lam ed@e****m 5
Mikael Zayenz Lagerkvist z****z@g****m 4
Bruce Mitchener b****r@g****m 3
Andreas Schutt a****t@n****u 3
Peter Stuckey p****y@m****u 2
Gleb Belov g****b@m****u 2
and 28 more...

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 244
  • Total pull requests: 28
  • Average time to close issues: 4 months
  • Average time to close pull requests: 12 months
  • Total issue authors: 91
  • Total pull request authors: 13
  • Average comments per issue: 1.59
  • Average comments per pull request: 0.86
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 86
  • Pull requests: 13
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 4 months
  • Issue authors: 31
  • Pull request authors: 5
  • Average comments per issue: 1.02
  • Average comments per pull request: 0.38
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • CervEdin (35)
  • jnmonette (15)
  • matsc-at-sics-se (13)
  • LebedevRI (12)
  • informarte (11)
  • titorau (10)
  • vdijken (7)
  • scand1sk (6)
  • snicolai (5)
  • zayenz (4)
  • colbec (4)
  • Wout4 (4)
  • raphaelboudreault (4)
  • tobiasBora (4)
  • Alexander-Schiendorfer (3)
Pull Request Authors
  • vitor1001 (6)
  • Dekker1 (5)
  • LebedevRI (4)
  • skosch (2)
  • rohitkprasad123 (2)
  • tias (2)
  • jmjrawlings (2)
  • waywardmonkeys (2)
  • Alexander-Schiendorfer (1)
  • IXI01 (1)
  • kletzi (1)
  • barracuda156 (1)
  • nikai3d (1)
  • Nackha1 (1)
Top Labels
Issue Labels
bug (70) resolved (68) enhancement (9) bundle (3) duplicate (3) question (3) wontfix (2) documentation (2)
Pull Request Labels

Dependencies

tests/flattening/requirements.txt pypi
  • pandas ==1.2. test
  • tabulate ==0.8. test
tests/requirements.txt pypi
  • PyYAML ==5.4 test
  • minizinc develop test
  • py ==1.9. test
  • pytest ==6. test
  • pytest-html ==2. test
  • pytest-instafail ==0.4. test
  • pytest-xdist ==2. test