<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Solving Assembly Line Workload Smoothing Problem via Answer Set Programming</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Orkunt Sabuncu ?</string-name>
          <email>orkunt.sabuncu@tedu.edu.tr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mehmet Cem Şimşek</string-name>
          <email>mcem.simsek@tedu.edu.tr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>TED University</institution>
          ,
          <addr-line>Ankara</addr-line>
          ,
          <country country="TR">Turkey</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Assembly line balancing problems aim to assign production tasks to workstations or people while satisfying some constraints and optimizing various criteria such as production rate or number of workstations needed. One specific instance is Simple Assembly Line Workload Smoothing Problem (SALBP-WS) that focuses on smoothing workloads of all workstations. This is important for establishing equity among workers or maintaining sustainable conditions for workstations. In this work, we develop several Answer Set Programming encodings for solving SALBP-WS. The performed experiments showcase better scalability results compared to problem specific exact methods based on branch and bound technique. Additionally, we propose a new criterion that handles the workstation idle times hierarchically, as a measure of smoothness of an assignment.</p>
      </abstract>
      <kwd-group>
        <kwd>Answer set programming Assembly line balancing load smoothing</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Another variant of SALBP is the workload smoothing problem (SALBP-WS),
which is NP-hard [1]. SALBP-WS is an optimization problem based on
SALBPF and aims at finding a feasible assignment such that resulting workloads of
workstations are balanced as much as possible. This is important for establishing
equity among workers or maintaining sustainable conditions for workstations. In
this work, we are concentrating on the SALBP-WS.</p>
      <p>Answer Set Programming (ASP) is a declarative problem solving paradigm
with roots in Knowledge Representation and Reasoning (KRR). The simple but
powerful language of ASP backed with highly efficient solver implementations
make it applicable to various problems from broad range of domains [4, 6].</p>
      <p>We developed a succinct ASP encoding of the SALBP-WS thanks to some
powerful features of the ASP language like aggregates and optimization statements.
To the best of our knowledge, this work is the first application of ASP to the
problem. The resulting logic program can also be a foundation for other ALBPs.
The experiments we have performed showcase better scalability results compared
to problem specific SALBP-WS solvers.</p>
      <p>Additionally, we propose a novel optimization criterion for the SALBP-WS to
measure the smoothness of an assignment. Our motivation is to ease the burden
on the ASP solver of large numbers appearing as optimization values in other
criteria. The new hierarchical idle times (HIT ) criterion aims to minimize idle
times of workstations hierarchically. The use of HIT in our encoding leads to
significant improvement in the solving performance. Apart from this, HIT can
be useful in general for ALBPs.</p>
      <p>In what follows, we formally define the SALBP-F and SALBP-WS. In Section 3,
we describe our ASP encodings. Several experiments are performed using the
openly available problem instances and the results of these are explained in
Section 4. Finally, we conclude with discussion and future line of research.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Problem Definition</title>
      <p>First, we define the feasibility version of the problem. Next, we cover the
SABLPWS when an optimization function based on various smoothness criteria is added
on top of the feasibility problem.
2.1</p>
      <p>The Simple Assembly Line Balancing Feasibility Problem
(SALBP-F)
Consider n tasks and let T be the set ft1; : : : ; tng of all these tasks. For a given
task t, t(t) gives the amount of time, which is named as task time, needed by any
workstation for fully processing t. We assume all workstations are equally equipped
and a task can be processed by any workstation. Considering a single-model
assembly line with m workstations, let S be the set fs1; : : : ; smg of all workstations.
Note that workstations are organized sequentially along the assembly line. Let i
be the function that gives the order of a workstation in the line. The common
setting adopted in open datasets of the literature is assigning positive integers as
ids of workstations in a way that the one with 1 as an id is the first workstation
in the assembly line. Following this setting, i(sj) = j. In a running assembly line
an end product is produced at the end of each cycle. Let c be this cycle time.
The main task of an assembly line balancing problem is to assign a task to a
workstation. Let xts be a decision variable such that xts = 1 whenever task t is
assigned to workstation s and xts = 0 otherwise. The workload of a workstation
is the total time needed for processing all tasks assigned to it. Considering the
line balancing denoted by assignment decision variables, the workload time of a
workstation s 2 S is calculated by the following equation.</p>
      <p>
        wl(s) = X t(t) xts
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
t2T
      </p>
      <p>Additionally, tasks have to be performed in some predefined order, which
can be due to the nature of the product or the organizational constraints, such
that no task can be performed unless all of its predecessors are complete. This
condition and the fixed order of workstations in the assembly line constrains
the assignment of tasks to workstations. To this end, we have an input directed
acyclic graph P = (T ; E), which is called the precedence graph. The vertices are
all the tasks and an edge (u; v) 2 E denotes that i(a) i(b), where u; v 2 T ,
xau = 1 and xbv = 1. Recall that i(a) designates the order of a in the assembly
line via an ordinal number.</p>
      <p>Now, we can formally define SALBP-F. Given T , S, c and P, the SALBP-F
