Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Amin Raslan
CLPFD MiniZinc
Commits
7fb7ef2a
Commit
7fb7ef2a
authored
Sep 13, 2021
by
Amin Raslan
Browse files
Replace appendix.tex
parent
10ab37fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Thesis in Latex/appendix.tex
View file @
7fb7ef2a
...
@@ -28,7 +28,6 @@ constraint if n = 0 then fak_n = 1 else fak_n = product([i| i in 1..n])
...
@@ -28,7 +28,6 @@ constraint if n = 0 then fak_n = 1 else fak_n = product([i| i in 1..n])
endif;
endif;
\end{minted}
\end{minted}
\newpage
\subsection
{
Send Money
}
\subsection
{
Send Money
}
\subsubsection
{
Send More Money
}
\subsubsection
{
Send More Money
}
\label
{
subsubsection:send
_
more
_
money
}
\label
{
subsubsection:send
_
more
_
money
}
...
@@ -48,7 +47,7 @@ send_more_money_minizinc([S,E,N,D,M,O,R,Y]) :-
...
@@ -48,7 +47,7 @@ send_more_money_minizinc([S,E,N,D,M,O,R,Y]) :-
FznState),
FznState),
fzn
_
solve(FznState).
fzn
_
solve(FznState).
\end{minted}
\end{minted}
\newpage
\subsubsection*
{
A.2.1.4 Send More Money - MiniZinc mit Array
}
\subsubsection*
{
A.2.1.4 Send More Money - MiniZinc mit Array
}
\label
{
subsubsection:send
_
more
_
money
_
minizinc
_
array
}
\label
{
subsubsection:send
_
more
_
money
_
minizinc
_
array
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
...
@@ -65,7 +64,7 @@ constraint (1000*digits[1] + 100*digits[2] + 10*digits[3] + digits[4])
...
@@ -65,7 +64,7 @@ constraint (1000*digits[1] + 100*digits[2] + 10*digits[3] + digits[4])
solve satisfy;
solve satisfy;
\end{minted}
\end{minted}
\newpage
\subsubsection*
{
A.2.1.5 Send More Money - MiniZinc ohne alldifferent
}
\subsubsection*
{
A.2.1.5 Send More Money - MiniZinc ohne alldifferent
}
\label
{
subsubsection:send
_
more
_
money
_
minizinc
_
ohne
_
alldifferent
}
\label
{
subsubsection:send
_
more
_
money
_
minizinc
_
ohne
_
alldifferent
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
...
@@ -105,12 +104,10 @@ constraint (1000*s + 100*e + 10*n + d)
...
@@ -105,12 +104,10 @@ constraint (1000*s + 100*e + 10*n + d)
solve satisfy;
solve satisfy;
\end{minted}
\end{minted}
\newpage
\subsubsection
{
Send Most Money
}
\subsubsection
{
Send Most Money
}
\label
{
subsubsection:send
_
most
_
money
}
\label
{
subsubsection:send
_
most
_
money
}
\subsubsection*
{
A.2.2.1 CLP(FD)
}
\subsubsection*
{
A.2.2.1 CLP(FD)
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
send
_
most
_
money.pl
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
send
_
most
_
money.pl
}
\newpage
\subsubsection*
{
A.2.2.2 MiniZinc in MiniZincIDE
}
\subsubsection*
{
A.2.2.2 MiniZinc in MiniZincIDE
}
\label
{
subsubsection:send
_
most
_
money
_
minizincide
}
\label
{
subsubsection:send
_
most
_
money
_
minizincide
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
send
_
most
_
money.mzn
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
send
_
most
_
money.mzn
}
...
@@ -124,7 +121,7 @@ send_most_money_minizinc([S,E,N,D,M,O,T,Y], MONEY) :-
...
@@ -124,7 +121,7 @@ send_most_money_minizinc([S,E,N,D,M,O,T,Y], MONEY) :-
FznState),
FznState),
fzn
_
solve(FznState).
fzn
_
solve(FznState).
\end{minted}
\end{minted}
\newpage
\subsubsection*
{
A.2.2.4 Send Most Money - MiniZinc mit Array
}
\subsubsection*
{
A.2.2.4 Send Most Money - MiniZinc mit Array
}
\label
{
subsubsection:send
_
most
_
money
_
minizinc
_
array
}
\label
{
subsubsection:send
_
most
_
money
_
minizinc
_
array
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
...
@@ -145,7 +142,7 @@ constraint (1000*digits[1] + 100*digits[2] + 10*digits[3] + digits[4])
...
@@ -145,7 +142,7 @@ constraint (1000*digits[1] + 100*digits[2] + 10*digits[3] + digits[4])
solve maximize money;
solve maximize money;
\end{minted}
\end{minted}
\newpage
\subsubsection*
{
A.2.2.5 Send Most Money - MiniZinc ohne alldifferent
}
\subsubsection*
{
A.2.2.5 Send Most Money - MiniZinc ohne alldifferent
}
\label
{
subsubsection:send
_
most
_
money
_
minizinc
_
ohne
_
alldifferent
}
\label
{
subsubsection:send
_
most
_
money
_
minizinc
_
ohne
_
alldifferent
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
...
@@ -187,14 +184,13 @@ constraint (1000*s + 100*e + 10*n + d)
...
@@ -187,14 +184,13 @@ constraint (1000*s + 100*e + 10*n + d)
solve maximize money;
solve maximize money;
\end{minted}
\end{minted}
\newpage
\subsection
{
Smuggler's Knapsack
}
\subsection
{
Smuggler's Knapsack
}
\label
{
subsection:smugglers
_
knapsack
}
\label
{
subsection:smugglers
_
knapsack
}
\subsubsection*
{
A.3.1 CLP(FD)
}
\subsubsection*
{
A.3.1 CLP(FD)
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
smugglers
_
knapsack.pl
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
smugglers
_
knapsack.pl
}
\subsubsection*
{
A.3.2 MiniZinc in MiniZincIDE
}
\subsubsection*
{
A.3.2 MiniZinc in MiniZincIDE
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
smugglers
_
knapsack.mzn
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
smugglers
_
knapsack.mzn
}
\newpage
\subsubsection*
{
A.3.3 MiniZinc in SICStus-Prolog
}
\subsubsection*
{
A.3.3 MiniZinc in SICStus-Prolog
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
\begin{minted}
[frame=lines,linenos]
{
prolog
}
:- use
_
module(library(zinc)).
:- use
_
module(library(zinc)).
...
@@ -218,7 +214,6 @@ constraint 15*items[1] + 10*items[2] + 7*items[3] >= profit;
...
@@ -218,7 +214,6 @@ constraint 15*items[1] + 10*items[2] + 7*items[3] >= profit;
solve maximize 15*items[1] + 10*items[2] + 7*items[3];
solve maximize 15*items[1] + 10*items[2] + 7*items[3];
\end{minted}
\end{minted}
\newpage
\subsection
{
Who Killed Agatha
}
\subsection
{
Who Killed Agatha
}
\label
{
subsection:who
_
killed
_
agatha
}
\label
{
subsection:who
_
killed
_
agatha
}
\subsubsection*
{
A.4.1 CLP(FD)
}
\subsubsection*
{
A.4.1 CLP(FD)
}
...
@@ -236,7 +231,6 @@ who_killed_agatha_minizinc(Killer) :-
...
@@ -236,7 +231,6 @@ who_killed_agatha_minizinc(Killer) :-
fzn
_
solve(FznState).
fzn
_
solve(FznState).
\end{minted}
\end{minted}
\newpage
\subsection
{
Zebra Puzzle
}
\subsection
{
Zebra Puzzle
}
\label
{
subsection:zebra
_
puzzle
}
\label
{
subsection:zebra
_
puzzle
}
\subsubsection*
{
A.5.1 CLP(FD)
}
\subsubsection*
{
A.5.1 CLP(FD)
}
...
@@ -260,12 +254,11 @@ zebra_puzzle_minizinc([Englaender,Spanier,Ukrainer,Norweger,Japaner,ZEBRA,WASSER
...
@@ -260,12 +254,11 @@ zebra_puzzle_minizinc([Englaender,Spanier,Ukrainer,Norweger,Japaner,ZEBRA,WASSER
FznState),
FznState),
fzn
_
solve(FznState).
fzn
_
solve(FznState).
\end{minted}
\end{minted}
\newpage
\subsubsection*
{
A.5.4 MiniZinc mit Arrays
}
\subsubsection*
{
A.5.4 MiniZinc mit Arrays
}
\label
{
subsubsection:MiniZinc mit Arrays
}
\label
{
subsubsection:MiniZinc mit Arrays
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
zebra
_
puzzle
_
arrays.mzn
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
zebra
_
puzzle
_
arrays.mzn
}
\newpage
\subsection
{
Seseman's Convent
}
\subsection
{
Seseman's Convent
}
\label
{
subsection:sesemans
_
convent
}
\label
{
subsection:sesemans
_
convent
}
\subsubsection*
{
A.6.1 CLP(FD)
}
\subsubsection*
{
A.6.1 CLP(FD)
}
...
@@ -306,7 +299,6 @@ constraint digits[1] + digits[2] + digits[3] + digits[4]
...
@@ -306,7 +299,6 @@ constraint digits[1] + digits[2] + digits[3] + digits[4]
solve satisfy
solve satisfy
\end{minted}
\end{minted}
\newpage
\subsection
{
Subset Sum
}
\subsection
{
Subset Sum
}
\label
{
subsection:subset
_
sum
}
\label
{
subsection:subset
_
sum
}
\subsubsection*
{
A.7.1 CLP(FD)
}
\subsubsection*
{
A.7.1 CLP(FD)
}
...
@@ -314,12 +306,11 @@ solve satisfy
...
@@ -314,12 +306,11 @@ solve satisfy
\subsubsection*
{
A.7.2 MiniZinc in MiniZincIDE
}
\subsubsection*
{
A.7.2 MiniZinc in MiniZincIDE
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
subset
_
sum.mzn
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
subset
_
sum.mzn
}
\newpage
\subsection
{
Magic Hexagon
}
\subsection
{
Magic Hexagon
}
\label
{
subsection:magic
_
hexagon
}
\label
{
subsection:magic
_
hexagon
}
\subsubsection*
{
A.8.1 CLP(FD)
}
\subsubsection*
{
A.8.1 CLP(FD)
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
magic
_
hexagon.pl
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
magic
_
hexagon.pl
}
\newpage
\subsubsection*
{
A.8.2 MiniZinc in MiniZincIDE
}
\subsubsection*
{
A.8.2 MiniZinc in MiniZincIDE
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
magic
_
hexagon.mzn
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
magic
_
hexagon.mzn
}
\subsubsection*
{
A.8.3 MiniZinc in SICStus-Prolog
}
\subsubsection*
{
A.8.3 MiniZinc in SICStus-Prolog
}
...
@@ -327,7 +318,7 @@ solve satisfy
...
@@ -327,7 +318,7 @@ solve satisfy
:- use
_
module(library(zinc)).
:- use
_
module(library(zinc)).
magic
_
hexagon
_
minizinc([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S]) :-
magic
_
hexagon
_
minizinc([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S]) :-
mzn
_
load
_
file('
/home/amin/Schreibtisch/Bachelorarbeit/MiniZinc/
magic
_
hexagon.mzn',
mzn
_
load
_
file('magic
_
hexagon.mzn',
[variables([a=A,b=B,c=C,d=D,e=E,f=F,g=G,h=H,i=I,j=J,k=K,l=L,m=M,
[variables([a=A,b=B,c=C,d=D,e=E,f=F,g=G,h=H,i=I,j=J,k=K,l=L,m=M,
n=N,o=O,p=P,q=Q,r=R,s=S])],
n=N,o=O,p=P,q=Q,r=R,s=S])],
FznState),
FznState),
...
@@ -376,7 +367,6 @@ constraint sum([numbers[8], numbers[13], numbers[17]]) = sum;
...
@@ -376,7 +367,6 @@ constraint sum([numbers[8], numbers[13], numbers[17]]) = sum;
solve satisfy;
solve satisfy;
\end{minted}
\end{minted}
\newpage
\subsection
{
Magic Square
}
\subsection
{
Magic Square
}
\label
{
subsection:magic
_
square
}
\label
{
subsection:magic
_
square
}
\subsubsection*
{
A.9.1 CLP(FD)
}
\subsubsection*
{
A.9.1 CLP(FD)
}
...
@@ -393,7 +383,6 @@ magic_square_minizinc(N,Squares) :-
...
@@ -393,7 +383,6 @@ magic_square_minizinc(N,Squares) :-
fzn
_
solve(FznState).
fzn
_
solve(FznState).
\end{minted}
\end{minted}
\newpage
\subsection
{
N Queens
}
\subsection
{
N Queens
}
\label
{
subsection:n
_
queens
}
\label
{
subsection:n
_
queens
}
\subsubsection*
{
A.10.1 CLP(FD)
}
\subsubsection*
{
A.10.1 CLP(FD)
}
...
@@ -410,7 +399,6 @@ n_queens_minizinc(N,Queens) :-
...
@@ -410,7 +399,6 @@ n_queens_minizinc(N,Queens) :-
fzn
_
solve(FznState).
fzn
_
solve(FznState).
\end{minted}
\end{minted}
\newpage
\subsection
{
Sudoku
}
\subsection
{
Sudoku
}
\label
{
subsection:sudoku
}
\label
{
subsection:sudoku
}
\subsubsection*
{
A.11.1 CLP(FD)
}
\subsubsection*
{
A.11.1 CLP(FD)
}
...
@@ -418,7 +406,6 @@ n_queens_minizinc(N,Queens) :-
...
@@ -418,7 +406,6 @@ n_queens_minizinc(N,Queens) :-
\subsubsection*
{
A.11.2 MiniZinc in MiniZincIDE
}
\subsubsection*
{
A.11.2 MiniZinc in MiniZincIDE
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
sudoku.mzn
}
\inputminted
[frame=lines,linenos]
{
prolog
}{
sudoku.mzn
}
\newpage
\subsection
{
Euler's Officer Problem
}
\subsection
{
Euler's Officer Problem
}
\label
{
subsection:eulers
_
officer
_
problem
}
\label
{
subsection:eulers
_
officer
_
problem
}
\subsubsection*
{
A.12.1 CLP(FD)
}
\subsubsection*
{
A.12.1 CLP(FD)
}
...
@@ -436,7 +423,6 @@ officer_problem_minizinc(N,Square) :-
...
@@ -436,7 +423,6 @@ officer_problem_minizinc(N,Square) :-
fzn
_
solve(FznState).
fzn
_
solve(FznState).
\end{minted}
\end{minted}
\newpage
\subsection
{
K Dominating Set
}
\subsection
{
K Dominating Set
}
\label
{
subsection:k
_
dominating
_
set
}
\label
{
subsection:k
_
dominating
_
set
}
\subsubsection*
{
13.1 CLP(FD)
}
\subsubsection*
{
13.1 CLP(FD)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment