\section{Introduction}

Recent progress of storage media
has been creating interests on coding techniques to ensure reliability of the media and
to lengthen the life of storage media.
Write-Once-Memory (WOM) codes are getting renewed interests as one of promising
coding techniques for storage media.
In the scenario of the binary WOM codes,
the binary WOM storage (or channel) is assumed as follows.
A storage cell has two states 0 or 1 and the initial state is 0. If a cell changes its state to 1,
then it cannot be reset to 0 any more.
Punch cards and optical disks are examples of the binary WOM storages.
The celebrated work by Rivest and Shamir in 1982 \cite{first-wom}
presented the first binary WOM codes and their codes induced subsequent active researches
in the field of the binary WOM codes \cite{cohen} \cite{fiat} \cite{slc}.

A memory cell in recent flash memories has multiple levels such as 4 or 8 levels
and the number of levels are expected to be increased further in the near future.
This trend has produced motivation to the research activities on the non-binary WOM codes that
are closely related to the multilevel flash memories \cite{non-binary} \cite{yakkobi} \cite{q} \cite{brian}.

There are two threads of researches on the non-binary WOM codes.
The first one is {\em variable rate codes} and the other is {\em fixed rate codes}.

The variable rate codes are the non-binary WOM codes such that
message alphabets used in a sequence of writing processes are not necessarily identical.
This means that writing rate can vary at each writing attempt.
Fu and Vinck \cite{fu} proved the channel capacity of the variable rate non-binary WOM codes.
Recently, Shpilka \cite{shpilka} proposed a capacity achieving construction of non binary WOM codes.
Moreover, Gabrys et al. \cite{non-binary} presented a construction
of the non-binary WOM codes based on known efficient binary-WOM codes.

Although the variable rate codes are efficient because they can fully utilize the potential of a WOM storage,
fixed-rate codes that have a fixed message alphabet is more suitable for practical implementation into storage devices.
This is because a fixed amount of binary information is commonly sent from the master system to the storage.
Kurkoski   \cite{brian} proposed a construction of fixed rate WOM codes using two dimensional lattices.
Bhatia et al. \cite{lattice-wom} showed a construction of non-binary WOM codes
that relies on the lattice continuous approximation.
Cassuto and Yaakobi \cite{q} proposed a construction of fixed rate non-binary WOM codes using lattice tiling.

Recently, fixed rate WOM code for reducing Inter-Cell Interference (ICI) is proposed by Hemo and Cassuto \cite{ici-q}.
It is known that ICI causes drift of the threshold voltage of a flash cell according to the voltages of adjacent flash cells \cite{ici-q}.
The drift of threshold voltage degrades the reliability of the flash cell and it should be avoided.
One promising approach to reduce ICI is to use an appropriate constraint coding to avoid certain patterns incurring large ICI.
The WOM codes presented in \cite{ici-q} not only have large $t^*$ but also satisfy certain ICI reducing constraints.

In the case of fixed rate codes, systematic constructions for efficient non-binary WOM codes
are still open to be studied.
Especially, perusing optimal codes with practical parameters
is an important subject for further studies.
Furthermore, it is desirable to develop a construction of fixed rate WOM codes that have wide range of
applicability; this means that a new construction should be applicable to wide classes of
WOM devises such as WOM devices with ICI constraint as well.

In this paper, we propose a novel construction of fixed rate non-binary WOM codes.
The target of storage media is modeled by a memory device with restricted state transitions,
i.e.,  a state of the memory can change to another state according to a given state transition graph.
The model is fairly general and it includes a common model of multilevel flash memories.
The proposed construction has two notable features.
First, it possesses a systematic method to determine the sets called the encoding regions that
are required for encoding processes.
This is a critical difference between ours and the prior work using lattice tiling \cite{q} and \cite{ici-q}.
Second, the proposed construction determines an encode table used for encoding
by integer programming.

\section{Preliminaries}

In this section, we first introduce several basic definitions and
notation used throughout the paper.

\begin{figure}[b]
\begin{center}
\includegraphics[width = 0.45\textwidth]{./figure/dag-message-1.eps}
\caption{
A state transition graph (left) and an example of encoding regions $(k=3)$ and a message function (right).
The numbers written in the nodes represent the indices of nodes.
The encoding regions $\omega(1) = \{1,2,3\}, \omega(2) = \{2,4,6\}$ are indicated by the dashed boxes (right).
The encoding regions are $\omega(x) = \emptyset$ for $x \in \{3,4,5,6\}$.
In the right figure,  the values of the message function are expressed as follows:
The values 1, 2, and 3 are represented by a circle, a triangle, and a square, respectively.
For any message $m \in \{1,2,3\}$,
both encoding regions $\omega(1)$ and $\omega(2)$ contain the node corresponding to $m$.
}
\label{fig:dm}
\end{center}
\end{figure}

\subsection{Basic notation}

Let $G \triangleq (V,E)$ be a directed graph
where $V = \{1,2,\ldots,|V|\}$ is the set of vertices and $E \subseteq V \times V$ is the set of edges.
If there does not exist a directed edge or a path from a vertex to itself,
then the graph $G$ is said to be a directed acyclic graph, abbreviated as DAG.
A DAG is used as a {\em state transition graph} in this paper.
The left figure in Fig.~\ref{fig:dm} is an example of DAG.
We express the DAG as $G = (V,E,r)$.
The symbol $r$ represents the root of DAG.
If for any node $s,s' \in V,(s \neq s')$ there exists the directed edge or path from $s$ to $s'$,
we denote $s \preceq s'$.
In this case, we say that $s'$ is {\em reachable} from $s$.

Assume that DAG $G \triangleq (V,E,r)$.
A WOM device $D$ associated with the graph $G$ can store any $v \in V$ as its state.
The initial state of $D$ is assumed to be $r$.
We can change the state of $D$ from $s \in V$ to $s' \in V$,
if there exists a directed edge or a path from $s \in V$ to $s' \in V$.

The message alphabet to be written in $D$ is denoted by $\mathcal{M} \triangleq \{1,2,\ldots,M\}$.
In our scenario, we want to write several messages in $\mathcal{M}$ into $D$.
Namely, a sequence of messages is sequentially written in $D$.
When we write a message $m \in \mathcal{M}$,
we must change the state of $D$.
After that,
we get a written message $m$ in $D$ by reading the state of $D$.

\subsection{Encoding function and decoding function}

In this paper, we assume that an encoder has a unit memory
to keep a previous input message,
and that a corresponding decoder has no memory.

In order to write input messages into the WOM device $D$, we need an encoding function.
The definition of the encoding function is given as follows.

\begin{definition}\label{defi:enco}
Assume that a function
\[
\mathcal{E}: V \times \mathcal{M} \rightarrow V \cup \{ {\sf fail} \}
\]
is given.
The symbol {\sf fail} represents a failure of an encoding process.
If for any $s \in V$ and $m \in \mathcal{M}$,
$
s \preceq \mathcal{E}(s,m)
$
or
$
\mathcal{E}(s,m) = {\sf fail},
$
then the function $\mathcal{E}$ is called an {\em encoding function}.
\end{definition}

The following definition on the decoding function
is used to retrieve the message $m \in \mathcal{M}$ from $D$.

\begin{definition}\label{defi:deco}
Assume that a function $\mathcal{D}: V \rightarrow \mathcal{M}$ is given.
If for any $m \in \mathcal{M}$ and $s \in V$, the consistency condition
\begin{equation} \label{consistency}
\mathcal{D}(\mathcal{E}(s,m)) = m
\end{equation}
is satisfied,
then the function $\mathcal{D}$ is called a {\em decoding function}.
\end{definition}

Assume that a sequence of input messages $m_1,m_2,\ldots \in \mathcal{M}$
are sequentially encoded.
We also assume that the initial node is $s_0 = r$.
The encoder encodes the incoming message $m_i$ by
\begin{equation}
s_i = \mathcal{E}(s_{i-1}, m_i)
\end{equation}
for $i = 0, 1, \ldots$.
The output of the encoder, $s_i$, is then written into $D$ as the
next node, i.e., next state.

The following definition gives the worst number of consecutive writes to $D$
for a pair of encoding and decoding functions $(\mathcal{E},\mathcal{D})$.
\begin{definition}{}
Assume that a sequence of messages of length $t$, $(m_1,m_2,\ldots, m_t) \in \mathcal{M}^t$, is given.
Let $(s_1,s_2,\ldots, s_t)$ be the state sequence defined by $s_i = \mathcal{E}(s_{i-1}, m_i)$
under the assumption $s_0=r$.
If for any $i \in [1,t]$, $s_i \ne {\sf fail}$, then
the pair $(\mathcal{E},\mathcal{D})$ is said to be $t$ writes achievable.
The {\em worst number of writes} $t^*$ is defined by
\begin{equation}
t^* \triangleq \max \{t \mid  (\mathcal{E}, \mathcal{D}) \mbox{ is $t$-times achivable} \}.
\end{equation}
\end{definition}

In other words, the pair $(\mathcal{E},\mathcal{D})$ ensures consecutive $t^*$ writes of fixed size messages in the worst case.
Of course,  in terms of efficient use of the device $D$,  we should design $(\mathcal{E},\mathcal{D})$ to maximize $t^*$.

\section{Realization of encoding function}

In this section,
we prepare basic definitions required for precise description
of our encoding algorithm used in the encoding function.

\subsection{Notation}

The {\em reachable region} $R(s) (s \in V)$ is
the set of the all nodes to which a node can change from $s$.
The precise definition is given as follows.
\begin{definition}\label{defi:reachable}
The reachable region $R(s) (s \in V)$ is defined as
\begin{equation}
R(s) \triangleq \{ x \in V | s \preceq x \}.
\end{equation}
\end{definition}

Encoding regions and a message function defined below play a critical role in an encoding process.

\begin{definition}{}\label{defi:patition}
Assume that a family of subsets in $V$,
\[
\{\omega(s) \} \triangleq\{\omega(1), \omega(2), \ldots, \omega(|V|) \},
\]

is given.
Let $k$ be a positive integer satisfying $|\mathcal{M}| \le k$.
If the family satisfies the following two conditions:
\begin{enumerate}
\item $\forall s \in V, \   \omega(s) \subseteq R(s)$
\item $\forall s \in V, \   |\omega(s)| = k$ or  $\omega(s) = \emptyset$,
\end{enumerate}
then the family $\{\omega(s) \}$ is said to be the {\em encoding regions}.
\end{definition}

A message function defined below is used to retrieve a message.
\begin{definition}{}\label{defi:g}
Assume that a family of encoding regions $\{\omega(s)\} $ is given.
Let $g$ be a function:
 \[
 g: \bigcup_{s \in V} \omega(s)  \rightarrow \mathcal{M}.
 \]
If for any $m \in \mathcal{M}$
and for any $s \in \{x \in V \mid  \omega(x) \ne \emptyset \}$,  there exists $a \in \omega(s)$ satisfying
\[
g(a) = m,
\]
then the function $g$ is called a {\em message function} corresponding to the family of encoding regions $\{\omega(s) \}$.
\end{definition}

We can consider the message function as the labels attached to the nodes.
In following encoding and decoding processes, the label, i.e., the value of the message function corresponds to the message associated with the node.
This definition implies that we can find arbitrary message $m \in \mathcal{M}$ in arbitrary encoding region $\omega(s)$ $(s \in \{ x \in V \mid \omega(x) \ne \emptyset \})$.
An example of encoding regions and a message function is shown in the right-hand of Fig.~\ref{fig:dm}.

We use the above definitions of the encoding regions and the message function to encode given messages.
In order to write a sequence of messages, we must connect several nonempty encoding regions to make {\em layers}.
We here define frontiers and layers as follows.
\begin{definition}{}\label{defi:ft}
For a subset of nodes $X \subseteq V$,
the {\em frontier} of $X$, $F(X)$,  is defined by
\begin{equation}
F(X) \triangleq \{x \in X \mid R(x) \cap X = \{x\} \}.
\end{equation}
\end{definition}
If $x \notin F(X)$ is hold for $x \in X$, then there exists $y \in F(X)$
which is reachable from $x$, i.e., $x \preceq y$.

A layer consists of a union set of encoding regions.
\begin{definition} \label{defi:bset}
Assume that a family of encoding regions $\{\omega(s) \}$ is given.
The {\em layer} $\mathcal{L}_i$ is recursively defined by
\begin{equation}
\mathcal{L}_i \triangleq \bigcup_{x \in F(\mathcal{L}_{i-1})}\omega(x),\quad\mathcal{L}_0 = \{r\}.
\end{equation}
$r$ represents the root of DAG.
\end{definition}

\begin{definition}
Assume that for  integer $i \ge 0$, $\mathcal{L}_i \subset V$ is given.
The {\em start point set} $V^*$ is defined by
\begin{equation}
V^* \triangleq \bigcup_{i \ge 0} F(\mathcal{L}_i).
\end{equation}
\end{definition}

Figure \ref{fig:fe} shows an example of frontiers and layers.

