\noindent{}In previous chapters we explored \gls{rewriting} as a definitive linear process, but to solve real-world problems \gls{meta-optimization} algorithms are often used.
These algorithms usually require solving similar problems repeatedly, with only slight modifications, thousands of times.
Examples of these methods are:

\begin{itemize}
	\item Multi-objective search \autocite{jones-2002-multi-objective}.
		Optimising multiple objectives is often not supported directly in solvers.
		Instead, it can be solved using a \gls{meta-optimization} approach: find a solution to a (single-objective) problem, then add more \constraints{} to the original problem and repeat.
	\item \gls{lns} \autocite{shaw-1998-local-search}.
		This is a very successful \gls{meta-optimization} algorithm to quickly improve solution quality.
		After finding a (sub-optimal) solution to a problem, \constraints{} are added to restrict the search in the \gls{neighbourhood} of that \gls{sol}.
		When a new \gls{sol} is found, the \constraints{} are removed, and \constraints{} for a new \gls{neighbourhood} are added.
	\item Online Optimisation \autocite{jaillet-2021-online}.
		These techniques can be employed when the problem rapidly changes.
		An \instance{} is continuously updated with new data, such as newly available jobs to be scheduled or customer requests to be processed.
	\item Diverse Solution Search \autocite{hebrard-2005-diverse}.
		Here we aim to provide a set of solutions that are sufficiently different from each other in order to give human decision makers an overview of the possible \glspl{sol}.
		Diversity can be achieved by repeatedly solving a problem instance with different \glspl{objective}.
	\item Interactive Optimisation \autocite{belin-2014-interactive}.
		In some scenarios it can be useful to allow a user to directly provide feedback on \gls{sol} found by the \solver{}.
		The feedback in the form of \constraint{} are added back into the problem, and a new \gls{sol} is generated.
		Users may also take back some earlier feedback and explore different aspects of the problem to arrive at the best \gls{sol} that suits their needs.
\end{itemize}

All of these examples have in common that a \instance{} is solved, new \constraints{} are added, the resulting \instance{} is solved again, and the \constraints{} may be removed again.

The usage of these algorithms is not new to \cmls{} and they have proven to be very useful \autocite{schrijvers-2013-combinators, rendl-2015-minisearch, schiendorfer-2018-minibrass, ek-2020-online, ingmar-2020-diverse}.
In its most basic form, a simple scripting language is sufficient to implement these algorithms, by repeatedly \gls{rewriting} and solving the adjusted \instances{}.
While improvements of the \gls{rewriting} process, such as the ones discussed in previous chapters, can increase the performance of these approaches, the overhead of rewriting an almost identical model may still prove prohibitive.
It warrants direct support from the \cml{} architecture.
In this chapter we introduce two methods to provide this support:

\begin{itemize}
	\item We introduce the notion of \gls{rbmo} algorithms.
		Using a minimal extension to a \cml{} and its target \solver{}, we can model \gls{meta-optimization} methods and rewrite them into efficient \glspl{slv-mod}.
		The \solver{} will then incrementally execute the methods through the use of \solver{} \glspl{restart}
		This method avoids the need of repeatedly \gls{rewriting} the \instance{} all together.
	\item Alternatively, we extend our architecture with an incremental interface for adding and removing \constraints{}.
		Although this method does not avoid repeatedly \gls{rewriting} the \instance{}, it uses \gls{incremental-rewriting} to reduce the \gls{rewriting} to the changes to the \instance{}.
		This approach can be used when an incremental method cannot be described using \gls{rbmo} or when the required extensions are not available for the target \solver{}.
\end{itemize}

The rest of the chapter is organised as follows.
\Cref{sec:inc-modelling} discusses the declarative modelling of \gls{rbmo} methods in a \cml{}.
\Cref{sec:inc-solver-extension} introduces the method to rewrite these \gls{meta-optimization} definitions into efficient \glspl{slv-mod} and the minimal extension required from the target \gls{solver}.
\Cref{sec:inc-incremental-compilation} introduces the alternative method that extends our architecture with an incremental \constraint{} modelling interface.
\Cref{sec:inc-experiments} reports on the experimental results of both approaches.