problem aims to find an assignment of tasks to workstations via setting xts = 1 or 0
for all t 2 T and s 2 S while satisfying the following constraints.</p>
      <p>X xts = 1
s2S
X t(t) xts
t2T</p>
      <p>(8t 2 T )
c</p>
      <p>(8s 2 S)
X i(a) xau</p>
      <p>X i(b) xbv</p>
      <p>(8u; v 2 T ; (u; v) 2 E)
a2S b2S</p>
      <p>
        The constraint (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) forces that each task must be assigned to a unique
workstation. Additionally, the workload of a workstation cannot be greater than the
cycle time of the assembly line. This is modeled by the constraint (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ). Note that
the left side of the inequality in (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) is the workload of s as given in (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ). The
constraint (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) makes sure that the precedence graph is respected in an assignment.
Basically, for an edge (u; v) in this graph forming a precedence relation between
u and v necessitates that task v is assigned to a workstation that the task u
is also assigned to or to a one that comes later from the workstation that u is
assigned to considering the order of workstations.
2.2
      </p>
      <p>The Simple Assembly Line Workload Smoothing Problem
(SALBP-WS)
The SALBP-WS is an optimization problem based on SALBP-F. It is also known
as the Type III problem [5]. The SALBP-WS aims at finding an assignment such
that resulting workloads of workstations are balanced as much as possible given
the assignment satisfies the constraints of the feasibility variant SALBP-F.</p>
      <p>An assignment is balanced for workstations when their workloads are equal
or close to each other as much as possible. In order to achieve this optimization
objective, various optimization criteria have been proposed. The two prominent
ones are smoothness index and mean absolute deviation of workloads. The
smoothness index (SI) value is calculated by the sum of squared differences
between workstation workloads and the cycle time as shown in the equation
below [1, 10].</p>
      <p>SI =</p>
      <p>X (c
wl(s))2</p>
      <p>min SI
s2S
The mean absolute deviation of workloads (MAD) value is calculated by the sum
of absolute deviations of workstation workloads from the average workload (i.e.,
the sum of all task times divided by the number of workstations) [11].</p>
      <p>M AD = X wl(s)
s2S</p>
      <p>P
t2T t(t)
jSj
min M AD</p>
      <p>
        The SALBP-WS utilizing SI as the optimization criterion aims to minimize
the SI value of a feasible solution. Hence, its definition is the addition of the
whole objective (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) to the setting of SALBP-F. In case MAD is utilized as the
criterion in SALBP-WS, the objective (
        <xref ref-type="bibr" rid="ref6">6</xref>
        ) is added.
      </p>
      <p>The following running example is selected from [2].</p>
      <p>
        Example 1. In an single-model assembly line there are 5 workstations; S =
fs1; : : : ; s5g and their order is given by i(sx) = x. The production needs 10 tasks
T = f1; : : : ; 10g, where the precedence graph P is depicted in Figure 1. The
task times are also given in upper right corners of task nodes in P (for instance,
t(
        <xref ref-type="bibr" rid="ref8">8</xref>
        ) = 2).
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
(
        <xref ref-type="bibr" rid="ref6">6</xref>
        )
3
4
1
4
6
5
2
5
6
4
7
6
4
5
8
2
9
10
10
      </p>
      <p>
        1
Considering the assembly line configuration given in Example 1, a solution for
the SALBP-F is shown diagrammatically in Figure 2. The solution assigns f3; 4g,
f1g, f2; 5g, f6; 7; 8g and f9; 10g to workstations s1; s2; s3; s4 and s5, respectively.
Consequently, the workload times wl(s4) = 11 and wl(s5) = 11 (i.e., they
have 0 idle times), and for the other workstations wl(s1) = 9, wl(s2) = 6 and
wl(s3) = 10 (i.e., they have 2, 5 and 1 idle times, respectively). Note that SI value
of the feasible solution shown in Figure 2 is 22 +52 +12 +02 +02 = 30. Additionally,
its M AD value is j9 9:4j+j6 9:4j+j10 9:4j+j11 9:4j+j11 9:4j = 7:6. It is
not a SI optimal solution. Figure 3 depicts a solution for the SALBP-WS problem
of the assembly line configuration given in Example 1. Note that the workstations
have 2, 1, 1, 4 and 0 idle times, respectively. The SI value of this optimal solution
is 22 + 12 + 12 + 42 + 02 = 22. Regarding the M AD criterion, the solution in
Figure 3 has j9 9:4j + j10 9:4j + j10 9:4j + j7 9:4j + j11 9:4j = 5:6 as the
M AD value. Actually, it is also an optimal solution for the SALBP-WS problem
when M AD is used as the criterion.
In our initial experiments we have observed that large numbers as optimization
values of SI and M AD criteria (especially the quadratic value in (
        <xref ref-type="bibr" rid="ref5">5</xref>
        )), put a strain