\begin{figure}[tb]
\begin{center}
\includegraphics[width = 0.4\textwidth]{./figure/enal.eps}
\caption{
An example of frontiers and  layers.
The dashed boxes represent the encoding regions $\omega(1) = \{ 1,2,3\}, \omega(2) = \{2,4,6\}, \omega(3) = \{3,4,5\}$.
The encoding regions $\omega(4), \omega(5), \omega(6)$ are empty sets.
The layers are $\mathcal{L}_0 = \{1\}, \mathcal{L}_1 = \omega(1), \mathcal{L}_2 = \omega(2) \bigcup \omega(3)$.
The frontier for each layer is depicted as filled circles: $F(\mathcal{L}_1) = \{2,3\}, F(\mathcal{L}_2) = \{ 6\}$.
The start point set is
$V^* = F(\mathcal{L}_0) \bigcup F(\mathcal{L}_1) \bigcup F(\mathcal{L}_2) = \{1,2,3,6\}$.
In the right figure,  the values of the message function are expressed as follows:
The values 1, 2, and 3 are represented by a circle, a triangle, and a square, respectively. }
\label{fig:fe}
\end{center}
\end{figure}

\subsection{Encoding algorithm}

In this subsection, we explain the encoding algorithm to realize an encoding function.
The algorithm presented here is similar to the algorithm presented in the reference \cite{q}.
The encoding algorithm is shown in Algorithm \ref{alg1}.

\begin{algorithm}[tb]
\caption{Encoding algorithm}
\label{alg1}
\begin{algorithmic}[1]
\STATE input: $s \in V$ (current state)
\STATE input: $m \in \mathcal{M}$ (message)
\STATE output: $s'  = \mathcal{E}(s,m)$ (next state, or ${\sf fail}$)
\STATE $d:= \min [\{ x \in V \mid s \in \omega(x) \} \cup \{\infty\}] $
\IF {$\omega(d) = \emptyset$ or $d = \infty$}
\STATE{output ${\sf fail}$ and quit.}
\ENDIF
\STATE $y := \min \{x \in \omega(d) \mid g(x)=m\}$
\IF  {$s \preceq y$}
\STATE {$s' := y$}
\ELSE
\STATE $i =  \min\{i' | s \in \mathcal{L}_{i'} \}$
\STATE $d := \min [\{x \in F(\mathcal{L}_i)  \mid  s \preceq x\}  \cup \{\infty\} ]$
\STATE Go to line 5．
\ENDIF
\STATE output $s'$ and quit.
\end{algorithmic}
\end{algorithm}

Suppose that we have the two inputs, a state $s$ which represents the current node in the state transition graph, and a message $m$.
The main job of this encoding algorithm is
to find $y \in \omega(d)$ satisfying $g(y) = m$ for a given message $m$.
The encoding region  $\omega(d)$ can be considered as the current
{\em encoding window} in which the candidate of the next state
is found.  The variable $d$ is called
a {\em start point} of the encoding window.
If such $y$ can be written in $D$ or is reachable from $s$ (i.e., $s \preceq y$),
then the next state is set to $s' := y$ in line 10 of Algorithm \ref{alg1}.
Otherwise, the current encoding window should move to another encoding
region in the next layer (line 13).
The new start point  $z$ is chosen in the frontier $F(\mathcal{L}_i)$
and $d$ is updated as $d := z$.
\footnote{It is clear that,  for any $x \in \omega(d)$ ($\omega(d)$ is the current encoding window),
there exists $z \in F(\mathcal{L}_i)$ satisfying $x \preceq z$.}
The layer index $i$ is the minimum index satisfying $s \in \mathcal{L}_i$.

The decoding function associated with the encoding function $\mathcal{E}$ realized by Algorithm \ref{alg1}
is given by
\[
\mathcal{D}(x) = g(x).
\]
From the definition of the message function and the procedure of Algorithm  \ref{alg1},
it is evident that this function satisfies the consistency conditions.

We here explain an example of an encoding process
by using the state transition graph presented in Fig.~\ref{fig:fe}.
Assume that an input message sequence $(m_1, m_2) = (2,3)$ is given.
In the beginning of an encoding process, the current state is
initialized as $s = 1$.
Since the initial message is $m_1 = 2$,   the pair $(s = 1, m = 2)$ is firstly
given to Algorithm \ref{alg1}.

In this case, we have $d = 1$ in line 4.
Since $g(3) = 2$ is satisfied in $\omega(1)$ in line 8,
the candidate of the next state $y = 3$ is obtained.
Because $s = 1 \preceq y = 3$ holds, we obtain $s' = y = 3$ in line 10.
The encoding process outputs $s' =3$ and then quits the process.

Let us consider the second encoding process for $m_2 = 3$.
We start a new encoding process with inputs $(s = 3, m = 3)$.
From line 4, we have $d=1$. This means that we set the encoding window to $\omega(1)$.
In this case, the encoder finds $g(2) = 3$ and lets $y = 2$.
However, the  condition $s=3 \preceq y = 2$ is not satisfied, i.e., $y = 2$ cannot be
the next state because the node cannot change from $3$ to $2$.
In order to find the next state, we need to change the encoding window.
From line 13, the new start point of the encoding window $d = 3$ is
chosen from the frontier as $d = \min [\{x \in F(\mathcal{L}_1) \mid s \preceq x\}] = 3$.
This operation means that we change  the encoding window from $\omega(1)$ to $\omega(3)$.
From the new encoding window $\omega(3)$, we can find $x = 5$ satisfying $g(5) = 3$.
Because $s = 3 \preceq y = 5$ holds (i.e., $y=5$ is reachable from $ s = 3 $),  we finally have the next state $s' = 5$.

\section{Construction of WOM codes}

The performance and efficiency of the WOM codes realized by the encoding and decoding functions
described in the previous section depend on the choice of the encoding regions.
In this section, we propose a method  to create a family of the encoding regions
and a method to determine labels of nodes, i.e,  the message function by using integer programming.

\subsection{Greedy rule for constructing a family of encoding regions} \label{seq:region}
In this subsection, we propose a method for creating a family of the encoding regions
based on a greedy rule.
The proposed WOM codes described later exploit a family of
the encoding regions defined based on the following sets.

\begin{figure}[tb]
\begin{center}
\includegraphics[width = 0.5\textwidth]{./figure/flow-encoding-region.eps}
\caption{An example of a process of the greedy construction of the encoding region for $s$,
whose size is $k=3$.
The dashed box in the leftmost figure indicates the reachable region $R(s)$.
In the middle of the figure,
the numbers of reachable nodes for each elements in $R(s)$ are presented.
We then select top 3 nodes in terms of the number of reachable nodes
as an encoding region.
In the rightmost figure,
the dashed box represents the encoding region $\Omega(s)$
constructed by the greedy process.
} \label{fig:pro-en}
\end{center}
\end{figure}

