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},
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},
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
\gls{objective} \(z\). In this case the goal is to find an solution that
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.
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
(which one would quickly realise trying to pack a car \(2^{|\text{toys}|}\)
different ways).
time intensive and quickly grows with the number of toys considered (which one
would quickly realise trying to pack a car \(2^{|\text{toys}|}\) different
ways).
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
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
@ -74,36 +74,41 @@ the model.
The following set of equations describe this knapsack problem as a \gls{cop}:
\begin{equation}
\text{maximise} z \text{subject to}
\text{maximise}~z~\text{subject to}~
\begin{cases}
S \subset toys
S \subseteq T \\
z = \sum_{i \in S} joy(i) \\
\sum_{i \in S} space(i) < C
\sum_{i \in S} space(i) < C \\
\end{cases}
\end{equation}
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
\glspl{parameter} used to map toys to a value depicting the amount of
enjoyment and space required respectively. \(C\) is the \gls{parameter} that
depicts the total space that is left in the car before packing the toys.
Finally, \(z\) is the objective \gls{variable} that is maximised to find the
optimal selections of toys to pack.
toys that will be packed for the trip. \(z\) is the objective \gls{variable}
that is maximised to find the optimal selections of toys to pack. The
\gls{parameter} \(T\) is the set of all the toys. The \(joy\) and \(space\)
functions are \glspl{parameter} used to map toys, \( t \in T\), to a value
depicting the amount of enjoyment and space required respectively. Finally,
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
easy to adjust to changes in the requirements.
This constraint model gives a abstract mathematical definition of the
\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}
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
\cref{sec:back-clp} survey the closely related fields of \gls{term-rewriting}
and \gls{clp}.
\section{\glsentrytext{minizinc}}%
\label{sec:back-minizinc}