on the ASP solver. In order to improve solving performance we have developed a
novel criterion for measuring workload smoothness. The hierarchical idle times
(HIT ) value of an assignment is a vector of numbers of workstations grouped by
hierarchically decreasing idle times starting from the maximum idle time.
      </p>
      <p>
        HIT = ham; : : : ; a1i
s.t. ai = j fsxjc
wl(sx) = ig j; i
c
(
        <xref ref-type="bibr" rid="ref7">7</xref>
        )
The HIT value of the feasible assignment in Figure 2 is h1; 0; 0; 1; 1i. Note that
there is 1 workstation with idle time of 5 (s2), 1 workstation with idle time of
2 (s1) and 1 workstation with idle time of 1 (s3). The 0 values in the vector
correspond to the number of workstations with idle times 4 and 3. We also do
not consider the number of workstations with no idle times (for instance, the
feasible assignment has 2 workstations with 0 idle time). Additionally, 0 values
for the number of workstations with idle times 5 &lt; i c are skipped.
      </p>
      <p>When we want to utilize the HIT criterion, the SALBP-WS problem is
modeled as a multi-objective lexicographical optimization problem unlike the
cases in SI and M AD. Note that ASP has the capacity of modeling such
multi-objective optimization problems. We try to minimize the HIT value of an
assignment in a lexicographical way such that along the optimization minimizing
the number of workstations with i idle times is given more priority than minimizing
the number of workstations with j idle times where j &lt; i. Formally, an assignment
with a HIT value ha1; : : : ; ai; : : : ; axi, is better than an assignment with a HIT
value hb1; : : : ; bi; : : : ; bxi given that ak = bk for all 1 k &lt; i and ai &lt; bi.</p>
      <p>Hence, SALBP-WS can also be modeled by adding the following optimization
objective to the setting of SALBP-F.</p>
      <p>
        lexmin HIT
(
        <xref ref-type="bibr" rid="ref8">8</xref>
        )
      </p>
      <p>For Example 1, the solution shown in Figure 3 is also an optimal solution
when HIT is used as the criterion. Note that the HIT vector of this optimal
solution is h1; 0; 1; 2i. In order to easily compare with the HIT value of the
solution shown in Figure 2, one can also see h0; 1; 0; 1; 2i as the HIT value of the
optimal solution since there are 0 workstations with an idle time of 5.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Encoding SALBP-WS via ASP</title>
      <p>In this section, we first encode SALBP instances. Then, we explain the encoding
of the SALBP-F variant. With the addition of encodings for smoothness criteria
on top of the SALBP-F encoding, we complete our SALBP-WS encoding. For
the syntax and semantics of the language used in encodings, one may refer to [3].
Additionally, detailed information about ASP based problem solving paradigm
and the ASP solver clingo can be found in [7].
3.1</p>
      <sec id="sec-3-1">
        <title>Encoding SALBP Instances</title>
        <p>
          The Listing 1.1 gives an instance encoding for Example 1 given in Section 2.
1 # const cycletime =11.
3 task (
          <xref ref-type="bibr" rid="ref1 ref6">1 ,6</xref>
          ).
4 task (
          <xref ref-type="bibr" rid="ref5 ref6">6 ,5</xref>
          ).
        </p>
        <p>
          task (
          <xref ref-type="bibr" rid="ref2 ref6">2 ,6</xref>
          ).
task (
          <xref ref-type="bibr" rid="ref4 ref7">7 ,4</xref>
          ).
        </p>
        <p>
          task (
          <xref ref-type="bibr" rid="ref3 ref4">3 ,4</xref>
          ).
task (
          <xref ref-type="bibr" rid="ref2 ref8">8 ,2</xref>
          ).
        </p>
        <p>
          task (
          <xref ref-type="bibr" rid="ref4 ref5">4 ,5</xref>
          ).
task (
          <xref ref-type="bibr" rid="ref10 ref9">9 ,10</xref>
          ).
        </p>
        <p>
          task (
          <xref ref-type="bibr" rid="ref4 ref5">5 ,4</xref>
          ).
task (
          <xref ref-type="bibr" rid="ref1 ref10">10 ,1</xref>
          ).
6 precedence (
          <xref ref-type="bibr" rid="ref1 ref2">1 ,2</xref>
          ).
7 precedence (
          <xref ref-type="bibr" rid="ref5 ref6">5 ,6</xref>
          ).
8 precedence (
          <xref ref-type="bibr" rid="ref8 ref9">8 ,9</xref>
          ).
        </p>
        <p>
          precedence (
          <xref ref-type="bibr" rid="ref1 ref5">1 ,5</xref>
          ).
precedence (
          <xref ref-type="bibr" rid="ref2 ref7">2 ,7</xref>
          ).
precedence (
          <xref ref-type="bibr" rid="ref10 ref9">9 ,10</xref>
          ).
        </p>
        <p>
          precedence (
          <xref ref-type="bibr" rid="ref3 ref4">3 ,4</xref>
          ).