\begin{definition} \label{defi:Omega}
Assume that an integer $k(M \le k)$ is given.
Let us denote the elements in the reachable region $R(s)$ by $r_1,r_2,\ldots,r_{|R(s)|} (s \in V)$
where the index of $r_i$ satisfies
\begin{equation}
|R(r_1)| \ge |R(r_2)| \ge \cdots  \ge |R(r_{|R(s)| })|.  \label{eq:order}
\end{equation}
The set $\Omega(s)$ is defined by
\begin{equation}
\label{eq:omega}
\Omega(s) \triangleq
\left\{
\begin{array}{ll}
\{ r_{1}, r_{2}, \ldots, r_{k} \}, & |R(s)| \ge k, \\
\emptyset, & |R(s)| < k.\\
\end{array}
\right.
\end{equation}
\end{definition}
In the above definition, a tie break rule is not explicitly stated.
If $|R(r_{a})| = |R(r_{b})|$ holds, we will randomly choose $r_{a}$ or $r_{b}$ to break a tie.
Figure \ref{fig:pro-en} shows an example of a greedy process for generating an encoding region.

The underlying idea in the greedy process is simply
to enlarge future writing possibilities.
The set $\Omega(s)$ is determined by a greedy manner
in terms of the size of reachable regions.
In other words, we want to postpone a state transition
to a state with the smaller reachable region as late as possible.
This is because such a transition would lead to a smaller number of writes.

In the following part of this paper, we will use the encoding regions defined by
\begin{equation}
\omega(s) \triangleq
\left\{
\begin{array}{ll}
\Omega(s), & s \in V^*, \\
\emptyset, & s \notin V^*.
\end{array}
\right.
\end{equation}

\subsection{Message labeling}\label{seq:ip}

In the previous subsection, we saw how to determine the family of the encoding regions.
The remaining task  is to find
appropriate message labels of nodes. Namely,  we must find an appropriate
message function satisfying the required constraint described in Definition \ref{defi:g}.
In this subsection, we will propose a method to find a message function based on integer programming.

The solution of the following integer linear programming problem provides a message function.
\begin{definition} \label{defi:ip}
Assume that  a family of the encoding regions
$\{\omega(s)\}$ is given.
Let $x^*_{j,\ell}, y^*_\ell \in \{0,1\} (j \in \Gamma, \ell \in [1,k])$
be a set of value assignments of an optimal solution
of the following integer problem:
\begin{eqnarray}
&&{\rm Maximize} \ \sum_{\ell \in [1,k]} y_\ell \\ \nonumber
&&{\rm Subject\ to}  \\
&& \forall  i \in V^*,   \forall  \ell \in [1,k],\quad  \sum_{j \in \omega(i)} x_{j,\ell} \ge y_{\ell},  \\  \label{eq:xy}
&& \forall j \in \Gamma,\quad \sum_{\ell \in  [1,k]} x_{j,\ell} = 1,\\
&& \forall j \in \Gamma, \forall  \ell \in [1,k],  \quad  x_{j,\ell} \le y_{\ell}, \\
&& \forall j \in \Gamma, \forall  \ell \in [1,k],\quad x_{j,\ell} ,y_{\ell} \in \{0,1 \},
\end{eqnarray}
where $\Gamma \triangleq \bigcup_{i \ge 0} \mathcal{L}_i$.
The maximum value of the objective function is denoted by $M^*$.
\end{definition}
The symbol $z^*_j (j \in \Gamma)$ represents
\begin{equation}
z^*_j  \triangleq \arg \max_{\ell \in [1,k]}  \mathbb{I} [x^*_{j, \ell} = 1],
\end{equation}
where the indicator function $\mathbb{I}[condition]$ takes the value one if $condition$ is true;
otherwise it takes the value zero. If we regard $z^*_j$ as a color put on the node $j$,  the above IP problem
can be considered as an IP problem for a coloring problem. In our case, the coloring constraint is as follows:
for every node $s$ (i.e., state) in $V^*$, the neighbor of $s$ including itself contains $M^*$-colors.
This problem has close relationship to the {\em domatic partition problem}.

In the following arguments,  we set the maximize number of message $M$ equal to $M^*$.
\begin{definition}
Assume that  a function $G: \Gamma \rightarrow \mathcal{M}$
is defined by
$
G(j) \triangleq \alpha(z_j^*),
$
where the mapping $\alpha: A \rightarrow \mathcal{M}$ is an arbitrary bijection.
The set $A$ is defined as
\[
A \triangleq \{\ell \in [1,k] \mid y_\ell^* = 1  \}.
\]
\end{definition}

The following theorem means that the determination of the message function can be done
by solving the above integer programming problem.
\begin{theorem}
The function $G$ is a message function.
\end{theorem}

\begin{proof}
We assume that arbitrary $m \in \mathcal{M}$ and $i \in V^*$ are given.
First, we consider $\tilde{\ell} = \alpha^{-1}(m)$.
From the definition of the set $A$, we have $y_{\tilde \ell}^* = 1$.
The optimal solution satisfies $ \sum_{j \in \omega(i)} x^*_{j, \tilde{\ell} } \ge y_{\tilde \ell}^* = 1$.
Because $x^*_{j, \tilde{\ell} } \in  \{0,1\}$,
there exists $\tilde{j} \in \omega(i)$ satisfying $x^*_{\tilde{j}, \tilde{\ell} } = 1$.
By the definition of the function $G$, the equation
$
 G(\tilde{j}) =  \alpha(\tilde{\ell})  =  \alpha(\alpha^{-1}(m)) = m
$
holds. This satisfies the condition for the message function.
\end{proof}

In the following, we use this message function $G$
in the encoding function (Algorithm 1) and the decoding function.

\subsection{Worst number of writes}
\begin{figure}[tb]
\begin{center}
\includegraphics[width = 0.25\textwidth]{./figure/worst-write.eps}
\caption{
An example of a case where the worst number of writes is 2.
The boxes indicated in the figure is the layers $\mathcal{L}_1, \mathcal{L}_2, \mathcal{L}_3$.
The black nodes represent frontiers of layers $\mathcal{L}_1, \mathcal{L}_2$. The node with index 4 is a frontier whose encoding region
is the empty set.  Since the node with index 4 is included in $\mathcal{L}_2$, we thus have $t^* = 2$.}
\label{fig:wn}
\end{center}
\end{figure}

The worst number of writes $t^*$ provided by
the encoding algorithm with the encoding regions and the message function defined above
is given by
\begin{equation}
t^* = \min\{i > 0 \mid \exists x \in F(\mathcal{L}_i), \ \omega(x) = \emptyset \}.
\end{equation}
This statement appears clear from the definition of the encoding algorithm.
Figure \ref{fig:wn} presents an example for $t^* = 2$.

\section{Numerical results on proposed WOM codes}

In this section, we will construct several classes of  fixed rate WOM codes based on the
proposed construction. We used the IP solver IBM CPLEX for solving the integer programming problem.

\subsection{Multilevel flash memories}

Multilevel flash memories consist of a large number of cells.
Each of cell can store electrons in itself.
It is assumed that the level of a cell can be increased but cannot be decreased.
In this paper, we assume that $n$ cells that can keep $q$ level values from the alphabet $\{0,1,\ldots,q-1\}$.
The state transitions of $q$ level multilevel flash memories of $n$ cells
can be represented by a state transition graph (directed square grid graph) presented in Fig. \ref{fig:flash}.

Figure \ref{fig:flash} presents
the state transition graph for multilevel flash memory $(n = 2, q = 4)$ and
the encoding regions constructed by the proposed method.
In this case, we can always write 5 messages for each write operation and
the worst number of writes is $t^* = 2$ in this case.
\begin{figure}[b]
\begin{center}
\includegraphics[width = 0.45\textwidth]{./figure/flash.eps}
\caption{
The left figure presents the state transition graph for multilevel flash memories $(n = 2, q = 4)$.
The levels of two cells are denoted by $\ell_1$ and $\ell_2$.
The horizontal (resp. vertical) direction means the level of the cell $\ell_1$ (resp. $\ell_2$).
The right figure presents a family of encoding regions and a message function
constructed by the proposed method.
The numbers written in the nodes represent the values of the message function.
Nonempty encoding regions are indicated by the boxes.
For any message $m$ in $\{1,2,3,4,5\}$,
each nonempty encoding regions contains a node corresponding to $m$.
}
\label{fig:flash}
\end{center}
\end{figure}

\begin{table}[b]
\caption{Worst numbers of writes $t^*$ of proposed WOM codes for $q$ level flash memories with $n = 2$ cells.}
\begin{center}
  \begin{tabular}{c|ccccc}
  \hline \label{tab:t-n2}
    $M \backslash q$ & 4 & 5 & 6 & 7 & 8 \\ \hline
    4 & 3 & 4 & 5 & 6 & 7\\
    5 & 2 & 3 & 4 & 5 & 6\\
    6 & 2 & 3 & 3 & 4 & 5\\
    7 & 1 & 2 & 3 & 3 & 4\\
    8 & 1 & 2 & 3 & 3 & 4\\
\hline
  \end{tabular}
\end{center}
\end{table}

\begin{table}[tb]
\begin{center}
\caption{Comparison between $t^*$ of proposed WOM codes and upper bound ($q$ level flash memories)($n=2, M = 8$)}
  \begin{tabular}{c|cccccccc} \hline \label{tab:ub}
     & $q = 4$ & 5 & 6 & 7 & 8 &16 & 32 & 48\\ \hline
    Upper bound & 1 & 2 & 3 & 3 & 4 & 9 & 20 & 31\\
    Proposed & 1 & 2 & 3 & 3 & 4 & 9 & 20 & 31\\
    \hline
  \end{tabular}
\end{center}
\end{table}

\begin{table}[tb]
\begin{center}
\caption{Worst numbers of writes $t^*$ of proposed WOM codes for $q$ level flash memories with $n = 3$ cells.}
  \begin{tabular}{c|ccccc}
  \hline \label{tab:t-n3}
    $M \backslash q$ & 4 & 5 & 6 & 7 & 8 \\ \hline
    4 & 6 & 8 & 10 & 12 & 14\\
    5 & 4 & 5 & 7 & 8 & 10\\
    6 & 4 & 5 & 7 & 8 & 10\\
    7 & 3 & 5 & 6 & 8 & 9\\
    8 & 3 & 4 & 6 & 7 & 8\\
\hline
  \end{tabular}
\end{center}
\end{table}

\begin{table}[tb]
\begin{center}
\caption{Worst numbers of writes $t^*$ of proposed WOM codes for $q$ level flash memories with $n = 4$ cells.}
  \begin{tabular}{c|ccccc}
  \hline \label{tab:t-n4}
    $M \backslash q$ & 4 & 5 & 6 & 7 & 8 \\ \hline
    5 &  7& 9 & 12 & 14 & 17\\
    6 &  5& 7 & 9 & 11 & 13\\
    7 &  5& 7 & 9 & 11 & 13\\
    8 &  5& 7 & 9 & 11 & 13\\
\hline
  \end{tabular}
\end{center}
\end{table}

Table \ref{tab:t-n2} presents the worst numbers of writes $t^*$ of
the proposed WOM codes for multilevel flash memories
for the cases $n = 2$.
When we solved the IP problems,   $k = M$ was assumed.
For example, in the case of $q=8, M=8$, the worst number of writes equals $t^* = 4$.
In \cite{q}, several upper bounds for $t^*$ are presented for WOM codes $(n = 2, q, M, t^*)$.
For $M \ge 8$, the worst numbers of writes are upper bounded as
\begin{equation}
t^* \le \left\lceil \frac{2(q-1)}{3} \right\rceil -1.
\end{equation}
Table \ref{tab:ub} shows
the comparison between this upper bound and the worst numbers of writes of the proposed codes for $n=2, M = 8$.
We can see that the worst numbers of writes of the proposed WOM codes
exactly coincide with the values of the upper bound.
This result can be seen as an evidence of the efficiency of the WOM codes
constructed by the proposed method.

Table \ref{tab:t-n3} shows the result for $n=3$.
In \cite{q},
an $(n=3, q=7, M=7 ,t^*=7)$ WOM code is presented.
According to Table \ref{tab:t-n3}, the proposed WOM code attains $t^* = 8$ which is larger than that of the known code
under the same parameter setting: $n = 3, q = 7, M = 7$.
Table \ref{tab:t-n4} shows the result for $n=4$.
In our experiments, we were able to
construct WOM codes for the range of $M \in \{5,6,7,8\}$ and $q \in \{4,5,6,7,8\}$ with reasonable computation time.

\subsection{WOM codes with constraints for reducing ICI}

In the current rapid grow of the cell density of NAND flash memories,
the ICI is getting to be one of hardest obstacles
for narrowing cell sizes.
The paper \cite{ici-q} showed several excellent fixed rate WOM codes with constraints for reducing ICI.
Their codes incorporate a constraint that keeps balance  of the charge levels of adjacent cells.
It is expected that such constraints promote a reduction on the ICI effect and leads to realizing more reliable memories.
In this subsection, we will apply our construction to WOM codes with constraints for reducing ICI.

Assume that we have flash memory cells $c_1, c_2, \ldots, c_n$.
The current level for each cell is denoted by $\ell_i$.
The following definition gives the $d$ imbalance constraint for reducing ICI.
\begin{definition}\label{defi:imb}
Let $d$ be a positive integer smaller than $n$.
For any write sequence, if each cells $c_i (1 \le i \le n)$ satisfies
\begin{equation}
\max_{i,j,\  i \neq j} | \ell_i - \ell_j | \le d,
\end{equation}
then we say that  the cell block satisfies {\em the $d$ imbalance constraint}.
\end{definition}
In other words,  if the cells satisfy the $d$ imbalance constraint, then the level difference between a pair of adjacent cells is limited to $d$.
It is known that a large level difference of adjacent cells tends to induce ICI. The $d$ imbalance constraint is thus helpful to reduce ICI \cite{ici-q}.

Figure.~\ref{fig:flash-ici} presents state transition graphs for 4 level flash memories of two cells $(n=2)$
with the $d$ imbalance constraint $(d = 1,2)$. From this figure,  at any state (or node),  the difference of level between $c_1$ and $c_2$
are always limited to $d (=1,2)$.
\begin{figure}[tb]
\begin{center}
\includegraphics[width = 0.47\textwidth]{./figure/ici-1.eps}
\caption{
This figure presents a state transition diagram of
$q=4$ level flash memories of two cells $(n=2)$ satisfying
$d$ imbalance constraints (left: $d=1$, right: $d=2$).
The levels of two cells are denoted by $\ell_1$ and $\ell_2$.
The horizontal (resp. vertical) direction means the level of the cell $\ell_1$ (resp. $\ell_2$).
}
\label{fig:flash-ici}
\end{center}
\end{figure}

It is straightforward to apply our code construction to the case of the WOM codes with $d$-imbalance constraint.
Figure \ref{fig:flash-ici-construct} presents a family of encoding functions and values of a message function constructed by the
proposed method. This example shows universality of the proposed construction, i.e., it can be applied to any state transition graph.

\begin{figure}[tb]
\begin{center}
\includegraphics[width = 0.2\textwidth]{./figure/ici-construct-2.eps}
\caption{
This state transition graph corresponds to
$q=4$ level flash memories of two cells $(n=2)$ satisfying $d=2$ imbalance constraint.
The values in the circles represent the values of the message function.
Nonempty encoding regions are indicated by the boxes.}

\label{fig:flash-ici-construct}
\end{center}
\end{figure}

Table \ref{tab:ici-ub} shows the comparison between
upper bound presented in \cite{ici-q}
and the worst numbers of writes of the proposed codes $(n=2, M=8, d=3)$.
For $M = 8$, the worst numbers of writes of the WOM codes with the $d=3$ imbalance constraint
are upper bounded by
\begin{equation}
t^* \le \left\lfloor \frac{3(q-1)}{5} \right\rfloor.
\end{equation}
We can see that the worst numbers of writes of the proposed WOM codes
exactly coincide with the values of the upper bound.

Tables  \ref{tab:ici-n3} and \ref{tab:ici-n4} present the worst numbers of writes $t^*$ of the proposed WOM codes with the $d$ imbalance constraint $(n = 3,4)$.
The paper  \cite{ici-q} only deals with the case of two cells $(n=2)$.
It is not trivial to construct WOM codes ($n=3, n=4$) with the $d$ imbalance constraint by using the construction given in \cite{ici-q} but
our construction is directly applicable even for such cases.

\begin{table}[tb]
\begin{center}
\caption{Comparison between $t^*$ of proposed WOM codes with the $d$ imbalance constraint and upper bound ($n=2, M = 8, d=3$)}
\label{tab:ici-ub}
  \begin{tabular}{c|cccccccc} \hline
     & $q = 4$ & 5 & 6 & 7 & 8 &16 & 32 & 48\\ \hline
    Upper bound & 1 & 2 & 3 & 3 & 4 & 9 & 18 & 28\\
    Proposed & 1 & 2 & 3 & 3 & 4 & 9 & 18 & 28\\
    \hline
  \end{tabular}
\end{center}
\end{table}

\begin{table}[tb]
\begin{center}
\caption{Worst numbers of writes $t^*$ of proposed WOM codes with the $d$ imbalance constraint
$(n = 3)$}
  \begin{tabular}{c|cc|cc}
  \hline \label{tab:ici-n3}
     & \multicolumn{2}{c|}{$d = 2$} & \multicolumn{2}{c}{$d = 3$} \\ \hline
     $M \backslash q$& 4 & 8 & 4 & 8 \\ \hline
    5& 4 & 10 & 4 & 10 \\
    6 & 4 & 9 & 4 & 10 \\
    7 & 3 & 9 & 3 & 9 \\
    8 & 3 & -- & 3 & 8 \\
\hline
  \end{tabular}
\end{center}
\end{table}

\begin{table}[tb]
\begin{center}
\caption{Worst numbers of writes $t^*$ of proposed WOM codes with the $d$ imbalance constraint $(n = 4)$}
  \begin{tabular}{c|cc|cc}
  \hline \label{tab:ici-n4}
     & \multicolumn{2}{c|}{$d = 2$} & \multicolumn{2}{c}{$d = 3$} \\ \hline
     $M \backslash q$& 4 & 8 & 4 & 8 \\ \hline
    5 & 7 & -- & 7 & 17 \\
    6 & 5 & 13 & 5 & 13 \\
    7 & 5 & 13 & 5 & 13 \\
    8 & 5 & 13 & 5 & 13 \\
\hline
  \end{tabular}
\end{center}
\end{table}

\section{Conclusion}

In this paper, we proposed a construction of fixed rate non-binary WOM codes
based on integer programming.
The novel WOM codes with $n=2, M=8$ achieve
the worst numbers of writes $t^*$
that meet the known upper bound in the range $q \in [4,8]$.
We discovered several new efficient WOM codes for $q$ level flash memories when $n = 3, 4$.
For instance, our  $(n=3, q= 7, M = 7, t^* = 8)$ WOM code provides a larger worst number of writes
than that of the known code with the parameters $(n=3, q= 7, M = 7, t^* = 7)$  \cite{q}.
In addition, We constructed several WOM codes with $d$ imbalance constraint for reducing ICI.
Our WOM codes with $n=2, M=8, d=3$ achieve the worst numbers of writes $t^*$
that meet the known upper bound in the range $q \in [4,8]$.
This implies the efficiency of the WOM codes
constructed by our construction.
Another notable advantage of the proposed construction is its flexibility
for handling high dimensional cases.
It is easy to construct for the codes with modestly large $n$
when the integer programming problem can be solved with reasonable time.
The proposed construction can be applied to various storage devices,
to various dimensions (i.e, number of cells),
and various kind of additional constraints.

\section*{Acknowledgment}

This work was supported by JSPS Grant-in-Aid for Scientific Research Grant Number 16K14267.


\section{Introduction}
This paper is concerned with the design of numerical schemes for the one-dimensional Cauchy problem for non-local scalar conservation law of the form
\begin{equation}\label{nl_claw}
\begin{cases}
\rho_t+(f(\rho)V(\rho*\omega_\eta ))_x=0, & x\in \mathbb{R},\quad t>0, \\  %
\rho(x,0)=\rho_0(x) & x\in  \mathbb{R},
\end{cases}
\end{equation}
where the unknown density $\rho$ depends on the space variable $x$ and the time variable $t$, $\rho \to V(\rho)$ is a given velocity function, and  $\rho \to g(\rho) = f(\rho)V(\rho)$ is the usual flux function for the corresponding local scalar conservation law.
Here, (\ref{nl_claw}) is non-local in the sense that the velocity function $V$ is evaluated on a ``neighborhood'' of $x\in\mathbb{R}$ defined by the convolution of the density $\rho$ and a given kernel function $\omega_\eta$ with compact support. In this paper, we are especially interested in two specific forms of (\ref{nl_claw}) which naturally arise in traffic flow modelling \cite{BG_2016, GS_2016} and sedimentation problems \cite{BBKT_2011}. They are given as follows. \\
\ \\
{\it A non-local traffic flow model.} In this context, we follow \cite{BG_2016, GS_2016} and consider (\ref{nl_claw}) as an extension of the classical Lighthill-Whitham-Richards traffic flow model, in which the mean velocity is assumed to be
a non-increasing function of the downstream traffic density and where the flux function is given by
\begin{equation}\label{LWRnl}
f(\rho)=\rho,\quad
V(\rho)= \textcolor{black}{1-\rho}, \quad  (\rho*\omega_\eta)(x,t)=\int_x^{x+\eta}\omega_\eta(y-x)\rho(y,t)dy.
\end{equation}
Four different nonnegative kernel functions will be considered in the numerical section, namely $\omega_\eta(x) = 1/\eta$,
$\omega_\eta(x) = 2(\eta-x)/\eta^2$,
$\omega_\eta(x) = 3(\eta^2-x^2)/(2 \eta^3)$ and \textcolor{black}{$\omega_\eta(x) =  2x/\eta^2$} with support on $[0,\eta]$ for a given value of the real number $\eta>0$. Notice that the well-posedness of this model together with the design of a first and a second order FV approximation have been considered in \cite{BG_2016, GS_2016}. \\
\ \\
{\it A non-local sedimentation model.} Following \cite{BBKT_2011}, we consider under idealized assumptions that equation \eqref{nl_claw}  represents a one-dimensional model for the sedimentation
of small equal-sized spherical solid particles dispersed in a viscous fluid, where the local solids column fraction $\rho=\rho(x,t)$ is a function of depth $x$
and time $t$. In this context, the flux function is given by
\begin{equation}\label{sednl}
f(\rho)=\rho(1-\rho)^\alpha,\quad
V(\rho)=(1-\rho)^n, \quad (\rho*\omega_\eta)(x,t)=\int_{-2\eta}^{2\eta}\omega_\eta(y)\rho(x+y,t)dy,
\end{equation}
where $n \geq 1$ and the parameter $\alpha$ satisfies $\alpha=0$ or $\alpha\geq1$. The function $V$ is the so-called hindered settling factor and the convolution term $\rho*\omega_\eta$ is defined by a symmetric, nonnegative, and piecewise smooth kernel function $\omega_\eta$ with
support on $[-2\eta,2\eta]$ for a parameter $\eta>0$ and $\int_{\mathbb{R}}\omega_\eta(x)dx=1$. More precisely, the authors define in \cite{BBKT_2011} a truncated parabola $K$ by
$$
K(x)=\frac38\left(1-\frac{x^2}{4}\right) \, \text{ for } |x|<2,\qquad K(x)=0\,\,\text{ otherwise, }
$$
and set
 \begin{equation}\label{ker_sed}
 \omega_\eta(x):=\eta^{-1}K(\eta^{-1}x).
 \end{equation}

Conservation laws with non-local terms arise in a variety of physical and engineering applications: besides the above cited ones, we mention models for granular flows \cite{AmadoriShen2012}, production networks \cite{Keimer2015}, conveyor belts \cite{Gottlich2014}, weakly coupled oscillators \cite{AHP2016}, laser cutting processes \cite{ColomboMarcellini2015}, biological applications like structured populations dynamics \cite{Perthame_book2007}, crowd dynamics \cite{Carrillo2016, ColomboGaravelloMercier2012} or more general problems like gradient constrained equations \cite{Amorim2012}. \\
While several analytical results on non-local conservation laws can be found in the recent literature (we refer to \cite{Amorim2015}
for scalar equations in one space dimension, \cite{AmbrosioGangbo2008, ColomboHertyMercier2011, PiccoliRossi2013} for scalar equations in several space dimensions and \cite{ACG2015,ColomboMercier2012,CrippaMercier2012} for multi-dimensional systems of conservation laws),
few specific numerical methods have been developed up to now.
Finite volume numerical methods have been studied in \cite{ACG2015, GS_2016, KurganovPolizzi2009, PiccoliTosin2011}. At this regard, it is important to notice that the lack of Riemann solvers for non-local equations limits strongly the choice of the scheme. At the best of our knowledge, two main approaches have been proposed in the literature to treat non-local problems: first and second order central schemes like
Lax-Friedrichs or Nassyau-Tadmor \cite{ACG2015, Amorim2015, BBKT_2011, GS_2016, KurganovPolizzi2009}
and Discontinuous Galerkin (DG) methods \cite{GottlichSchindler2015}. In particular, the comparative study presented in \cite{GottlichSchindler2015}
on a specific model for material flow in two space dimensions, involving density gradient convolutions,
encourages the use of DG schemes for their versatility and lower computational cost, but further investigations are needed in this direction.
Besides that, the computational cost induced by the presence of non-local terms, requiring the computation of quadrature formulas at each time step,
motivate the development of high order algorithms.

The aim of the present article is to conduct a comparison study on high order schemes for a class of non-local scalar equations in one space dimension,
focusing on equations of type \eqref{nl_claw}.
In Section \ref{review} we review DG and FV-WENO schemes for classical conservation laws.
These schemes will be extended to the non-local case in Sections \ref{sec:dg_nl} and \ref{sec:fv_nl}.
Section \ref{sec:tests} is devoted to numerical tests.

\section{A review of Discontinuous Galerkin and Finite Volume WENO  schemes for local conservation laws} \label{review}
The aim of this section is to introduce some notations and to briefly review the DG and FV-WENO numerical schemes to solve the classical {\it local} nonlinear conservation law
\begin{equation}\label{claw}
\begin{cases}
\rho_t+g(\rho)_x=0, & x\in \mathbb{R},\quad t>0, \\
\rho(x,0)=\rho_0(x), & x\in \mathbb{R}.
\end{cases}
\end{equation}

We first consider $\{I_j\}_{j\in\mathbb{Z}}$ a partition of $\mathbb{R}$. The points $x_j$ will represent the centers of the cells $I_j=[x_{j-\frac12},x_{j+\frac12}]$, and the cell sizes will be denoted by
$\Delta x_j=x_{j+\frac12}-x_{j-\frac12}$. The largest cell size is $h=\sup_j \Delta x_j$. Note that, in practice, we will consider a constant space step so that we will have $h=\Delta x$.

\subsection{The Discontinuous Galerkin approach}

In this approach, we look for approximate
solutions in the function space of discontinuous polynomials
$$
V_h:=V_h^k=\{v:v|_{I_j}\in P^k(I_j)\},
$$
where $P^k(I_j)$ denotes the space of polynomials of degree at most $k$ in the element $I_j$.
The approximate solutions are sought under the form
$$
\rho^h(x,t) = \sum_{l=0}^k c_j^{(l)}(t) v_j^{(l)}(x), \quad v_j^{(l)}(x) = v^{(l)}(\zeta_j(x)),
$$
where $c_j^{(l)}$ are the degrees of freedom
in the element $I_j$.
The subset $\{v_j^{(l)}\}_{l=0,...,k}$
constitutes a basis of $P^k(I_j)$ and
in this work we will take Legendre polynomials as a local orthogonal basis of $P^k(I_j)$, namely
$$v^{(0)}(\zeta_j)=1,\qquad v^{(1)}(\zeta_j)=\zeta_j ,\qquad   v^{(2)}(\zeta_j)=\frac12\left( 3 \zeta_j^2-1\right),\dots, \quad \zeta_j:=\zeta_j(x)=\frac{x-x_j}{{\Delta x}/2},$$
see for instance \textcolor{black}{\cite{CS_2001,QS_2005}}. \\
Multiplying \eqref{claw} by $v_h\in V_h$ and integrating over $I_j$ gives
\begin{equation}
\int_{I_{j}}\rho_{t}v_{h}dx-\int_{I_{j}}g(\rho)v_{h,x}dx+g(\rho(\cdot,t))v_{h}(\cdot)\bigl\lvert_{x_{j-\frac12}}^{x_{j+\frac12}}=0,
\end{equation}
and {the semi-discrete DG formulation thus consists} in looking for $\rho^{h}\in V_{h}$, such that for all $v_{h}\in V_{h}$ and all $j$,
\begin{equation}\label{semi-discrete}
\int_{I_{j}}\rho^h_{t}v_{h}dx-\int_{I_{j}}g(\rho^h)v_{h,x}dx+\hat{g}_{j+\frac12}v^{-}_{h}(x_{j+\frac12})-\hat{g}_{j-\frac12}v^{+}_{h}(x_{j-\frac12})=0 ,
\end{equation}
where $\hat{g}_{j+\frac12}=\hat{g}(\rho^{h,-}_{j+\frac12},\rho^{h,+}_{j+\frac12})$ is a consistent, monotone and Lipschitz continuous numerical flux function. In particular,
we will choose to use the Lax-Friedrichs flux
$$\hat{g}(a,b):=\frac{g(a)+g(b)}{2}+\alpha\frac{a-b}{2},\quad\quad \alpha=\max_u |g'(u)|.$$
Let us now observe that if $v_h$ is the $l$-th Legendre polynomial, we have $v^{+}_{h}(x_{j-\frac12})=v^{(l)}(\zeta_{j}(x_{j-\frac12}))=(-1)^{l}$, and
$v^{+}_{h}(x_{j+\frac12})=v^{(l)}(\zeta_{j}(x_{j+\frac12}))=1$, $\forall j\,, l=0,1,\dots,k$. Therefore,
replacing $\rho^h(x,t)$ by $\rho_j^{h}(x,t)$ and $v_h(x)$ by $v^{(l)}(\zeta_j(x))$ in \eqref{semi-discrete}, the degrees of freedom $c^{(l)}_{j}(t)$ satisfy the differential equations
\begin{equation}\label{ode}
\frac{d}{dt}c^{(l)}_{j}(t)+\frac{1}{a_{l}} \left(-\int_{I_{j}}g(\rho_j^h)\frac{d}{dx}v^{(l)}(\zeta_j(x))dx+\hat{g}(\rho^{h,-}_{j+\frac12},\rho^{h,+}_{j+\frac12})-
(-1)^{l}\hat{g}(\rho^{h,-}_{j-\frac12},\rho^{h,+}_{j-\frac12})\right)=0,
\end{equation}
with $${a_{l}}=\int_{I_{j}}(v^{(l)}(\zeta_j(x)))^2dx=\frac{\Delta x}{2l+1},\qquad l=0,1,\dots,k.$$
On the other hand, the initial condition can be obtained using the $L^2$-projection of $\rho_0(x)$, namely
$$c^{(l)}_{j}(0)=\frac{1}{a_{l}}\int_{I_{j}}\rho_0(x)v^{(l)}(\zeta_j(x))dx=\frac{2l+1}{2}\int_{-1}^1\rho_0\left(\frac{\Delta x}{2}y+x_j\right)v^{(l)}(y)dy,\qquad l=0,\dots,k.$$
The integral terms in \eqref{ode} can be computed exactly or using a high-order quadrature technique after a suitable change of variable, namely
 $$\int_{I_{j}}g(\rho_j^h)\frac{d}{dx}v^{(l)}(\zeta_j(x))dx=\int_{-1}^1g\left(\rho_j^h\left(\frac{\Delta x}{2}y+x_j,t\right)\right)(v^{(l)})'(y)dy.$$
In this work,  we will consider a Gauss-Legendre quadrature with $N_G=5$  nodes for integrals on $[-1,1]$
$$
\int_{-1}^{1}g(y)dy=\sum_{e=1}^{N_G}w_eg(y_e),
$$
where $y_e$ are the Gauss-Legendre quadrature points such that the quadrature formula is exact for polynomials of degree until $2N_G-1=9$ \textcolor{black}{\cite{abramowitz1966handbook}}. \\

\textcolor{black}{
The semi-discrete scheme \eqref{ode} can be written under the usual form
$$\frac{d}{dt}C(t)=	\mathcal{L}(C(t)),$$
where $\mathcal{L}$ is the spatial discretization operator defined by (\ref{ode}). In this work, we will consider a time-discretisation based on the following
 total variation diminishing (TVD) third-order Runge-Kutta  method \cite{shu1988efficient},
\begin{eqnarray}\label{rk3}
C^{(1)}&=&C^{n}+\Delta t \mathcal{L}(C^{n}),\notag\\
C^{(2)}&=&\frac34C^{n}+\frac14C^{(1)}+ \frac14\Delta t \mathcal{L}(C^{(1)}),\\
C^{n+1}&=&\frac13C^{n}+\frac23C^{(2)}+ \frac23\Delta t \mathcal{L}(C^{(2)}).\notag
\end{eqnarray}
Other TVD or strong stability preserving SSP time discretization can be also used \cite{gottlieb2009high}.  The CFL condition is
$$\frac{\Delta t}{\Delta x}\max_\rho|g'(\rho)|\leq \mathrm{C}_{\mathrm{CFL}}= \frac{1}{2k+1},$$
where $k$ is the degree of the polynomial, see \textcolor{black}{\cite{CS_2001}}. The scheme
\eqref{ode} and \eqref{rk3} will be denoted RKDG. }

\subsection{Generalized slope limiter}
It is well-known that RKDG schemes like the one proposed above may oscillate when sharp discontinuities are present in the solution. In order to control these instabilities, a common
strategy is to use a limiting procedure. We will consider the so-called generalized slope limiters proposed in \cite{CS_2001}.
With this in mind and $\rho_j^h(x)=\sum_{l=0}^{k}c^{(l)}_{j}v^{(l)}(\zeta_j(x))\in P^k(I_j)$, we first set
$$u_{j+\frac12}^{-}:=\bar{\rho}_j+\operatorname*{\mathrm{mm}}(\rho_j^h(x_{j+\frac12})-\bar{\rho}_j,\Delta_{+}\bar{\rho}_j,\Delta_{-}\bar{\rho}_{j})
$$
and
$$ u_{j-\frac12}^{+}:=\bar{\rho}_j-\operatorname*{\mathrm{mm}}(\bar{\rho}_j-\rho_j^h(x_{j-\frac12}),\Delta_{+}\bar{\rho}_j,\Delta_{-}\bar{\rho}_{j}),$$
where $\bar{\rho}_j$ is the average of $\rho^h$ on $I_j$,   $\Delta_{+}\bar{\rho}_j=\bar{\rho}_{j+1}-\bar{\rho}_j$,  $\Delta_{-}\bar{\rho}_j=\bar{\rho}_j-\bar{\rho}_{j-1}$, and
where $\operatorname*{\mathrm{mm}}$ is given by the minmod function limiter
$$\operatorname*{\mathrm{mm}}(a_1,a_2,a_3)=\begin{cases} s\cdot \min_{j} |a_j| & \text{ if } s=sign(a_1)=sign(a_2)=sign(a_3)\\ 0 & \text{ otherwise,}    \end{cases}$$
or by the TVB modified minmod function
\begin{equation}\label{slopelimiter}
 {\overline{\operatorname*{\mathrm{mm}}}}(a_1,a_2,a_2)=\begin{cases} a_1 & \text{ if } |a_1|\leq M_{b} h^2,\\ \operatorname*{\mathrm{mm}}(a_1,a_2,a_3) & \text{ otherwise,}    \end{cases}
\end{equation}
where $M_{b} >0$ is a constant. According to \cite{CS_2001, QS_2005}, this constant is proportional to the second-order derivative of the initial condition at local extrema.
Note that if $M_b$ is chosen too small, the scheme is very diffusive, while if $M_b$ is too large, oscillations may appear. \\
The values $u_{j+\frac12}^{-}$ and $u_{j-\frac12}^{+}$ allow to compare the interfacial values of $\rho^h_j(x)$ with respect to its local cell averages. Then, the generalized slope limiter technique consists in replacing $\rho_j^h$ on each cell $I_j$ with $\Lambda\Pi_h$ defined by
\begin{equation*}
\Lambda\Pi_h(\rho_j^h)=\begin{cases}
 \rho_j^h &\text{if } u_{j-\frac12}^{+}=\rho_j^h(x_{j-\frac12})\text{ and } u_{j+\frac12}^{-}=\rho_j^h(x_{j+\frac12}),\\
\displaystyle \bar{\rho}_j+\frac{(x-x_j)}{\Delta x/2}\operatorname*{\mathrm{mm}}(c^{(1)}_{j},\Delta_{+}\bar{\rho}_j,\Delta_{-}\bar{\rho}_{j}) &\text{otherwise.}
     \end{cases}
\end{equation*}
Of course, this generalized slope limiter procedure has to be performed after each inner step of the Runge-Kutta scheme \eqref{rk3}.

\subsection{The Finite Volume WENO approach} \label{sec:fvweno1}
In this section, we solve the nonlinear conservation law \eqref{claw} by using a
high-order finite volume WENO scheme \textcolor{black}{\cite{Shu_1998,shu1988efficient}}.
Let us denote by $\bar{\rho}(x_j,t)$ the cell average of the exact solution $\rho(\cdot,t)$ in the cell $I_j$~:
$$
\bar{\rho}(x_j,t):=\frac{1}{\Delta x}\int_{I_j}\rho(x,t)dx.
$$
The unknowns are here the set of all $\{\bar{\rho}_j(t)\}_{j\in\mathbb{Z}}$ which represent approximations of the exact cell averages $\bar{\rho}(x_j,t)$. Integrating \eqref{claw} over $I_j$
we obtain
\begin{equation*}
\frac{d}{dt}\bar{\rho}(x_j,t)=-\frac{1}{\Delta x}\left( g(\rho(x_{j+\frac12},t))-g(\rho(x_{j-\frac12},t))\right),\qquad \forall j \in \mathbb{Z}.
\end{equation*}
This equation is approximated by the semi-discrete conservative scheme
\begin{equation}\label{fv_semi}
\frac{d}{dt}\bar{\rho}_j(t)=-\frac{1}{\Delta x}\left( \hat{g}_{j+\frac12}-\hat{g}_{j-\frac12}\right),\qquad \forall j \in \mathbb{Z},
\end{equation}
where the numerical flux $\hat{g}_{j+\frac12}:=\hat{g}(\rho_{j+\frac12}^l,\rho_{j+\frac12}^r)$ is the Lax-Friedrichs  flux and $\rho_{j+\frac12}^l$ and $\rho_{j+\frac12}^r$ are some left and right high-order WENO reconstructions of $\rho(x_{j+\frac12},t)$ obtained from the cell averages $\{\bar{\rho}_j(t)\}_{j \in \mathbb{Z}}$.
Let us focus  on the definition of $\rho_{j+\frac12}^l$.
In order to obtain a $(2k-1)$th-order WENO approximation, we first compute $k$ reconstructed values
$$\hat{\rho}_{j+\frac12}^{(r)}=\sum_{i=0}^{k-1}c_{r}^i\bar{\rho}_{i-r+j},\quad r=0,\dots,k-1,$$
that correspond to $k$ possible stencils $S_r(j)=\{x_{j-r},\dots,x_{j-r+k-1}\}$ for $r=0,\dots,k-1$. The coefficients $c_{r}^i$ are chosen in such a way that each of the $k$ reconstructed values is $k$th-order accurate \cite{Shu_1998}. Then, the $(2k-1)$th-order WENO reconstruction is a convex combination of all these $k$ reconstructed values and defined by
$$
\rho_{j+\frac12}^l=\sum_{r=0}^{k-1}w_{r}\hat{\rho}_{j+\frac12}^{(r)},
$$
where the positive nonlinear weights $w_r$ satisfy $\sum_{r=0}^{k-1}w_r=1$ and are defined by
$$
w_r=\frac{\alpha_r}{ \sum_{s=0}^{k-1}\alpha_s},\quad \alpha_r=\frac{d_r}{(\epsilon+\beta_r)^2}.
$$
Here $d_r$ are the linear weights which yield the $(2k-1)$th-order accuracy, $\beta_r$ are called the ``smoothness indicators'' of the stencil $S_r(j)$, which measure the smoothness of the function $\rho$ in the stencil, and $\epsilon$ is a small parameter used to avoid dividing by zero (typically $\epsilon=10^{-6}$).
The exact form of the smoothness indicators and other details about WENO reconstructions can be found in \cite{Shu_1998}. \\
The reconstruction of $\rho_{j-\frac12}^r$ is obtained in a mirror symmetric fashion with respect to $x_{j-\frac12}$.
\textcolor{black}{
The semi-discrete scheme \eqref{fv_semi} is then integrated in time using the (TVD) third-order Runge-Kutta scheme \eqref{rk3}, under
the CFL condition
$$\frac{\Delta t}{\Delta x}\max_\rho|g'(\rho)|\leq \mathrm{C}_{\mathrm{CFL}}<1.$$. }

\section{Construction of DG schemes for non-local problems}  \label{sec:dg_nl}
We now focus on the non-local equation \eqref{nl_claw}, for which we set $R(x,t):=(\rho*\omega_\eta)(x,t)$. Since
$\rho^{h}(x,t)|_{I_j}=\sum_{l=0}^{k}c^{(l)}_{j}(t)v^{(l)}(\zeta_j(x))\in P^k(I_j)$, is a weak solution of the non-local problem  \eqref{nl_claw}, the coefficients $c^{(l)}_{j}(t)$ can be calculated by solving the following differential equation,
\begin{equation}\label{DG_nl}
\frac{d}{dt}c^{(l)}_{j}(t)+\frac{1}{a_{l}} \left(-\int_{I_{j}}f(\rho^h) V(R)\frac{d}{dx}v^{(l)}(\zeta_j(x))dx+\check{f}_{j+\frac12}-
(-1)^{l}\check{f}_{j-\frac12}\right)=0,
\end{equation}
where $\check{f}_{j+\frac12}$ is a
consistent approximation of $f(\rho)V(R)$ at interface $x_{j+1/2}$. Here, we consider again the Lax-Friedrichs numerical flux defined by
\begin{equation}\label{nlflux1}
\check{f}_{j+\frac12}=\frac12\left(f(\rho_{j+\frac12}^{h,-})V(R_{j+\frac12}^{h,-})+f(\rho_{j+\frac12}^{h,+})V(R_{j+\frac12}^{h,+})+\alpha(\rho_{j+\frac12}^{h,-}-\rho_{j+\frac12}^{h,+})  \right),
\end{equation}
with $\alpha:=\max_\rho|\partial_\rho(f(\rho)V(\rho))|$ and where $R_{j+\frac12}^{h,-}$ and $R_{j+\frac12}^{h,+}$ are the left and right approximations of $R(x,t)$ at the interface $x_{j+\frac12}$.
Since $R$ is defined by a convolution, we naturally set
$R_{j+\frac12}^{h,-}=R_{j+\frac12}^{h,+}=R(x_{j+\frac12},t)=:R_{j+\frac12}$, so that \eqref{nlflux1} can be written as
\begin{equation}\label{nlflux2}
\check{f}_{j+\frac12}:=\check{f}(\rho_{j+\frac12}^{h,-},\rho_{j+\frac12}^{h,+},R_{j+\frac12})=
\frac12\left((f(\rho_{j+\frac12}^{h,-})+f(\rho_{j+\frac12}^{h,+}))V(R_{j+\frac12})+\alpha(\rho_{j+\frac12}^{h,-}-\rho_{j+\frac12}^{h,+})  \right).
\end{equation}
Next, we propose to approximate the integral term in (\ref{DG_nl}) using the following high-order Gauss-Legendre quadrature technique,
\begin{eqnarray}\label{nl_intR}
 \int_{I_{j}}f(\rho^h) V(R)\frac{d}{dx}v^{(l)}(\zeta_j(x))dx&=&\int_{-1}^1f(\rho^h\left(\frac{\Delta x}{2}y+x_j,t\right))V\left(R\left(\frac{\Delta x}{2}y+x_j,t\right)\right)(v^{(l)})'(y)dy \notag\\
 &=& \sum_{e=1}^{N_G}w_ef(\rho^{h} \left(\hat{x}_e,t\right))V\left(R\left(\hat{x}_e,t\right)\right)(v^{(l)})'(y_e),
\end{eqnarray}
where we have set
$\hat{x}_e=\frac{\Delta x}{2}y_e+x_j\in I_j$, $y_e$ being the Gauss-Legendre quadrature points ensuring that the quadrature formula is exact for polynomials of order less or equal to $2N_G-1$. \\
It is important to notice that the DG formulation for the non-local conservation law \eqref{DG_nl} requires the computation of the extra integral terms $R_{j+\frac12}$ in  \eqref{nlflux2} and $R\left(\hat{x}_e,t\right)$ in \eqref{nl_intR} for each quadrature point, which increases the computational cost of the strategy. For $\rho^{h}(x,t)|_{I_j}\in P^k(I_j)$, we can compute these terms as follows for both the LWR and sedimentation non-local models considered in this paper. \\
\ \\
{\it Non-local LWR model.} For the non-local LWR model,  we impose the condition  $N\Delta x=\eta$ for some $N\in\mathbb{N}$, so that we have
\begin{eqnarray*}
R_{j+\frac12}&=&\int_{x_{j+\frac12}}^{x_{j+\frac12}+\eta}\omega_\eta(y-{x_{j+\frac12}})\rho^h(y,t)dy=\sum_{i=1}^N\int_{I_{j+i}}
\omega_\eta(y-{x_{j+\frac12}})\rho^h_{j+i}(y,t)dy\\
&=&\sum_{i=1}^N \sum_{l=0}^{k}c^{(l)}_{j+i}(t)\int_{I_{j+i}}\omega_\eta(y-{x_{j+\frac12}})v^{(l)}(\zeta_{j+i}(y))dy\\
&=&\sum_{i=1}^N \sum_{l=0}^{k}c^{(l)}_{j+i}(t)\underbrace{\frac{\Delta x}{2}\int_{-1}^1\omega_\eta\left(\frac{\Delta x}{2}y+(i-\frac12)\Delta x\right)v^{(l)}(y)dy}_{\Gamma_{i,l}}=\sum_{i=1}^N \sum_{l=0}^{k}c^{(l)}_{j+i}\Gamma_{i,l},
\end{eqnarray*}
while for each quadrature point $\hat{x}_e$ we have
\begin{eqnarray*}
R\left(\hat{x}_e,t\right)&=&\int_{\hat{x}_e}^{\hat{x}_e+\eta}\omega_\eta(y-\hat{x}_e)\rho^h(y,t)dy= \underbrace{\int_{\hat{x}_e}^{x_{j+\frac12}}\omega_\eta(y-\hat{x}_e)\rho_{j}^h(y,t)dy}_{\Gamma_a}+\\
&&\sum_{i=1}^{N-1}\underbrace{\int_{I_{j+i}}\omega_\eta(y-\hat{x}_e)\rho_{j+i}^h(y,t)dy}_{\Gamma_b^i} +\underbrace{\int_{x_{j+N-\frac12}}^{\hat{x}_e+\eta}\omega_\eta(y-\hat{x}_e)\rho_{j+N}^h(y,t)dy}_{\Gamma_c}.
\end{eqnarray*}
The three integrals $\Gamma_a$, $\Gamma_b^i$ and $\Gamma_c$ can be computed with the same change of variable as before, namely
\begin{eqnarray*}
\Gamma_a&=&\frac{\Delta x}{2}\int_{y_e}^1\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)\right)\sum_{l=0}^kc^{(l)}_j(t)v^{(l)}(y)dy\\
&=&\sum_{l=0}^kc^{(l)}_j(t)\underbrace{\frac{\Delta x}{2}\int_{y_e}^1\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)\right)v^{(l)}(y)dy}_{\Gamma_{0,l}^{(e)}}=\sum_{l=0}^kc^{(l)}_j \Gamma_{0,l}^{(e)}, \\
\Gamma_b^i&=&\frac{\Delta x}{2}\int_{-1}^1\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)+i\Delta x\right)\sum_{l=0}^kc^{(l)}_{j+i}(t)v^{(l)}(y)dy\\
&=&\sum_{l=0}^kc^{(l)}_{j+i}\underbrace{\frac{\Delta x}{2}\int_{-1}^1\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)+i\Delta x\right)v^{(l)}(y)dy}_{\Gamma_{i,l}^{(e)}}=\sum_{l=0}^kc^{(l)}_{j+i} \Gamma_{i,l}^{(e)}, \\
\Gamma_c&=&\frac{\Delta x}{2}\int_{-1}^{y_e}\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)+N\Delta x\right)\sum_{l=0}^kc^{(l)}_{j+N}v^{(l)}(y)dy\\
&=&\sum_{l=0}^kc^{(l)}_{j+N}(t)\underbrace{\frac{\Delta x}{2}\int_{-1}^{y_e}\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)+N\Delta x\right)v^{(l)}(y)dy}_{\Gamma_{N,l}^{(e)}}=\sum_{l=0}^kc^{(l)}_{j+N} \Gamma_{N,l}^{(e)}.
\end{eqnarray*}
Finally we can compute $R\left(\hat{x}_e,t\right)$ as
$$R\left(\hat{x}_e,t\right)=\sum_{i=0}^N\sum_{l=0}^kc^{(l)}_{j+i} (t)\Gamma_{i,l}^{(e)},$$
in order to evaluate \eqref{nl_intR}. \\
\ \\
{\it Non-local sedimentation model.}
Considering now the non-local sedimentation model, we impose $N\Delta x=2\eta$ for some $N\in\mathbb{N}$, so that we have
$$R_{j+\frac12}= \int_{x_{j+\frac12}-2\eta}^{x_{j+\frac12}+2\eta}\omega_\eta(y-x_{j+\frac12})\rho^h(y,t)dy=\sum_{i=-N+1}^N\sum_{l=0}^kc^{(l)}_{j+i}(t)\Gamma_{i,l},$$
and for each quadrature point $\hat{x}_e$,
$$R\left(\hat{x}_e,t\right)=\int_{\hat{x}_e-2\eta}^{\hat{x}_e+2\eta}\omega_\eta(y-\hat{x}_e)\rho^h(y,t)dy=\sum_{i=-N}^N\sum_{l=0}^kc^{(l)}_{j+i}(t) \Gamma_{i,l}^{(e)},$$
with
\begin{eqnarray*}
\Gamma_{-N,l}^{(e)}&=& \frac{\Delta x}{2}\int_{y_e}^1\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)-N\Delta x\right)v^{(l)}(y)dy,\\
\Gamma_{i,l}^{(e)}&=& \frac{\Delta x}{2}\int_{-1}^1\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)+i\Delta x\right)v^{(l)}(y)dy,\\
\Gamma_{N,l}^{(e)}&=& \frac{\Delta x}{2}\int_{-1}^{y_e}\omega_\eta\left(\frac{\Delta x}{2}(y-y_e)+N\Delta x\right)v^{(l)}(y)dy.
\end{eqnarray*}
\ \\
{\bf Remark.} \textcolor{black}{In order to compute integral terms in \eqref{DG_nl} as accurately as possible, the
integrals $R_{j+\frac12}$ and $R\left(\hat{x}_e,t\right)$ above, and in particular, the coefficients $\Gamma_{i,l}$,
must be calculated exactly or using a suitable quadrature formula accurate to at least $\mathcal{O}(\Delta x ^{l+p})$ where $p$ is the degree of the convolution term $\omega_{\eta}$.
It is important to notice that the coefficients  can be precomputed and stored in order to save computational time.}\\
\textcolor{black}{
Finally the semi-discrete scheme \eqref{DG_nl} can be discretized in time using the (TVD) third-order Runge-Kutta scheme \eqref{rk3}, under
the CFL condition
$$\frac{\Delta t}{\Delta x}\max_\rho|\partial_\rho (f(\rho)V(\rho))|\leq \mathrm{C}_{\mathrm{CFL}}= \frac{1}{2k+1},$$
where $k$ is the degree of the polynomial. }
\section{Construction of FV schemes for non-local conservation laws} \label{sec:fv_nl}

