Small fixes in the first parts of the background

This commit is contained in:
Jip J. Dekker 2021-04-12 14:37:59 +10:00
parent d7db80ec78
commit 651abd0b53
No known key found for this signature in database
GPG Key ID: 517DF4A00618C9C3
2 changed files with 29 additions and 19 deletions

View File

@ -160,3 +160,8 @@
name={reification}, name={reification},
description={}, description={},
} }
\newglossaryentry{term-rewriting}{
name={term rewriting},
description={},
}

View File

@ -22,7 +22,7 @@ solution, we give a concise description of the problem. We describe what we
already know, the \glspl{parameter}, what we wish to know, the \glspl{variable}, already know, the \glspl{parameter}, what we wish to know, the \glspl{variable},
and the relationships that should exists between them, the \glspl{constraint}. and the relationships that should exists between them, the \glspl{constraint}.
This type of combinatorial problem is typically called a \gls{csp}. Many \cmls This type of combinatorial problem is typically called a \gls{csp}. Many \cmls\
also support the modelling of \gls{cop}, where a \gls{csp} is augmented with an also support 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 solution that \gls{objective} \(z\). In this case the goal is to find an solution that
satisfies all \glspl{constraint} while minimising (or maximising) \(z\). satisfies all \glspl{constraint} while minimising (or maximising) \(z\).
@ -49,12 +49,12 @@ the model.
toys that bring Audrey the most amount of joy, but still fit in the car. toys that bring Audrey the most amount of joy, but still fit in the car.
One way to solve this problem is to try all combinations of toys, but this is One way to solve this problem is to try all combinations of toys, but this is
a time intensive task that quickly grows with the number of toys considered time intensive and quickly grows with the number of toys considered (which one
(which one would quickly realise trying to pack a car \(2^{|\text{toys}|}\) would quickly realise trying to pack a car \(2^{|\text{toys}|}\) different
different ways). ways).
An educated reader in optimisation problems might recognise that this is a An educated reader in optimisation problems might recognise that this is a
variation on the widely known \gls{knapsack}, more specifically a \textit{0-1 variation on the widely known \gls{knapsack}, more specifically a \textit{0--1
knapsack problem} \autocite[13--67]{silvano-1990-knapsack}. A commonly used knapsack problem} \autocite[13--67]{silvano-1990-knapsack}. A commonly used
solution to this problem is based on dynamic programming. An implementation of solution to this problem is based on dynamic programming. An implementation of
this approach is shown in \cref{lst:2-dyn-knapsack}. The use of dynamic this approach is shown in \cref{lst:2-dyn-knapsack}. The use of dynamic
@ -74,36 +74,41 @@ the model.
The following set of equations describe this knapsack problem as a \gls{cop}: The following set of equations describe this knapsack problem as a \gls{cop}:
\begin{equation} \begin{equation}
\text{maximise} z \text{subject to} \text{maximise}~z~\text{subject to}~
\begin{cases} \begin{cases}
S \subset toys S \subseteq T \\
z = \sum_{i \in S} joy(i) \\ z = \sum_{i \in S} joy(i) \\
\sum_{i \in S} space(i) < C \sum_{i \in S} space(i) < C \\
\end{cases} \end{cases}
\end{equation} \end{equation}
In these equations \(S\) is set \gls{variable}. It contains the selection of In these equations \(S\) is set \gls{variable}. It contains the selection of
toys that will be packed for the trip. The \(joy\) and \(space\) functions are toys that will be packed for the trip. \(z\) is the objective \gls{variable}
\glspl{parameter} used to map toys to a value depicting the amount of that is maximised to find the optimal selections of toys to pack. The
enjoyment and space required respectively. \(C\) is the \gls{parameter} that \gls{parameter} \(T\) is the set of all the toys. The \(joy\) and \(space\)
depicts the total space that is left in the car before packing the toys. functions are \glspl{parameter} used to map toys, \( t \in T\), to a value
Finally, \(z\) is the objective \gls{variable} that is maximised to find the depicting the amount of enjoyment and space required respectively. Finally,
optimal selections of toys to pack. the \gls{parameter} \(C\) is that depicts the total space that is left in the
car before packing the toys.
This constraint model gives a concise definition of the problem that would be This constraint model gives a abstract mathematical definition of the
easy to adjust to changes in the requirements. \gls{cop} that would be easy to adjust to changes in the requirements. To
solve instances of this problem, however, these instances have to be
transformed into input accepted by a \gls{solver}. \cmls\ are designed to
allow the modeller to express combinatorial problems in a similar fashion to
the above mathematical definition and generate a definition that can be used
by dedicated solvers.
\end{example} \end{example}
In the remainder of this chapter we will first, in \cref{sec:back-minizinc} In the remainder of this chapter we will first, in \cref{sec:back-minizinc}
introduce \minizinc\ as the leading \cml\ used within this thesis. introduce \minizinc\ as the leading \cml\ used within this thesis.
\cref{sec:back-mzn-interpreter} explains the process that the current \minizinc\ \cref{sec:back-mzn-interpreter} explains the process that the current \minizinc\
interpreter uses to translate a \minizinc\ model into a solver-level constraint interpreter uses to translate a \minizinc\ model into a solver-level constraint
model. Then, \cref{sec:back-other-languages} introduces alternative \cmls\ and model. Then, \cref{sec:back-other-languages} introduces alternative \cmls\ and
compares their functionality to \minizinc{}. Finally, \cref{sec:back-term} and compares their functionality to \minizinc{}. Finally, \cref{sec:back-term} and
\cref{sec:back} survey the closely related fields of \cref{sec:back-clp} survey the closely related fields of \gls{term-rewriting}
and \gls{clp}.
\section{\glsentrytext{minizinc}}% \section{\glsentrytext{minizinc}}%
\label{sec:back-minizinc} \label{sec:back-minizinc}