precedence (
          <xref ref-type="bibr" rid="ref7 ref8">7 ,8</xref>
          ).
        </p>
        <p>
          precedence (
          <xref ref-type="bibr" rid="ref4 ref5">4 ,5</xref>
          ).
precedence (
          <xref ref-type="bibr" rid="ref6 ref8">6 ,8</xref>
          ).
10 workstation (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ). workstation (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ). workstation (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ). workstation (
          <xref ref-type="bibr" rid="ref4">4</xref>
          ).
11 workstation (
          <xref ref-type="bibr" rid="ref5">5</xref>
          ).
        </p>
        <p>Listing 1.1. Encoding of the SALBP instance given in Example 1</p>
        <p>The cycle time c = 11 is represented by the cycletime constant in Line 1. The
decision of making c an ASP constant is to facilitate easy testing by trying different
cycle time values in the clingo command line. The tasks and workstations in an
instance are represented by ASP facts task/2 and workstation/1, respectively,
in the following form: task(t,i) s.t. t 2 T ; i = t(t) and workstation(i(s)) s.t.
s 2 S. For the sake of simplicity in encodings and the common way of naming
in open datasets, we use the order i(S) of a workstation S as its identifier. The
tasks and workstations of Example 1 are listed in Lines 3–4 and Lines 10–11,
respectively. The precedence graph of an instance is represented by precedence/2
facts of form precedence(u,v) s.t. (u; v) is an edge of P. The facts in Lines 6–8
represent the precedence graph in Figure 1.</p>
        <p>Although the instance format is developed specifically for SALBP-F and
SALBP-WS instances, it can also be utilized for other SALBP variants.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Encoding SALBP-F</title>
        <p>Having represented a SALBP instance in ASP, we now encode the constraints
of the SALBP-F. The assignment of a task to a workstation is represented by
instances of the binary predicate assignment/2 in the form assignment(s,t) s.t.
s 2 S; t 2 T . Given a task t and a workstation s, if the atom assignment(s,t)
is in an answer set (or, if it is true), the SALBP-F solution corresponding to the
answer set must have xts = 1. Otherwise, the solution must have xts = 0 (i.e., if
the atom is not in the answer set).
1 { assignment (W ,T) : workstation (W )} = 1 :- task (T ,C ).
3 :- # sum {C ,T: assignment (W ,T), task (T ,C )} &gt; cycletime ,
4 workstation (W ).
6 :- precedence (X ,Y), assignment (W1 ,X), assignment (W2 ,Y), W1 &gt; W2 .
8 # show assignment /2.</p>
        <p>Listing 1.2. Encoding of the SALBP-F</p>
        <p>
          The rules in Listing 1.2 comprise the ASP encoding of SALBP-F. Based on
the generate-and-test technique, a commonly used encoding technique in ASP [7],
the choice rule in Line 1 generates the search space based on xts decision variables
of SALBP-F. The same rule also represents the constraint (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) of SALBP-F. The
equality condition in the rule head forces that a task must be assigned to a
unique workstation. The constraint rule in Lines 3–4 represents the constraint (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ).
The #sum aggregate in the rule, basically, computes the workload wl(s) of any
workstation s by summing up task times of all tasks assigned to s in a model of the
logic program. Being a constraint rule and having the condition ‘&gt; cycletime’,
it encodes that whenever a model of the program leads to a workstation with a
workload greater than the cycle time, that model cannot be an answer set (so,
that model is eliminated). Similarly, the constraint rule in Line 6 represents the
constraint (
          <xref ref-type="bibr" rid="ref4">4</xref>
          ) about the precedence graph. Given an edge (x; y) of P (represented
by an instance of precedence(X,Y) in Line 6), the constraint rule eliminates a
model where tasks x and y are assigned to workstations w1 and w2 (instances
of variables W1 and W2), respectively, such that the order of w1 is later than
the order of w2 (i.e., i(w1) &gt; i(w2)). Note that in such a case the precedence
constraint is not respected. The #show statement in Line 8 restricts the answer
set output of clingo to only instances of assignment/2 predicate. In this way,
one can easily compile a SALBP-F solution from an answer set of the program.
        </p>
        <p>
          Let be the encoding of SALBP-F composed of rules in Listing 1.2. When
we run clingo with the program and the instance rules in Listing 1.1 as input,
one answer set we get is the following one.
assignment (
          <xref ref-type="bibr" rid="ref1 ref2">2 ,1</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref2 ref3">3 ,2</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref3 ref5">3 ,5</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref1 ref4">1 ,4</xref>
          )
assignment (
          <xref ref-type="bibr" rid="ref4 ref6">4 ,6</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref4 ref7">4 ,7</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref4 ref8">4 ,8</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref5 ref9">5 ,9</xref>
          )
assignment (
          <xref ref-type="bibr" rid="ref1 ref3">1 ,3</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref10 ref5">5 ,10</xref>
          )