Let us now extend the FV-WENO strategy of Section \ref{sec:fvweno1} to the non-local case.
We first integrate \eqref{nl_claw} over $I_j$ to obtain
 \begin{equation*}\label{fv_nl_int}
\frac{d}{dt}\bar{\rho}(x_j,t)=-\frac{1}{\Delta x}\left( f(\rho(x_{j+\frac12},t))V(R(x_{j+\frac12},t))-f(\rho(x_{j-\frac12},t))V(R(x_{j-\frac12},t))\right),\quad \forall j\in\mathbb{Z},
\end{equation*}
so that the semi-discrete discretization can be written as
\begin{equation}\label{fv_semi_2}
\frac{d}{dt}\bar{\rho}_j(t)=-\frac{1}{\Delta x}\left( \check{f}_{j+\frac12}-\check{f}_{j-\frac12}\right),\qquad \forall j\in\mathbb{Z},
\end{equation}
where the use of the Lax-Friedrichs numerical flux gives
\begin{equation*}
\check{f}_{j+\frac12}=\check{f}(\rho_{j+\frac12}^l,\rho_{j+\frac12}^r,R_{j+\frac12})=\frac12\left((f(\rho_{j+\frac12}^l)+f(\rho_{j+\frac12}^r))V(R_{j+\frac12})+\alpha(\rho_{j+\frac12}^l-\rho_{j+\frac12}^r)  \right).
\end{equation*}
Recall that $\rho_{j+\frac12}^l$ and $\rho_{j+\frac12}^r$ are the left and right WENO high-order reconstructions at point $x_{j+\frac12}$. \\
\ \\
At this stage, it is crucial to notice that in the present FV framework, the approximate solution is piecewise constant on each cell $I_j$, so that a naive evaluation of the convolution terms may lead to a loss of high-order accuracy. Let us illustrate this. Considering for instance
the non-local LWR model and using that $\rho(x,t)$ is piecewise constant on each cell naturally leads to
\begin{eqnarray*}
R_{j+\frac12}&=&\int_{x_{j+\frac12}}^{x_{j+\frac12}+\eta}\omega_\eta(y-{x_{j+\frac12}})\rho(y,t)dy=\sum_{i=1}^N\int_{I_{j+i}}
\omega_\eta(y-{x_{j+\frac12}})\rho(y,t)dy\\
&=&\Delta x \sum_{i=1}^N\bar{\rho}_{j+i}\int_{I_{j+i}}\omega_\eta(y-{x_{j+\frac12}})dy,
\end{eqnarray*}
which does not account for the high-order WENO reconstruction. In order to overcome this difficulty,
we propose to approximate the value of $\rho(x,t)$ using quadratic polynomials in each cell.
This strategy is detailed for each model in the following two subsections.

