From 91919eedd2904c34068c4087c7ca9618ec8ad6c0 Mon Sep 17 00:00:00 2001 From: "Jip J. Dekker" Date: Thu, 8 Apr 2021 18:05:17 +1000 Subject: [PATCH] Change structure in the background chapter --- chapters/2_background.tex | 51 ++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/chapters/2_background.tex b/chapters/2_background.tex index c428950..7a8861a 100644 --- a/chapters/2_background.tex +++ b/chapters/2_background.tex @@ -1,5 +1,5 @@ %************************************************ -\chapter{Modelling with Constraints}\label{ch:background} +\chapter{Review of Literature}\label{ch:background} %************************************************ A goal shared between all programming languages is to provide a certain level of @@ -22,7 +22,7 @@ amount of space left in the car, so we cannot bring all the toys. Since Audrey gets enjoys playing with some toys more than others, we can now try and pick the toys that bring Audrey the most amount of joy, but still fit in the car. -\begin{listing}[ht] +\begin{listing} \pyfile{assets/py/2_dyn_knapsack.py} \caption{\label{lst:2-dyn-knapsack} A Python program that solves a 0-1 knapsack problem using dynamic programming} @@ -38,7 +38,7 @@ all different combinations of toys to find the combination that will give the most joy, but using a dynamic programming approach this exponential behaviour (on the number of toys) can be avoided. -\begin{listing}[ht] +\begin{listing} \mznfile{assets/mzn/2_knapsack.mzn} \caption{\label{lst:2-mzn-knapsack} A \minizinc\ model describing a 0-1 knapsack problem} @@ -46,30 +46,27 @@ most joy, but using a dynamic programming approach this exponential behaviour A constraint model offers a different view of the problem. Instead of specifying the manner in which we can find the solution, we give a concise description of -the problem in terms of what we already know, the \glspl{parameter}, -what we wish to know, the \glspl{variable}, and the relationships that -should exists between them, the \glspl{constraint}. \Cref{lst:2-mzn-knapsack} shows -a \minizinc\ model of the knapsack problem, where the different elements of the +the problem in terms of what we already know, the \glspl{parameter}, what we +wish to know, the \glspl{variable}, and the relationships that should exists +between them, the \glspl{constraint}. \Cref{lst:2-mzn-knapsack} shows a +\minizinc\ model of the knapsack problem, where the different elements of the constraint model are separated. Although a constraint model does not contain any instructions to find a suitable solutions, these models can generally be given to a dedicated solving program, or \gls{solver} for short, that can find a solution that fits the requirements of the model. - -\section{Constraint Modelling Basics} -\label{sec:2-constraint-modelling-basics} - -\section{Solving Techniques} -\label{sec:2-solving-techniques} - -\section{A Comparison of Constraint Modelling Languages} -\label{sec:2-different-languages} - -\section{What Makes a ``Good'' Model?} -\label{sec:2-model-quality} +In the remainder of this chapter we will first, in \cref{sec:back-minizinc} +introduce \minizinc\ as the leading \cml\ used within this thesis. +\cref{sec:back-mzn-interpreter} explains the process that the current \minizinc\ +interpreter uses to translate a \minizinc\ model into a solver-level constraint +model. Then, \cref{sec:back-other-languages} introduces alternative \cmls\ and +compares their functionality to \minizinc{}. Finally, \cref{sec:back-term} and +\cref{sec:back} survey the closely related fields of -\section{From the Abstract Machine Paper} +\section{\glsentrytext{minizinc}}% +\label{sec:back-minizinc} + \minizinc\ \autocite{nethercote-2007-minizinc} is a high-level, solver- and data-independent modelling language for discrete satisfiability and optimisation problems. Its expressive language and extensive library of constraints allow @@ -125,3 +122,17 @@ This type of combinatorial problem is typically called a \gls{csp}. \minizinc also supports the modelling of \gls{cop}, where a \gls{csp} is augmented with an \gls{objective} \(z\). In this case the goal is to find an assignment that satisfies all constraints while minimising (or maximising) \(z\). + +\section{The current \glsentrytext{minizinc} interpreter}% +\label{sec:back-mzn-interpreter} + +\section{Other Constraint Modelling Languages}% +\label{sec:back-other-languages} + +\section{ACD Term Rewriting}% +\label{sec:back-term} + +\section{Constraint Logic Programming}% +\label{sec:back-clp} + +