each delivery point to its nearest open warehouse.
Figure 1 presents a WLP solver in OscaR.cbls.
The model is composed of an array of Boolean vari-
ables indicating which warehouses are open. The as-
sociated constraints are the open warehouses and the
distances between points and their nearest open ware-
house. The objective function is the total cost.
The search procedure is declared as fol-
lows: the base neighborhoods used are: assign-
Neighborhood, where the value of one ware-
house is changed; swapsNeighborhood, where
the values of two warehouses are swapped; and
randomSwapNeighborhood, where the values of a
random number of warehouses are swapped. In this
problem, we use two neighborhood combinators:
bestSlopeFirst evaluates a set of neighborhoods
and select the move that decreases the most the
objective function; onExhaustRestartA f ter evaluates
a neighborhood (here, the bestSlopeFirst) and select
its moves until no more moves are found, then
it performs a restart of the search using a second
neighborhood to find a new starting point. The stop
criteria is a given number of consecutive restarts
without improving the objective function.
2.3 Parallelization of Local Search
Since the beginnings of Operational Research, the
first algorithms and their improvements followed the
sequential nature of the computers where those algo-
rithms ran. With the arrival of parallel computing, the
first approaches to parallelization were based on sim-
ple changes on the original sequential algorithm, for
instance, replacing a loop with a parallel loop. This
is not a trivial task, since some algorithms use se-
quential mechanisms that are lost when the algorithm
is parallelized. An example of this loss is given in
(Isoart and R
´
egin, 2020) in a parallel constraint solver
for the Travelling Salesman Problem. As a result, at
some scale, parallel algorithms may be slower than an
optimal sequential algorithm.
Since the first theoretical works about local search
were developed (Aarts and Lenstra, 1997), several ap-
proaches were considered for parallelizing different
aspects of local search algorithms. A first work is
presented at (Verhoeven and Aarts, 1995), where a
general approach independent of the problem is de-
scribed. In that general approach we can distinguish
between single-walk algorithms, where the solution
space is explored only once, and multiple-walk algo-
rithms, where several explorations are triggered con-
currently and may or may not communicate with each
other. In both kinds of algorithms, parallelism arises
in other aspects like neighborhood exploration and
move committing. The latest can be made in a single-
step way, it means that only one move is commit-
ted at a time after a parallel exploration of neigh-
borhoods, or in a multiple-step way, where several
moves are committed in parallel. Most interesting ap-
plications use multi-walk based algorithms. For in-
stance, in (Handa et al., 2004), a distributed algorithm
with a worker-supervisor architecture is presented.
The local search algorithm consists on splitting the
solution space and trigger several workers that per-
forms the search and specially the neighborhood ex-
ploration. Each worker can use a different neighbor-
hood. The supervisor waits for the solutions found by
each worker and performs the actual move commit-
ting. A recent work in (Codognet et al., 2018) pro-
poses an extension of multiple-walk algorithms with
a cooperation layer between the different explorers.
The resulting framework is called Cooperative Pa-
rallel Local Search (Munera et al., 2014), and is im-
plemented in the X10 parallel programming language.
After their design of Comet programming lan-
guage, (Michel et al., 2009) propose parallel con-
structs to extend Comet. The proposed constructs
are quite similar to the ones used in Java: moni-
tors for synchronized blocks, threads, processes, and
shared objects, as well as parallel loop statements.
Those language constructors support the development
of both single-walk and multi-walk algorithms.
The framework we propose in this paper is a
multi-walk approach, based on the Actor model,
where workers perform single neighborhood explo-
rations of a part of the search space, as it is explained
in next section.
3 A WORKER-SUPERVISOR
ARCHITECTURE
Before this work, local search solvers in OscaR.cbls
run as monolithic applications in a mono-thread en-
vironment. In this section, we present the architec-
tural extensions which support the distribution of lo-
cal search in a multi-threading environment.
The architecture shown in Figure 2 is based on
the Akka actor model (Lightbend Inc., 2020). Akka
makes easier the implementation of complex soft-
ware communication protocols, and is also able to
support network communication in a seamless way.
Our architecture follows a Supervisor-Worker pattern,
where a supervisor actor dispatches search requests to
worker actors, who synchronize their search results to
work giver actors. Work givers are associated to spe-
cific “remote” neighborhoods.
In the context of a multi-threaded local search
ICORES 2021 - 10th International Conference on Operations Research and Enterprise Systems
250