\subsection{Computation of $R_{j+\frac12}$ for the non-local LWR model}
In order to compute the integral $$
R_{j+\frac12}=\int_{x_{j+\frac12}}^{x+\eta}\omega_\eta(y-x_{j+\frac12})\rho(y,t)dy,
$$
we propose to consider a reconstruction of $\rho(x,t)$ on $I_j$ by taking advantage of the high-order WENO reconstructions
$\rho_{j-\frac12}^r$ and $\rho_{j+\frac12}^l$ at the boundaries of $I_j$, as well as the approximation of the cell average $\bar{\rho}_j^n$. More precisely, we propose
to define a polynomial $P_j(x)$ of degree 2 on
$I_j$ by
$$
P_j(x_{j-\frac12})=\rho_{j-\frac12}^r,\quad P_j(x_{j+\frac12})=\rho_{j+\frac12}^l,\quad \frac{1}{\Delta x}\int_{I_j}P_j(x)dx=\bar{\rho}_j^n,
$$
which is very easy to handle. In particular, we have
$$
P_j (x):=a_{j,0}+a_{j,1}\left( \frac{x-x_j}{\Delta x/2} \right)+a_{j,2}\left(3 \left( \frac{x-x_j}{\Delta x/2} \right)^2-1\right)/2,\qquad x \in I_j,
$$
with
$$
a_{j,0}=\bar{\rho}_j^n,\qquad a_{j,1}=\frac12\left(\rho_{j+\frac12}^l-\rho_{j-\frac12}^r \right), \qquad a_{j,2}=\frac12\left(\rho_{j+\frac12}^l+\rho_{j-\frac12}^r \right)-\bar{\rho}_j^n.
$$
Observe that we have used the same polynomials as in the DG formulation, i.e., $P_j(x)=\sum_{l=0}^2a_{j,l}v^{(l)}(\zeta_{j}(y))$.
With this, $R_{j+\frac12}$ can be computed as
\begin{eqnarray}\label{lwr_Rj12}
R_{j+\frac12}&=&\sum_{i=1}^N\int_{I_{j+i}}\omega_\eta(y-{x_{j+\frac12}})P_{j+i}(y)dy=\sum_{i=1}^N\int_{I_{j+i}}\omega_\eta(y-{x_{j+\frac12}})\sum_{l=0}^2a_{j+i,l}v^{(l)}(\zeta_{j+i}(y))dy \notag\\
&=&\sum_{i=1}^N\sum_{l=0}^2a_{j+i,l}\int_{I_{j+i}}\omega_\eta(y-{x_{j+\frac12}})v^{(l)}(\zeta_{j+i}(y))dy\notag \\ \notag
&=&\sum_{i=1}^N\sum_{l=0}^2a_{j+i,l}\underbrace{\frac{\Delta x}{2}\int_{-1}^{1}\omega_\eta\left(\frac{\Delta x}{2}y+(i-\frac12)\Delta x\right)v^{(l)}(y)dy}=\sum_{i=1}^N\sum_{l=0}^2a_{j+i,l}{\Gamma}_{i,l},
\end{eqnarray}
where the coefficients ${\Gamma}_{l,i}$ are computed exactly or using a high-order quadrature approximation.
\subsection{Computation of $R_{j+\frac12}$ for non-local sedimentation model}
As far as the non-local sedimentation model \eqref{nl_claw}-\eqref{sednl} is concerned, we have
$$
R_{j+\frac12}=\int_{-2\eta}^{2\eta}\omega_\eta(y)\rho({x_{j+\frac12}}+y,t)dy=\int_{{x_{j+\frac12}}-2\eta}^{{x_{j+\frac12}}+2\eta}\omega_\eta(y-{x_{j+\frac12}})\rho(y,t)dy.
$$
Considering again the assumption $N\Delta x=2\eta$, we get
\begin{eqnarray*}\label{sed_Rj12}
R_{j+\frac12}&=&\sum_{i=-N+1}^N\int_{I_{j+i}}\omega_\eta(y-{x_{j+\frac12}})P_{j+i}(y)dy=\sum_{i=-N+1}^N\sum_{l=0}^2a_{j+i,l}\int_{I_{j+i}}\omega_\eta(y-{x_{j+\frac12}})v^{(l)}(\zeta_{j+i}(y))dy \notag \\
&=&\sum_{i=-N+1}^N\sum_{l=0}^2a_{j+i,l}\underbrace{\frac{\Delta x}{2}\int_{-1}^{1}\omega_\eta\left(\frac{\Delta x}{2}y+(i-\frac12)\Delta x\right)v^{(l)}(y)dy}=\sum_{i=-N+1}^N\sum_{l=0}^2a_{j+i,l}{\Gamma}_{i,l}.
\end{eqnarray*}
\\
To conclude this section, let us remark that
the coefficients ${\Gamma}_{i,l}$ are computed for $l=0,\dots,k$ in the DG formulation, where $k$ is the degree of the polynomials in $P^k(I_j)$, while in the
FV formulation, the coefficients ${\Gamma}_{i,l}$ are computed only for $l=0,\dots,2$ due to the quadratic reconstruction of the unknown in each cell.
\textcolor{black}{
The semi-discrete scheme \eqref{fv_semi_2} is then integrated in time using the (TVD) third-order Runge-Kutta scheme \eqref{rk3}, under
the CFL condition
$$\frac{\Delta t}{\Delta x}\max_\rho|\partial_\rho (f(\rho)V(\rho))|\leq \mathrm{C}_{\mathrm{CFL}}<1.$$.}

