MiniZinc
   HOME

TheInfoList



OR:

MiniZinc is a ''constraint modelling language'' (or
algebraic modeling language Algebraic modeling languages (AML) are high-level computer programming languages for describing and solving high complexity problems for large scale mathematical computation (i.e. large scale optimization type problems). One particular advantage of ...
) to describe and solve high-complexity problems using a variety of well-known solving paradigms for combinatorial problems including
constraint programming Constraint programming (CP) is a paradigm for solving combinatorial problems that draws on a wide range of techniques from artificial intelligence, computer science, and operations research. In constraint programming, users declaratively state th ...
,
integer programming An integer programming problem is a mathematical optimization or Constraint satisfaction problem, feasibility program in which some or all of the variables are restricted to be integers. In many settings the term refers to integer linear programmin ...
, lazy clause generation,
SAT The SAT ( ) is a standardized test widely used for college admissions in the United States. Since its debut in 1926, its name and scoring have changed several times; originally called the Scholastic Aptitude Test, it was later called the Schola ...
, and SMT. Following the
constraint programming Constraint programming (CP) is a paradigm for solving combinatorial problems that draws on a wide range of techniques from artificial intelligence, computer science, and operations research. In constraint programming, users declaratively state th ...
paradigm, in MiniZinc a problem is specified in terms of known values (parameters), unknown values (decision variables), and the relationship (constraints) between these values. MiniZinc promotes the use of global constraints to model well-known structures in problems. These global constraints improve the clarity of the model and allow solvers to use the most effective method to exploit the structure. A MiniZinc problem instance is translated (or ''flattened'') to a level at which it only supports constraints that are supported by the target solver and then given to the solver using its preferred format. Currently MiniZinc can communicate with solver using its own format FlatZinc or
.nl .nl is the Internet country code top-level domain (ccTLD) for the Netherlands. It is one of the most popular ccTLDs with over six million registered .nl domains . When cwi.nl was registered by Centrum Wiskunde & Informatica on 1986-05-01, .nl ...
files. A big advantage of MiniZinc is the possibility to use different solvers, and even different solvers, from the same MiniZinc instance. MiniZinc supports many solvers, both
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
and
commercial software Commercial software, or seldom payware, is a computer software that is produced for sale or that serves commercial purposes. Commercial software can be proprietary software or free and open-source software. Background and challenge While soft ...
, including CBC, Choco, Chuffed,
CPLEX IBM ILOG CPLEX Optimization Studio (often informally referred to simply as CPLEX) is an optimization software package. In 2004, the work on CPLEX earned the first INFORMS Impact Prize. History The CPLEX Optimizer was named for the simplex me ...
,
FICO Xpress The FICO Xpress optimizer is a commercial optimization solver for linear programming (LP), mixed integer linear programming (MILP), convex quadratic programming (QP), convex quadratically constrained quadratic programming (QCQP), second-order co ...
, Gecode, Gurobi,
IPOPT IPOPT, short for "Interior Point OPTimizer, pronounced I-P-Opt", is a software library for large scale nonlinear optimization of continuous systems. It is written in Fortran and C and is released under the EPL (formerly CPL). IPOPT implement ...
, and OR-Tools. MiniZinc is interoperable with other languages such as R. https://cran.r-project.org/web/packages/rminizinc/vignettes/R_MiniZinc.html


Language

The following MiniZinc model can be used to solve the famous ''n''-queens puzzle: include "all_different.mzn"; % Include all_different global int: n = 8; % The number of queens. (parameter) array ..nof var 1..n: q; % The height of the queens on the board. (decision variable) % No queen can be in a position where it can capture another queen. (constraints) constraint all_different(q); constraint all_different(i in 1..n)(q + i); constraint all_different(i in 1..n)(q - i);


References


External links

* * * {{Mathematical optimization software Numerical programming languages Mathematical optimization software Numerical software Computer algebra systems Mathematical modeling Scripting languages Text-oriented programming languages Algebraic modeling languages Supply chain analytics Supply chain management