Considering the semantics of the assignmnet/2 predicate, this answer set
represents the SALBP-F solution shown in Figure 2.
Encoding SI. The clingo solver has the capacity of solving optimization problems
[8]. For such problems, it features #minimize and #maximize statements.
Considering this capacity, let us encode the SI criterion in ASP to be used modularly
as an addition to the SALBP-F encoding. The rules in Listing 1.3 represent the
SI criterion and respective optimization objective function given in (
          <xref ref-type="bibr" rid="ref5">5</xref>
          ).
workload (W , L ) : - L =# sum {C , T : a ss ign me nt (W , T ) , task (T , C )} ,
w o r k s t a t i o n ( W ) , cycletime &gt;= L .
# minimize {( cycletime - L )*( cycletime - L ) , W : workload (W , L )}.
        </p>
        <p>Listing 1.3. Encoding of the SI criterion for SALBP-WS</p>
        <p>
          With the help of the #sum aggregate, the rule in Lines 1–2 finds the workload of
each workstation. An atom workload(w,l), which is generated by the rule as an
instance of the workload/2 predicate, represents that the workload of workstation
w is l, i.e., wl(w) = l. A careful reader may notice the ‘cycletime&gt;=L’ condition
in Line 2 is not necessary considering the SALBP-F constraint in Lines 3–4 of
Listing 1.2. Although it is redundant w.r.t. the semantics of the program, it
improves the grounding performance of clingo by avoiding the generation of
many futile ground instances of the respective rule (viz., ground rules with head
atoms such as workload(
          <xref ref-type="bibr" rid="ref4">4,33</xref>
          ) or workload(
          <xref ref-type="bibr" rid="ref5">5,42</xref>
          ) where workload is over the
cycle time). Although the heads of such futile rule instances will trivially not
be included in any answer set, they not only degrade grounding performance of
clingo, but also hinder the solving performance. The #minimize statement in
Line 4 represents the SI objective function in (
          <xref ref-type="bibr" rid="ref5">5</xref>
          ).
        </p>
        <p>
          Let SI be the SALBP-WS encoding composed of the SALBP-F encoding in
Listing 1.2 and the encoding of SI criterion in Listing 1.3. When we run clingo
with SI and the instance in Listing 1.1 as input, we get the following output.
Answer : 1
assignment (
          <xref ref-type="bibr" rid="ref1 ref2">2 ,1</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref2 ref3">3 ,2</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref3 ref5">3 ,5</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref1 ref4">1 ,4</xref>
          )
assignment (
          <xref ref-type="bibr" rid="ref4 ref6">4 ,6</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref4 ref7">4 ,7</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref4 ref8">4 ,8</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref5 ref9">5 ,9</xref>
          )
assignment (
          <xref ref-type="bibr" rid="ref1 ref3">1 ,3</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref10 ref5">5 ,10</xref>
          )
Optimization : 30
Answer : 2
assignment (
          <xref ref-type="bibr" rid="ref1 ref2">2 ,1</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref2 ref3">3 ,2</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref2 ref5">2 ,5</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref1 ref4">1 ,4</xref>
          )
assignment (
          <xref ref-type="bibr" rid="ref4 ref6">4 ,6</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref3 ref7">3 ,7</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref4 ref8">4 ,8</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref5 ref9">5 ,9</xref>
          )
assignment (
          <xref ref-type="bibr" rid="ref1 ref3">1 ,3</xref>
          ) assignment (
          <xref ref-type="bibr" rid="ref10 ref5">5 ,10</xref>
          )
Optimization : 22
OPTIMUM FOUND
Notice that clingo finds a feasible solution and tries to improve that solution
incrementally w.r.t. the SI value. The OPTIMUM FOUND message in the output
designates that clingo has managed to prove the last answer set found is indeed
an optimal one. Actually, that answer set corresponds to the optimal SALBP-WS
solution given in Figure 3.
        </p>
        <p>
          Encoding M AD. Similar to the encoding of the SI criterion, we can encode the
M AD criterion in ASP. The ideal average workload of each workstation calculated
in (
          <xref ref-type="bibr" rid="ref6">6</xref>
          ), however, can be a real number and clingo does not support programs with
real numbers. This hurdle can be overcome by the following Lemma.
Lemma 1. The objective of minimizing of the M AD value in (
          <xref ref-type="bibr" rid="ref6">6</xref>
          ) is equivalent
to the objective
min X wl(s)jSj
        </p>
        <p>
          X t(t) :
t2T
(
          <xref ref-type="bibr" rid="ref9">9</xref>
          )
Proof.
        </p>
        <p>s2S</p>
        <p>P
M AD = X</p>
        <p>wl(s)
s2S
t2T t(t) = X
jSj
s2S
wl(s)jSj</p>
        <p>P</p>
        <p>t2T t(t)
jSj
=
jSj s2S
1 X wl(s)jSj</p>
        <p>X t(t)
t2T
Hence, the objective of min M AD = min Ps2S wl(s)jSj
P
t2T t(t) .</p>
        <p>
          tu