\section{Numerical experiments} \label{sec:tests}

In this section, we propose several test cases in order to illustrate the behaviour of the RKDG and FV-WENO high-order schemes proposed in the previous Sections
\ref{sec:dg_nl} and \ref{sec:fv_nl} for the numerical approximation of the solutions of the non-local traffic flow and sedimentation models on a bounded interval $I=[0,L]$ with boundary conditions.

We consider periodic boundary conditions for the traffic flow model, i.e. $\rho(0,t)=\rho(L,t)$ for $t\geq0$ and zero-flux boundary conditions for sedimentation model, in order to simulate a batch sedimentation process. More precisely, we assume that $\rho(x,t)=0$ for $x\leq0$ and $\rho(x,t)=1$ for $x\geq1.$
{
Given a uniform partition of $[0,L]$ $\{I_{j}\}_{j=1}^{M}$ with $\Delta x= L/M$, in order to compute the numerical fluxes $\check{f}_{j+1/2}$ for $j=0,\dots,M+1$,
we define $\rho_{j}^{n}$ in the ghost cells as follow: for the traffic model,
$$\rho_{-1}^{n}:=\rho_{M-1}^{n}, \quad \rho_{0}^{n}:=\rho_{M}^{n}, \quad \rho_{M+i}^{n}:=\rho_{i}^{n}, \qquad \text{ for  } i=1,\dots,N;$$
and for the sedimentation model
$$\rho_{i}^{n}:=0,  \text{ for  } i=-N,\dots,0, \quad \text{ and } \quad \rho_{M+i}^{n}:=1, \qquad \text{ for  } i=1,\dots,N.$$ }

