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 t ...
,
integer programming An integer programming problem is a mathematical optimization or feasibility program in which some or all of the variables are restricted to be integers. In many settings the term refers to integer linear programming (ILP), in which the objective ...
,
SAT The SAT ( ) is a standardized test widely used for college admissions in the United States. Since its debut in 1926, its name and Test score, scoring have changed several times. For much of its history, it was called the Scholastic Aptitude Test ...
, 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 t ...
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 solvers using its own format "FlatZinc" or .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 and view the source code, design documents, or content of the product. The open source model is a decentrali ...
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 ...
, including CBC, Choco, Chuffed, HiGHS, 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 C++ (after migrating from Fortran and C) and is released under the EPL ( ...
, and
OR-Tools Google OR-Tools is a free and open-source software suite developed by Google for solving linear programming (LP), mixed integer programming (MIP), constraint programming (CP), vehicle routing (VRP), and related optimization problems. OR-T ...
. MiniZinc is interoperable with other languages such as R and
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (prog ...
.


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