One may get tempted to minimize Ps2S wl(s) as the optimization objective,
considering other parts of the equation (
          <xref ref-type="bibr" rid="ref9">9</xref>
          ) is constant. However, this is simply
incorrect for solving SALBP-WS, since Ps2S wl(s) is equal to the total task
time and is fixed for a problem instance. A similar issue also appears for the SI
criterion, where minimizing Ps2S (c wl(s)) (droping the square operation) is
incorrect since it is a fixed value for an instance.
        </p>
        <p>Using Lemma 1, the rules in Listing 1.4 encode the M AD criterion and the
respective objective function.
1 totaltask ( TT ) :- TT = # sum {C ,T : task (T ,C )}.
2 numworkstation ( NW ) :- NW = # count {W : workstation (W )}.
4 # minimize {|( L*N)-T|,W : workload (W ,L), totaltask (T),
5 numworkstation (N )}.</p>
        <p>
          Listing 1.4. Encoding of the M AD criterion for SALBP-WS
The rules in Lines 1–2 calculate the number of workstations and total task time.
The #minimize statement in Line 4–5 represents the objective function (
          <xref ref-type="bibr" rid="ref9">9</xref>
          ).
        </p>
        <p>
          Let MAD be a SALBP-WS encoding composed of Listing 1.4, Listing 1.2
and Lines 1–2 of Listing 1.3 (the definition of workload predicate). Given the
program MAD and the instance Listing 1.1, clingo finds an optimal answer set
that corresponds to the optimal SALBP-WS solution given in Figure 3.
Encoding HIT . The rules in Listing 1.5 encodes the HIT criterion (
          <xref ref-type="bibr" rid="ref7">7</xref>
          ) and the
respective objective function (
          <xref ref-type="bibr" rid="ref8">8</xref>
          ). First, the rule in Lines 1–2 finds idle time of
each workstation similar to the rule (Lines 1–2 of Listing 1.3) finding workloads.
An atom of the form idletime(w,i) in an answer set means the idle time of
workstation w is i, i.e., c wl(w) = i. Next, rules in Lines 4–6 generate the
lexicographical levels as mentioned in the HIT value. The maximum idle time is
found (Line 4) and levels from this maximum level until the level 1 (inclusive)
are generated (Lines 5–6). Finally, the HIT objective in (
          <xref ref-type="bibr" rid="ref8">8</xref>
          ) is encoded with the
help of optimization statement in Line 8. The statement commands clingo to
minimize for each level the number of workstations having idle times of that
level. clingo implements multi-criteria lexicographical optimization via priorty
levels in weights. Summing up the weights given as 1 in Line 8 corresponds to
the number of workstations having idle time of L and the @L priority levels define
the lexicographical nature of HIT .
1 idletime (W , cycletime -L) :- workstation (W), cycletime &gt;=L ,
2 L = # sum {C ,T : assignment (W ,T), task (T ,C )}.
4 max (M) :- M = # max { L: idletime (W ,L) }.
5 levels (M) :- max (M), M &gt;0.
6 levels (L -1) :- levels (L), L &gt;1.
        </p>
        <p>idletime (W ,L), levels (L) }.</p>
        <p>Listing 1.5. Encoding of the HIT criterion for SALBP-WS</p>
        <p>Let HIT be the SALBP-WS encoding composed of Listing 1.2 and Listing 1.5.
Running clingo with HIT and the problem instance Listing 1.1, we can solve
the SALBP-WS for Example 1 and get the optimal solution given in Figure 3.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Experimental Evaluation</title>
      <p>We have conducted several experiments to analyse performance of the ASP
encodings SI ; MAD and HIT defined in Section 3.3. To this end, we used
several benchmarks from a dataset mentioned in [13] and openly available from
https://assembly-line-balancing.de/. All the experiments have been
performed in a Linux machine with Intel E5-2630@2.20GHz CPU. For computing
optimal answer sets, we have used clingo version 5.4.0 with 6GB as the memory
limit and 600 seconds as the time limit.</p>
      <p>The results of the ASP encodings are shown in Table 1. Instances of the
experiment are partitioned into groups with a fixed number of tasks and a fixed
precedence graph. For instance, all instances of the Mitchell group have 21 tasks
(shown by the jT j column) and the same precedence graph. They may vary in the
number of workstations (shown by the jSj column) and the cycle time (shown
by the c column). The results of each encoding are under SI ; MAD and HIT
columns. For each encoding, we report the SI (shown by the SI column) and
M AD (shown by the M AD column) values of the best solution found within
the time limit. By doing so, we aim to investigate whether one can select any
criterion without significant deviation in terms of quality or not (this is discussed
further below). If clingo has proved that the best found solution is indeed an
optimal one we report the time used (shown by the Time column) and otherwise
(i.e., clingo does not find an optimal solution within 600 seconds), we report
as the time value.1</p>
      <p>One main result is that when the number of tasks increases with a usual
consecutive increase in cycle time, instances become much harder to solve. The</p>
      <p>
        SI encoding struggles earlier than the two other ones and in total finds less