A key element of this section will be the computation of the Experimental Order of Accuracy (EOA) of the proposed strategies, which is expected to coincide with the theoretical order of accuracy given by the high-order reconstructions involved in the corresponding numerical schemes. Let us begin with a description of the practical computation of the EOA. \\
Regarding the RKDG schemes, if $\rho^{\Delta x}(x,T)$ and $\rho^{\Delta x/2}(x,T)\in V_h^k$  are the solutions computed with $M$ and $2M$ mesh cells respectively,  the L${}^1$-error is computed by
\begin{align*}
e(\Delta x)&=\|\rho^{\Delta x}(x,T)-\rho^{\Delta x/2}(x,T)\|_{L{}^1} \\
&=\sum_{j=1}^M \int_{I_{2j-1}} | \rho^{\Delta x}_{j}(x,T)-\rho^{\Delta x/2}_{2j-1}(x,T)|dx+
\int_{I_{2j}} | \rho^{\Delta x}_j(x,T)-\rho^{\Delta x/2}_{2j}(x,T)|dx,
\end{align*}
where the integrals are computed with a high-order quadrature formula. As far as the FV schemes are concerned, the L${}^1$-error is computed as
$$e(\Delta x)=\|\rho^{\Delta x}(x,T)-\rho^{\Delta x/2}(x,T)\|_{L{}^1}=\Delta x \sum_{j=1}^M | \rho^{\Delta x}_{j}(x_j,T)-\tilde{\rho}_{j}(x_j)|dx,$$
where $\tilde{\rho}_{j}(x)$ is a third-degree polynomial reconstruction of $\rho^{\Delta x/2}_{j}(x,T)$ at point $x_j$, i.e.,
$$\tilde{\rho}_{j}(x_{j}) =\frac{9}{16}\left( \rho^{\Delta x/2}_{2j}+\rho^{\Delta x/2}_{2j-1}\right) -\frac{1}{16}\left(\rho^{\Delta x/2}_{2j+1}+\rho^{\Delta x/2}_{2j-2} \right).
$$
In both cases, the EOA is naturally defined by
$$\gamma(\Delta x)=\log_2\left(e(\Delta x)/e(\Delta x/2)\right).$$

In the following numerical tests, the CFL number is taken  as $\mathrm{C}_{\mathrm{CFL}}=0.2, 0.1, 0.05$ for RKDG1, RKDG2 and RKDG3  schemes respectively, and  $\mathrm{C}_{\mathrm{CFL}}=0.6$ for
FV-WENO3 and FV-WENO5 schemes. For RKDG3 and FV-WENO5 cases $\Delta t$ is further reduced in the accuracy tests.
\subsection{Test 1a: non-local LWR model}
We consider the Riemann problem
\begin{equation*}
\rho(x,0)= \begin{cases} 0.95 & x\in [-0.5,0.4], \\
   0.05 & \hbox{otherwise},
   \end{cases}
\end{equation*}
{with absorbing boundary conditions}
and compute the numerical solution of \eqref{nl_claw}-\eqref{LWRnl} at time $T=0.1$ with $\eta=0.1$ and $w_\eta(x)=3(\eta^2-x^2)/(2\eta^3)$.
We set $\Delta x=1/800$ and compare the numerical solutions obtained with the FV-WENO3, FV-WENO5, and for  RKDG1, RKDG2  and RKDG3 we use a generalized slope limiter \eqref{slopelimiter} with $M_b=35$.
The results  displayed in Fig. \ref{fig_nlLWR} are compared with respect to the reference solution which was obtained with FV-WENO5 scheme and $\Delta x=1/3200$. In Fig\ref{fig_nlLWR} (b) we observe that RKDG schemes are much more accurate than FV-WENO3 and even FV-WENO5.
\begin{figure}
\centering
\begin{tabular}{cc}
(a) & (b) \\
\includegraphics[scale=0.45]{test1a_a.pdf}&\includegraphics[scale=0.45]{test1a_b.pdf}
\end{tabular}
\caption{Test 1a. (a) Solution of Riemann problem with $w_\eta(x)=3(\eta^2-x^2)/(2\eta^3)$ at $T=0.1$. We compare solutions computed with  FV-WENO and
 RKDG schemes  using $\Delta x=1/800$. (b) Zoomed view of the left discontinuity in Fig (a). Reference solution is computed with FV-WENO5 with  $\Delta x=1/3200$. }
\label{fig_nlLWR}
\end{figure}

\subsection{Test 1b: non-local LWR model}
Now, we consider an initial condition with a small perturbation $\rho_0(x)=0.35-(x-0.5)\exp{(-2000(x-0.5)^2)}$ and an increasing kernel function
$\omega_{\eta}=2x/\eta^2$, with $\eta=0.05$  {and periodic boundary conditions}.
According to \cite{BG_2016, GS_2016}, the non-local LWR model is not stable with increasing kernels, in the sense that {oscillations develop in
short time}. Fig. \ref{fig_nlLWR2} displays the numerical solution with different RKDG and FV-WENO schemes with $\Delta x=1/400$ at time $T=0.3$.
The profile provided by the first order scheme proposed in \cite{BG_2016} is also included. The reference solution is computed with a FV-WENO5 scheme with $\Delta x=1/3200$. We observe that the numerical solutions obtained with the high-order schemes provide better approximations of the oscillatory shape of the solution than the first-order scheme, and that RKDG schemes give better approximations than the FV-WENO schemes.

\begin{figure}
\centering
\begin{tabular}{cc}
(a) & (b) \\
\includegraphics[scale=0.45]{test1b_a.pdf}&\includegraphics[scale=0.45]{test1b_b.pdf}\\
\end{tabular}
\caption{ Test1b. Numerical solution non-local LWR model  with $\omega_{\eta}=2x/\eta^2$, $\eta=0.05$ and $\rho_0(x)=0.35-(x-0.5)\exp{(-2000(x-0.5)^2)}$.
We compare solutions computed with FV Lax-Friedrichs, FV-WENO  and  RKDG schemes, using $\Delta x=1/400$. Reference solution is computed with FV-WENO5 with  $\Delta x=1/3200$. }
\label{fig_nlLWR2}
\end{figure}

\subsection{Test 2: non-local sedimentation model}
We now solve \eqref{nl_claw}-\eqref{sednl}-\eqref{ker_sed} with the piece-wise constant initial datum
\begin{equation*}
\rho(x,0)= \begin{cases} 0 & x\leq 0, \\
0.5 & 0<x< 1, \\
   1 & x\geq1,
   \end{cases}
\end{equation*}
{with zero-flux boundary conditions} in the interval $[0,1]$, and compute the solution at  time $T=1$, with parameters $\alpha=1$, $n=3$ and $a=0.025$.
We set $\Delta x=1/400$ and compute the solutions with different RKDG and FV-WENO schemes, including the
first-order Lax-Friedrichs scheme used in \cite{BBKT_2011}. The results displayed in Fig. \ref{fig_nlsed} are compared to
a reference solution computed with FV-WENO5 and  $\Delta x=1/3200$.  Compared to the reference solution, we observe that
 RKDG1 is more accurate than FV-WENO3, and FV-WENO5 more accurate than RKDG3 and RKDG2 (Fig. \ref{fig_nlsed}).
In particular,  we observe that the numerical solutions obtained with the high-order schemes provide better approximations of the oscillatory shape of the solution than the first order scheme.
These oscillations can possibly be explained as {\it layering phenomenon} in sedimentation \cite{siano1979layered}, which denotes a traveling staircases pattern, looking
 as several distinct bands of different concentrations. We observe in Fig. \ref{fig_nlsedhis}, where the evolution of $\rho^{h}(\cdot,t)$ is displayed for $t\in[0,5]$,
 that this layering phenomenon
 is observed with high order schemes, in this case RKDG1 and FV-WENO5, instead of Lax-Friedrichs scheme.

\begin{figure}[t]
\begin{tabular}{cc}
\includegraphics[scale=0.45]{test2_a.pdf}&\includegraphics[scale=0.45]{test2_b.pdf}
\end{tabular}
\caption{Test2. Riemann problem for non-local sedimentation model. Comparing numerical solution computed with FV Lax-Friedrichs,
FV-WENO schemes and  RKDG schemes using limiter function with $M_b=50$ using $\Delta x=1/400$. Reference solution is computed with FV-WENO5 with  $\Delta x=1/3200$.}
\label{fig_nlsed}
\end{figure}

\begin{figure}
\begin{tabular}{ccc}
\fbox{\includegraphics[scale=0.3,bb=40 10 520 400]{test2a_a.png}}&\fbox{\includegraphics[scale=0.3,bb=40 10 520 400]{test2a_b.png}}&
\fbox{\includegraphics[scale=0.3,bb=40 10 520 400]{test2a_c.png}}
\end{tabular}
\caption{Test 2. Nonlocal sedimentation model. History solution for $t\in[0,5]$ computed with LxF (left) RKDG1 (center) and WENO 5 (right) with $\Delta x=1/400$.
We observe that the same kind of layering phenomenon reported in \cite{siano1979layered} seems to be observed with high order schemes RKDG1 and FV-WENO5 instead of LxF scheme.}
\label{fig_nlsedhis}
\end{figure}
\subsection{Test 3: Experimental Order of Accuracy for {\it local} conservation laws}
In this subsection we compute the EOA for local conservation laws. More precisely, we first consider the
advection equation $\rho_t+\rho_x=0,$ and the initial datum $\rho_0(x)=0.5+0.4\sin(\pi x)$ for $x\in[-1,1]$ with periodic boundary conditions. We compare the numerical approximations
obtained with $\Delta x=1/M$ and $M=20,40,80,160,320,640$ at time $T=1$. RKDG schemes are used without limiting function and $L^1$-errors are collected in Table \ref{EOA_advection}.
We observe that the correct EOA is obtained for the different schemes, moreover, we observe that the $L^{1}$-errors obtained with  FV-WENO3 and RKDG1 are comparable, and also the
$L^{1}$-errors  for  FV-WENO5 and RKDG3.
We also consider the nonlinear local LWR model   $\rho_t+(\rho(1-\rho))_x=0,$ with initial datum $\rho_0(x)=0.5+0.4\sin(\pi x)$ for $x\in[-1,1]$ and periodic boundary conditions. A shock wave appears at time $T=0.3$. We compare the numerical approximations obtained with $\Delta x=1/M$ and $M=20,40,80,160,320,640$ at  time $T=0.15$. RKDG schemes are used without limiters and $L^1$-errors are given in Table \ref{EOA_LWR}. We again  observe that the correct EOA is obtained for the different schemes, and the $L^{1}$-errors obtained with  FV-WENO3 and RKDG1 are comparable, and also the
$L^{1}$-errors  for  FV-WENO5 and RKDG3.

