1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
language-mzn/sample.mzn
2016-01-18 22:28:52 +01:00

22 lines
319 B
MiniZinc

% Model of the queens problem
include "globals.mzn";
% parameters
int: n=;
% variables
array[1..n] of var 1..n: R;
% constraints
constraint all_different(R);
constraint all_different([R[i] + i | i in 1..n]);
constraint all_different([R[i] + i | i in 1..n]);
% objective
solve satisfy;
% output
output [show(R)];