number of optimal solutions. The MAD and HIT encodings scale better. We
think clingo has difficulty in minimizing big quadratic numbers in (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) for SI ,
while it shows better performance in minimizing linear counts in (
        <xref ref-type="bibr" rid="ref7">7</xref>
        ) for HIT .
Better performance of MAD can be explained with its less sensitiveness to cycle
time. Note that the M AD criterion in (
        <xref ref-type="bibr" rid="ref6">6</xref>
        ) (or (
        <xref ref-type="bibr" rid="ref9">9</xref>
        )) does not involve cycle time.
      </p>
      <p>Another important result is about the SI and M AD values of the optimal
solutions. Considering the instances where any two encodings find an optimal
solution, the corresponding SI and M AD values of these solutions are the same
except a few cases. For instance, Gunther 35, 7, 81 is one exception where the
optimal solution found by MAD has SI value of 1198, which is slightly more
than 1186 the SI value of the optimal solutions found by SI and HIT . This
consistent agreement on SI and M AD values of all encodings shows that one
can select any of the encodings or optimization criteria. This is a significant
observation since the recent studies in the research community focus only on
SI, while another criterion may improve computation performance without any
significant deviation in terms of quality. We have experienced exactly this case
for our encodings where MAD and HIT perform clearly better than SI .</p>
      <p>Unlike the other SALBP types, studies on SALBP-WS are scarce. Being
an intractable problem, most of the efforts to solve the SALBP-WS focus on
heuristic methods [11, 10, 5]. In [1], however, an exact method of solving
SALBPWS with the SI criterion is studied. Basically, they have implemented a problem
specific search algorithm based on branch and bound technique. Neither their
implementation nor the instances they used are openly available.2 However, it
is explicitly stated in [1] that their algorithm can solve instances with up to 29
tasks. Our way of solving SALBP-WS via ASP is also an exact method and the
results in Table 1 show that our encodings scale better w.r.t. the number of tasks.</p>
      <p>Another exact method for solving SALBP-WS is [9]. They have also
implemented a branch and bound based algorithm that utilizes heuristics for computing
lower and upper bounds. Their empirical studies uses 117 instances from the
same ALBP dataset website we used. We have also tested our ASP encodings
with these 117 instances and the results are reported in Table 2. The number of
1 We observed that grounding times of clingo are not significant as solving times.
2 Although, they use some of the openly available precedence graphs, they have
generated task times randomly.</p>
      <p>Mitchell 21
Roszieg 25
Heskia 28
Buxey 29
Sawyer 30
Lutz1 32
Gunther 35
Kilbrid 45
Hahn 53
Warnecke 58
Tonge 70
Wee-mag 75
Arc83 83
P
optimal solutions found for each problem group are listed with an aggregate on
the last row. Although SI is not performing well (an optimal solution is found
for 32 instances) as the problem specific implementation of [9] (67 instances),
HIT finds almost the same number of optimal solutions (66 instances) and
MAD finds more optimal solutions (72 instances) within the time limit.
In this paper, we have encoded the SALBP-WS in ASP. This problem aims at
balancing the workloads evenly among workstations in an assembly line. We
have performed various experiments and they showcase better scalability results
compared to problem specific SALBP-WS solvers.</p>
      <p>The modular ASP encodings make it possible for us to try various criteria
to quantify how balanced the SALBP assignment is. This issue is especially
important for SALBP-WS solvers using problem specific search algorithms since
they heavily depend on one optimization criterion (not just due to calculation of
the optimization function, but also the need for theoretical bound analysis for
improving solving performance) and supporting another one is not as easy as in
the case of ASP.</p>
      <p>Most of the recent related work on SALBP-WS rely on the SI criterion [10, 1,
9]. Our experiments show other criteria like M AD can also be used without
significant deviation in assignment quality. This can even improve the computational
performance of the system like in the case of our encodings.</p>
      <p>Apart from criteria SI and M AD, we proposed a novel criterion based on
idle times of workstations. Using the new HIT criterion, SALBP-WS problem
can be modeled as a lexicographical multi-objective optimization problem. This
new criterion can also be beneficial for other work related to ALBPs.</p>
      <p>One important future line of research is to benefit from other SALBP-WS