\begin{table}[h!]
  \centering
  \begin{tabular}{ |c|c|c|c|c|c|c||c|c|c|c|}\hline
     &  \multicolumn{2}{|c|}{$k=1$}  &  \multicolumn{2}{|c|}{$k=2$}  &  \multicolumn{2}{|c||}{$k=3$} &  \multicolumn{2}{|c|}{FV-WENO$3$}&  \multicolumn{2}{|c|}{FV-WENO$5$}   \\ \hline
    $\tiny{1/\Delta x}$ & $L^1$-err  &\tiny{$\gamma(\Delta x)$} & $L^1$-err  &\tiny{$\gamma(\Delta x)$}   & $L^1$-err  &\tiny{$\gamma(\Delta x)$} & $L^1$-err  &\tiny{$\gamma(\Delta x)$}
    & $L^1$-err  &\tiny{$\gamma(\Delta x)$} \\ \hline\hline
    $20$   &1.80E-03   &--       &9.70E-05  &  --      & 1.00E-06 & --     &3.72E-02&--&4.63E-04&-- \\
    $40$   &4.30E-04   &{2.06}&1.28E-05   & 2.92  & 6.04E-08&  4.05& 1.17E-02&1.66 & 1.41E-05  &  5.03  \\
    $80$   &1.06E-04   & 2.02 & 1.63E-06  & 2.96 &  3.92E-09& 3.94 & 2.85E-03& 2.04&  4.33E-07&  5.02 \\
    $160$&2.64E-05    & 2.00 & 2.06E-07  & 2.98 &  2.58E-10&  3.92& 4.24E-04& 2.74& 1.35E-08 &  5.00 \\
    $320$ &6.61E-06  & 2.00 &2.59E-08    & 2.99&1.51E-11&3.32&3.06E-05  & 3.79& 1.15E-11& 5.20\\ \hline
  \end{tabular}
  \caption{Test 3: Advection equation.  Experimental order of accuracy for  FV-WENO schemes and RKDG schemes without Limiter
  at $T=1$  with initial condition $\rho_0(x)=0.5+0.4\sin(\pi x)$ on $x\in[-1,1]$.   }
  \label{EOA_advection}
\end{table}

\begin{table}[h]
  \centering
  \begin{tabular}{ |c|c|c|c|c|c|c||c|c|c|c|}\hline
     &  \multicolumn{2}{|c|}{$k=1$}  &  \multicolumn{2}{|c|}{$k=2$}  &  \multicolumn{2}{|c||}{$k=3$} &  \multicolumn{2}{|c|}{WENO$3$}&  \multicolumn{2}{|c|}{WENO$5$}   \\ \hline
    $\tiny{1/\Delta x}$ & $L^1$-err  &\tiny{$\gamma(\Delta x)$} & $L^1$-err  &\tiny{$\gamma(\Delta x)$}   & $L^1$-err  &\tiny{$\gamma(\Delta x)$} & $L^1$-err  &\tiny{$\gamma(\Delta x)$}
    & $L^1$-err  &\tiny{$\gamma(\Delta x)$} \\ \hline\hline
    $20$   &2.03E-03   & -- & 1.88E-04 &-- &5.03E-06  &--&6.92E-03&--&2.80E-04&-- \\
    $40$    & 4.98E-04 & 2.02 &  3.06E-05& 2.62 &  2.81E-07 &  4.16& 2.37E-03&1.77&1.41E-05 &  4.31       \\
    $80$     & 1.23E-04 & 2.01  &  4.71E-06& 2.69 & 1.72E-08  & 4.03 & 5.95E-04&1.99 &6.14E-07&4.52   \\
     $160$  &3.08E-05  &2.00   & 7.11E-07 &   2.72 &  1.05E-09& 4.02& 8.20E-05& 2.86&  2.62E-08& 4.55 \\
     $320$  &7.71E-06 &2.00  &1.06E-07&2.74&6.62E-11&3.99 & 5.47E-06&3.90 & 8.61E-10&  4.92  \\\hline
  \end{tabular}
  \caption{Test 3: Classical LWR equation. Experimental order of accuracy  for  FV-WENO schemes and RKDG schemes without Limiter
  at $T=0.15$  with initial condition $\rho_0(x)=0.5+0.4\sin(\pi x)$ on $x\in[-1,1]$.  }
  \label{EOA_LWR}
\end{table}

\subsection{Test 4: Experimental Order of Accuracy for the {\it non-local} problems}
We now consider the non-local LWR and sedimentation models. Considering the non-local LWR model, we compute the solution of \eqref{nl_claw}-\eqref{LWRnl} with initial data $\rho_0(x)=0.5+0.4\sin(\pi x)$ for $x\in[-1,1]$, { periodic boundary conditions}, with $\eta=0.1$ and $\Delta x=1/M$ and $M=80,160,320,640,1280$ at final time $T=0.15$.  The results are given for different kernel functions $w_\eta(x)$ in Table \ref{EOA_nl_LWR}. For RKDG schemes, we obtain the correct EOA. For the FV-WENO schemes, the EOA is also correct thanks to the in-cell quadratic reconstructions used to
compute the non-local terms. \\
For the non-local sedimentation model, we compute the solution of \eqref{nl_claw}-\eqref{sednl}-\eqref{ker_sed} with initial data $\rho_0(x)=0.8\sin(\pi x)^{10}$ for $x\in[0,1]$ with $\eta=0.025$, $\alpha=1$, $V(\rho)=(1-\rho)^3$ and $\Delta x=1/M$ with $M=100,200,400,800,1600,3200$ at final time $T=0.04$. The results are given in Table \ref{EOA_nl_LWR}.

 \begin{table}
  \centering
  \begin{tabular}{ |c||c|c|c|c|c|c|c| }\hline
    & &  \multicolumn{2}{|c|}{$w_\eta(x)=1/\eta$}  &  \multicolumn{2}{|c|}{$w_\eta(x)=2(\eta-x)/\eta^2$}  &  \multicolumn{2}{|c|}{$w_\eta(x)=3(\eta^2-x^2)/(2\eta^3)$}  \\ \hline
    &$1/\Delta x$ & $L^1-$error  &$\gamma(\Delta x)$ & $L^1-$error  &$\gamma(\Delta x)$  &  $L^1-$error  &$\gamma(\Delta x)$ \\ \hline\hline
     \multirow{5}{*}{\rotatebox[origin=c]{90}{ FVWENO3}}&$40$  & 1.49E-03   & --   & 1.64 -03   & --    & 1.78E-03     & -- \\
    &$80$  & 3.27E-04   &   2.18  &3.39E-04    & 2.27     &  3.53E-04     &   2.33   \\
    &$160$ & 4.64E-05   & 2.81   & 4.63E-05   & 2.87     &4.69E-05       &      2.91 \\
    &$320$ &  3.37E-06    &  3.78   &  3.44E-06   &  3.74     &    3.57E-06     &    3.71 \\
     &$640$ & 2.29E-07    & 3.87   & 2.41E-07   & 3.83     &  2.50E-07      & 3.83     \\ \hline

    \multirow{5}{*}{\rotatebox[origin=c]{90}{FVWENO5}}&$40$  &7.54E-06  & --  &  8.65E-06 & -- & 9.69E-06  & \\
   & $80$  & 3.36E-07     &4.48    &3.75E-07  & 4.52 & 4.17E-07    & 4.53\\
   & $160$ &1.21E-08     &4.79   &1.44E-08   &4.70  & 1.64E-08   & 4.66\\
   & $320$ &2.80E-10     & 5.43  & 4.52E-10 & 4.99 &   5.85E-10 & 4.81 \\
    & $640$ &6.71E-12    &  5.38   &1.85E-11  & 4.61 &  2.70E-11   & 4.43  \\ \hline\hline

      \multirow{5}{*}{\rotatebox[origin=c]{90}{RKDG $k=1$}}&$40$  & 4.72E-04  &  --& 4.75E-04   & --& 4.76E-04   & --\\
   & $80$  &1.17E-04      &   2.00    & 1.18E-04  & 1.99  &  1.19E-04 &1.99  \\
   & $160$ & 2.94E-05    &   2.00   & 2.97E-05  & 1.99  & 2.99E-05   &1.99  \\
   & $320$ & 7.36E-06    &   1.99  & 7.45E-06  & 1.99 &   7.49E-06  & 1.99 \\
    & $640$ & 1.84E-06     &  1.99    & 1.86E-06  & 1.99 & 1.87E-06    &  1.99  \\ \hline

        \multirow{5}{*}{\rotatebox[origin=c]{90}{RKDG $k=2$}}&$40$  & 1.81E-05    &  --& 1.21E-05  & --& 1.15E-05    & --\\
   & $80$  &  2.63E-06     & 2.78 & 1.77E-06  & 2.77 &  1.65E-06 & 2.80\\
   & $160$ &  3.70E-07  & 2.82  &  2.54E-07 & 2.79  & 2.40E-07  & 2.78 \\
   & $320$ &  3.96E-08    & 2.89  & 3.58E-08   & 2.82  & 3.43E-08   & 2.80\\
    & $640$ & 5.20E-09  & 2.93  & 4.03E-09 & 2.86 & 4.81E-09  &2.83   \\ \hline

         \multirow{5}{*}{\rotatebox[origin=c]{90}{RKDG $k=3$}}&$40$  &1.93E-07   &  --&1.86E-07   & --& 1.68E-07    & --\\
   & $80$  &1.21E-08     & 3.99 &1.20E-08   &3.95  &1.05E-08   & 4.00\\
   & $160$ &7.55E-10   & 4.00 &7.65E-10   &3.97   &6.65E-10   & 3.98\\
   & $320$ &4.87E-11   & 3.95 & 4.97E-11  & 3.94 & 4.35E-11  &3.93 \\
    & $640$ & 3.41E-12 &  3.83 &3.51E-12  & 3.82  & 3.15E-12  & 3.78  \\ \hline

  \end{tabular}
  \caption{Test 4: Non-local LWR model. Experimental order of accuracy. Initial condition $\rho_0(x)=0.5+0.4\sin(\pi x)$, $\eta=0.1$, numerical solution at $T=0.15$ for
  FV-WENO and RKDG schemes without generalized slope limiter.}
  \label{EOA_nl_LWR}
\end{table}

\begin{table}[h]
  \centering
  \begin{tabular}{ |c|c|c|c|c|c|c||c|c|c|c|}\hline
     &  \multicolumn{2}{|c|}{$k=1$}  &  \multicolumn{2}{|c|}{$k=2$}  &  \multicolumn{2}{|c||}{$k=3$} &  \multicolumn{2}{|c|}{WENO$3$}&  \multicolumn{2}{|c|}{WENO$5$}   \\ \hline
    $\tiny{1/\Delta x}$ & $L^1$-err  &\tiny{$\gamma(\Delta x)$} & $L^1$-err  &\tiny{$\gamma(\Delta x)$}   & $L^1$-err  &\tiny{$\gamma(\Delta x)$} & $L^1$-err  &\tiny{$\gamma(\Delta x)$}
    & $L^1$-err  &\tiny{$\gamma(\Delta x)$} \\ \hline\hline
    $100$   & 7.98E-05 & --     & 2.90E-06 & --&4.25E-07   &--  & 2.72E-04 & -- & 2.65E-06 &  --  \\
    $200$   &1.98E-05  &2.0    & 4.64E-07 & 2.6  & 3.95E-08  &3.5  &6.02E-05 &2.1  & 1.01E-07 &   4.7     \\
    $400$   & 4.95E-06&  2.0   & 7.75E-08 & 2.6  & 3.37E-09  &3.6  & 7.87E-06 &2.9  & 3.22E-09 &   4.9 \\
     $800$  & 1.23E-06 &  2.0  & 1.23E-08 &  2.6 &  2.47E-10  &3.8  &5.50E-07 &3.8  &1.11E-10  & 4.8 \\
     $1600$& 3.09E-07 &  2.0  & 2.02E-09 & 2.6  &  1.22E-11 & 4.2 & 4.64E-08 &3.7   &4.02E-12  & 4.7 \\\hline
  \end{tabular}
  \caption{Test 4: Non-local sedimentation problem. Initial condition $\rho_0(x)=0.8\sin(\pi x)^{10}$.
  Experimental order of accuracy at $T=0.04$ with $f(\rho)=\rho(1-\rho)$, $V(\rho)=(1-\rho)^3$, $\omega_\eta(x):=\eta^{-1}K(\eta^{-1}x)$ with $\eta=0.025$.}
  \label{EOA_nl_sed}
\end{table}

\section*{Conclusion}
In this paper we developed high order numerical approximations of the solutions of non-local conservation laws in one space dimension motivated by application to traffic flow and sedimentation models.
We propose to design Discontinuous Galerkin (DG) schemes which can be applied in a natural way and Finite Volume WENO (FV- WENO) schemes where we have used quadratic polynomial reconstruction in each cell to evaluate the convolution term in order to obtain the high-order accuracy. The numerical solutions obtained with high-order schemes provide better approximations of the oscillatory shape of the solutions
than the first order schemes. We also remark that  DG schemes are more accurate but expensive, while FV-WENO are less accurate but also less expensive. The present work thus establishes the preliminary basis for a deeper study and optimum programming of the methods, so that efficiently plots could then be considered.
\section*{Acknowledgements}
This research was conducted while
LMV was visiting Inria Sophia Antipolis M\'editerran\'ee and the Laboratoire de Math\'ematiques de Versailles,
with the support of  Fondecyt-Chile project  11140708 and  ``Poste Rouge'' 2016 of  CNRS -France.

The authors thank R\'egis Duvigneau for useful discussions and advices.

{ \small