solvers that compute lower and upper bounds [1, 9] for the problem instance in
ASP encodings.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Azizoğlu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>İmat</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Workload smoothing in simple assembly line balancing</article-title>
          .
          <source>Computers &amp; Operations Research</source>
          <volume>89</volume>
          ,
          <fpage>51</fpage>
          -
          <lpage>57</lpage>
          (
          <year>2018</year>
          ). https://doi.org/10.1016/j.cor.
          <year>2017</year>
          .
          <volume>08</volume>
          .006
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Becker</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scholl</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A survey on problems and methods in generalized assembly line balancing</article-title>
          .
          <source>European Journal of Operational Research</source>
          <volume>168</volume>
          (
          <issue>3</issue>
          ),
          <fpage>694</fpage>
          -
          <lpage>715</lpage>
          (
          <year>2006</year>
          ). https://doi.org/10.1016/j.ejor.
          <year>2004</year>
          .
          <volume>07</volume>
          .023
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Calimeri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krennwallner</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maratea</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Asp-core-2 input language format</article-title>
          .
          <source>Theory Pract</source>
          . Log. Program.
          <volume>20</volume>
          (
          <issue>2</issue>
          ),
          <fpage>294</fpage>
          -
          <lpage>309</lpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Erdem</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
          </string-name>
          , N.:
          <article-title>Applications of Answer Set Programming</article-title>
          .
          <source>AI Magazine</source>
          <volume>37</volume>
          (
          <issue>3</issue>
          ),
          <fpage>53</fpage>
          -
          <lpage>68</lpage>
          (
          <year>2016</year>
          ). https://doi.org/10.1609/aimag.v37i3.
          <fpage>2678</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Eswaramoorthi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kathiresan</surname>
            ,
            <given-names>G.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jayasudhan</surname>
            ,
            <given-names>T.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prasad</surname>
            ,
            <given-names>P.S.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mohanram</surname>
            ,
            <given-names>P.V.</given-names>
          </string-name>
          :
          <article-title>Flow index based line balancing: a tool to improve the leanness of assembly line design</article-title>
          .
          <source>International Journal of Production Research</source>
          <volume>50</volume>
          (
          <issue>12</issue>
          ),
          <fpage>3345</fpage>
          -
          <lpage>3358</lpage>
          (
          <year>2012</year>
          ). https://doi.org/10.1080/00207543.
          <year>2011</year>
          .575895
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Falkner</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Friedrich</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schekotihin</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taupe</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Teppan</surname>
            ,
            <given-names>E.C.</given-names>
          </string-name>
          :
          <article-title>Industrial Applications of Answer Set Programming</article-title>
          .
          <source>KI - Künstliche Intelligenz</source>
          <volume>32</volume>
          (
          <issue>2</issue>
          ),
          <fpage>165</fpage>
          -
          <lpage>176</lpage>
          (
          <year>2018</year>
          ). https://doi.org/10.1007/s13218-018-0548-6
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Kaufmann,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <surname>T.</surname>
          </string-name>
          :
          <article-title>Answer Set Solving in Practice</article-title>
          .
          <source>Synthesis Lectures on Artificial Intelligence and Machine Learning</source>
          , Morgan &amp; Claypool Publishers (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Kaufmann,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <surname>T.</surname>
          </string-name>
          :
          <article-title>Clingo= ASP+ control: Preliminary report</article-title>
          .
          <source>arXiv preprint arXiv:1405.3694</source>
          (
          <year>2014</year>
          ), http://arxiv.org/ abs/1405.3694
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Hazır</surname>
          </string-name>
          , Ö.,
          <string-name>
            <surname>Agi</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guérin</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>An efficient branch and bound algorithm for smoothing the workloads on simple assembly lines</article-title>
          .
          <source>International Journal of Production</source>
          Research pp.
          <fpage>1</fpage>
          -
          <lpage>18</lpage>
          (
          <year>2019</year>
          ). https://doi.org/10.1080/00207543.
          <year>2019</year>
          .1701208
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Mozdgir</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mahdavi</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Badeleh</surname>
            ,
            <given-names>I.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Solimanpur</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Using the Taguchi method to optimize the differential evolution algorithm parameters for minimizing the workload smoothness index in simple assembly line balancing</article-title>
          .
          <source>Mathematical and Computer Modelling</source>
          <volume>57</volume>
          (
          <issue>1</issue>
          ),
          <fpage>137</fpage>
          -
          <lpage>151</lpage>
          (
          <year>2013</year>
          ). https://doi.org/10.1016/j.mcm.
          <year>2011</year>
          .
          <volume>06</volume>
          .056
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Rachamadugu</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Talbot</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Improving the equality of workload assignments in assembly lines</article-title>
          .
          <source>International Journal of Production Research</source>
          <volume>29</volume>
          (
          <issue>3</issue>
          ),
          <fpage>619</fpage>
          -
          <lpage>633</lpage>
          (
          <year>1991</year>
          ). https://doi.org/10.1080/00207549108930092
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Scholl</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Balancing and Sequencing of Assembly Lines</article-title>
          . Contributions to Management Science, Physica-Verlag Heidelberg,
          <volume>2</volume>
          <fpage>edn</fpage>
          . (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Scholl</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boysen</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fliedner</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The assembly line balancing and scheduling problem with sequence-dependent setup times: problem extension, model formulation and efficient heuristics</article-title>
          .
          <source>OR Spectrum</source>
          <volume>35</volume>
          (
          <issue>1</issue>
          ),
          <fpage>291</fpage>
          -
          <lpage>320</lpage>
          (
          <year>2013</year>
          ). https://doi.org/10.1007/s00291-011-0265-0
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>