<!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>An Application of Reinforcement Learning in Industrial Cyber-Physical Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>David Heik</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fouad Bahrpeyma</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dirk Reichelt</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Faculty of Informatics/Mathematics, University of Applied Sciences Dresden</institution>
          ,
          <addr-line>01069 Dresden</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Fully automated manufacturing plants are designed to perform the processes effectively and efcfiiently. During the planning stage, some behavioral controls are already implemented in order to proactively respond to unforeseen outcomes such as a deterioration in the quality of the products, a lack of material supply, or sudden maintenance work. However, not every scenario can be covered, especially if the structure of the production line changes over time or new product variants with different characteristics are introduced. With a particular focus on minimizing the overall completion time (makespan), in this paper we present a simulation environment that mimics an assembly line of the Industrial IoT Test Bed (at HTW Dresden). In this regard we incorporated reinforcement learning techniques such as Deep-Q Networks (DQN), REINFORCE, Advantage Actor Critic (A2C) and Proximal Policy Optimization (PPO) as a mean to bring cost efficiency and productivity in an automated manner. We investigate how fast the trained models converge and how accurately they solve the different problems.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Artificial Intelligence</kwd>
        <kwd>Reinforcement Learning</kwd>
        <kwd>Manufacturing Systems</kwd>
        <kwd>Smart Production Systems</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In modern manufacturing systems, job assignment and dynamic scheduling are among the major
challenges. Scheduling performance is directly influenced by the design of the corresponding
control mechanism and reflects primarily on the production rate and the overall completion time.
Nevertheless, the performance of a manufacturing plant depends on a number of challenging
factors and, in large part, on the dynamic nature of the manufacturing environment. Dynamic
events such as failures or jams pose challenges to traditional static scheduling approaches.
As part of an industrial lab at HTW Dresden for smart manufacturing, we are working on a
wide range of issues, including control problems to optimize the production process and the
corresponding performance. The IIoT Test Bed consists of 13 production stations, where some
can perform similar operations. This redundancy allows the physical system to handle problems
such as bottlenecks, maintenance or failures and maintain the overall performance. However, the
existing control software is quite static and does not take into account dynamic events during the
production process, thus preventing the potential from being fully exploited. The challenge is
to consider at the conception stage all possible scenarios that could occur during the production
process, even though the structure of the system may change. In this paper, Reinforcement
Learning (RL) was incorporated to realize dynamic planning for the use of parallel machines
to support same operations. Therefore, planning for the allocation of resources is where RL is
integrated with the system. While the literature tends to refer to scheduling in a broader sense, job
shop scheduling, we have a somewhat different goal of considering redundant capabilities with
uncertainty in the operation cycle. The literature reports for the use of algorithms of various types
for scheduling including rule-based, heuristics, metaheuristic approaches, supervised learning
based methods and also, a field known as reinforcement learning. Boden et al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] suggested
a rule-based method for a dynamic scheduling of product transportation using heterogeneous
automated material handling systems. Svensson et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] presented an ofiflne optimisation
method based on a multiple linear regression. Akyol et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] proposed a real time scheduler
algorithm based on the neuro-fuzzy network wherein an offline learning procedure was used to
develop decision heuristics. RL methods have been used in the literature as alternative problem
solvers, especially for dynamic environments. Said et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] used RL to create a dynamic,
lfexible schedule for job store manufacturing system. In Shafiq et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], the authors introduced a
DQN and SARSA to find optimal policies for scheduling jobs of various types. Zadeh et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
introduced a heuristic algorithm that minimises makespan considering the variation in processing
time. However, a little attention have been paid to the presence of redundant capabilities as well
as sources of uncertainty, for instance the chance of machine failure or varying operation times.
This paper incorporates RL to address the mentioned issue in an effective manner.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Methodology</title>
      <p>
        RL is a method for dealing with uncertainty where optimization is the main objective. Within this
work, RL was used to find the an optimal and reliable scheduling policy for minimizing makespan
in a production system characterized by multiple machines supporting the same operations while
experiencing uncertain operating times. This paper, however studies the sole application of RL to
the specific architecture of our IoT Test Bed while due to the limitations in the the content space,
refers the reader to [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] for detailed explanations of the implementation. As soon as the training
process is completed, the policy will serve as a function that observes the state of the machine and
suggests decisions on the allocation of jobs. The complete structure of our IIoT Test Bed is shown
in Fig. 1. This paper only studies the simplest product variant to be manufactured, which only
requires 3 operations, whereby the execution order (A→B→C) must be adhered to. The stations
that can be used for this were highlighted in color, and the rest have not been considered in the
simulation. They are connected via a conveyor belt and the workpieces are transported using
carriers. In our discrete manufacturing system, carriers move one slot further during each time
step, and wait for their predecessors to move on or for stations to complete their operations. By
increasing the number of carriers and/or parallel stations, the amount of decision combinations
for a specific problem also increases exponentially, as shown by equation (1).
      </p>
      <p>= (2 ) (1)
Since the discovery of the global minimum is an NP-hard problem, it requires a significant
amount of computational effort even with a few parallel stations and a small number of carriers.
Tbl. 1, represents this correspondence in numbers. In this table, similar to our experiments, a
margin of ± 3 seconds was considered as well as the possibility of failure. As a description
((((37374444)))) **** ((((22224444ℎℎℎℎ4466)))) ==== 8213650203..59..10713206..6402.2796696</p>
      <p>
        No. of independent experiments to
completely represent the solution space
13.771.296
408.208.416
697.745.664
20.682.559.744
of the methods used to implement the RL algorithm is beyond the scope of this paper, we
mention here only these used techniques and refer the reader to further reading: DQN [
        <xref ref-type="bibr" rid="ref10 ref8 ref9">8, 9, 10</xref>
        ],
REINFORCE [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], A2C [
        <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
        ] and PPO [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. In our approach, we used formal verification in
the form of an early stopping criteria during the process of reinforcement learning. This formal
verification method is repeated for each episode of training as a validation criteria to ensure the
performance level of the learning process. In this regard, a test and an evaluation dataset has been
incorporated. Due to the largeness of the problem space, it’s practically impossible to perform
experiments for all the possible combinations. Consequently, we were able to calculate the global
makespan minimum for only a fraction of initial states. The experiments were performed in our
simulated environment, where all possible decision combinations were evaluated. This type of
verification, however, is not common in RL applications as RL techniques are mainly verified by
the reward which cannot guarantee the total safety of the policy learnt. The models were trained
with randomly generated initial states for which the global minimum is not known. To determine
if the models converge or not, one test dataset was used after each training episode for which
the global minimum is known already. Then, according to equation (2), the normalized value of
the overall completion time was stored in a list. The mean value of this list was then used as a
condition to determine the termination of the training process. In other words, this verification
was also used as a mean of early stopping, which is kind of reducing the search space.
 = (   −  );  = ()3 (2)
      </p>
      <p>− 
Where  ,  and  stand for the worst, the best and the rl-output of overall completion times.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Evaluation</title>
      <p>The experimental results for the simulated experiments are presented in Fig. 2, the 4 sections
each representing the results for one RL method. Each section shows 4 experiments (SI=1,2,3 or
4) detailed in Tbl. 1. For each experiment, we applied 4 different early stopping condition that
differ by their color listed in the legend (e.g.  ≥ 0.92;  = 10), where  represents the
horizon over which  is calculated. The example means that early stopping is activated
when  ≥ 0.92 over the last  = 10 episodes. These experiments are repeated for the
remaining conditions mentioned. In Fig. 2, boxplots each represents the results of multiple runs
of the corresponding method with the same parameters. The trained models were applied to
each of 1000 evaluation datasets. The numerical results for the experiments evaluated in Fig. 2
are provided in Tbl. 2. As shown in the results, PPO was able to outperform DQN, A2C and
REINFORCE in terms of the average score, duration and the number of episodes required for
training with rising uncertainty. Therefore, PPO is the recommended method for our IIoT Test
Bed to realize dynamic scheduling.</p>
      <sec id="sec-3-1">
        <title>Station #3 Op_B (~14s)</title>
      </sec>
      <sec id="sec-3-2">
        <title>Station #2 Op_B (~12s)</title>
        <p>Op: average operation time</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>In this paper, we proposed the use of RL for dynamic job scheduling in a virtual environment
that has the behaviour of our IIoT Test Bed. For different scenarios, we illustrated how the
corresponding NP-hard scheduling problem can be addressed using RL without the need for
examining an enormous number of experiments.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work has been supported and funded by the ESF (European Social Fund) as part of the
REACT research group "Wandlungsfähige Produktionsumgebungen" (WaPro, application number:
100602780). REACT-EU: Funded as part of the EU reaction to the COVID-19 pandemic.
2
=
I</p>
      <p>S
A2C
av score
(fastest)
0.915
0.819
0.951
0.869</p>
      <p>av no. of
ep. (fastest)
273
799
202
524
av score</p>
      <p>(Δ)
-0,013
-0,042
-0,006
-0,021
av no. of
ep. (Δ)</p>
      <p>-34
-23982
-119
-5039</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Boden</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rank</surname>
          </string-name>
          , T. Schmidt,
          <article-title>Control of heterogenous AMHS in semiconductor industry under consideration of dynamic transport carrier transfers</article-title>
          ,
          <source>in: 2021 22nd IEEE International Conference on Industrial Technology (ICIT)</source>
          , IEEE,
          <year>2021</year>
          . doi:
          <volume>10</volume>
          .1109/icit46573.
          <year>2021</year>
          .
          <volume>9453585</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D. T.</given-names>
            <surname>Pham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Afify</surname>
          </string-name>
          ,
          <article-title>Machine-learning techniques and their applications in manufacturing</article-title>
          ,
          <source>Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture</source>
          <volume>219</volume>
          (
          <year>2005</year>
          )
          <fpage>395</fpage>
          -
          <lpage>412</lpage>
          . doi:
          <volume>10</volume>
          .1243/095440505X32274. arXiv:https://doi.org/10.1243/095440505X32274.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D. E.</given-names>
            <surname>Akyol</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Bayhan</surname>
          </string-name>
          ,
          <article-title>A review on evolution of production scheduling with neural networks</article-title>
          ,
          <source>Computers &amp; Industrial Engineering</source>
          <volume>53</volume>
          (
          <year>2007</year>
          )
          <fpage>95</fpage>
          -
          <lpage>122</lpage>
          . URL: https://www. sciencedirect.com/science/article/pii/S0360835207000666. doi:https://doi.org/10. 1016/j.cie.
          <year>2007</year>
          .
          <volume>04</volume>
          .006.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>N. E.-D. A.</given-names>
            <surname>Said</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Samaha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Azab</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. A.</given-names>
            <surname>Shihata</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mashaly</surname>
          </string-name>
          ,
          <article-title>An online reinforcement learning approach for solving the dynamic flexible job-shop scheduling problem for multiple products and constraints</article-title>
          , in: 2021
          <source>International Conference on Computational Science and Computational Intelligence (CSCI)</source>
          , IEEE,
          <year>2021</year>
          . doi:
          <volume>10</volume>
          .1109/csci54926.
          <year>2021</year>
          .
          <volume>00095</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Shafiq</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Mayr-Dorn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mashkoor</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Egyed</surname>
          </string-name>
          ,
          <article-title>Towards optimal assembly line order sequencing with reinforcement learning: A case study</article-title>
          ,
          <source>in: 2020 25th IEEE International Conference on Emerging Technologies and Factory Automation (ETFA)</source>
          , IEEE,
          <year>2020</year>
          . doi:
          <volume>10</volume>
          .1109/etfa46521.
          <year>2020</year>
          .
          <volume>9211982</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Zadeh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Katebi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Doniavi</surname>
          </string-name>
          ,
          <article-title>A heuristic model for dynamic flexible job shop scheduling problem considering variable processing times</article-title>
          ,
          <source>International Journal of Production Research</source>
          <volume>57</volume>
          (
          <year>2018</year>
          )
          <fpage>3020</fpage>
          -
          <lpage>3035</lpage>
          . doi:
          <volume>10</volume>
          .1080/00207543.
          <year>2018</year>
          .
          <volume>1524165</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D.</given-names>
            <surname>Heik</surname>
          </string-name>
          ,
          <source>Discrete manufacturing simulation environment (Version_0.0.1)</source>
          ,
          <year>2022</year>
          . URL: https://doi.org/10.5281/zenodo.7214999. doi:
          <volume>10</volume>
          .5281/zenodo.7214999.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Peng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Williams</surname>
          </string-name>
          ,
          <article-title>Incremental multi-step q-learning</article-title>
          ,
          <source>Machine Learning</source>
          <volume>22</volume>
          (
          <year>1996</year>
          )
          <fpage>283</fpage>
          -
          <lpage>290</lpage>
          . doi:
          <volume>10</volume>
          .1007/bf00114731.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>V.</given-names>
            <surname>Mnih</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Kavukcuoglu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Silver</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Graves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Antonoglou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wierstra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Riedmiller</surname>
          </string-name>
          ,
          <article-title>Playing atari with deep reinforcement learning</article-title>
          ,
          <year>2013</year>
          . doi:
          <volume>10</volume>
          .48550/ARXIV.1312. 5602.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Kapturowski</surname>
          </string-name>
          , G. Ostrovski,
          <string-name>
            <given-names>J.</given-names>
            <surname>Quan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Munos</surname>
          </string-name>
          , W. Dabney,
          <article-title>Recurrent experience replay in distributed reinforcement learning</article-title>
          ,
          <source>in: International conference on learning representations</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Williams</surname>
          </string-name>
          ,
          <article-title>Simple statistical gradient-following algorithms for connectionist reinforcement learning</article-title>
          ,
          <source>Machine Learning</source>
          <volume>8</volume>
          (
          <year>1992</year>
          )
          <fpage>229</fpage>
          -
          <lpage>256</lpage>
          . doi:
          <volume>10</volume>
          .1007/bf00992696.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R. S.</given-names>
            <surname>Sutton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. G.</given-names>
            <surname>Barto</surname>
          </string-name>
          ,
          <article-title>Reinforcement learning: An introduction</article-title>
          , MIT press,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>T.</given-names>
            <surname>Degris</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. M.</given-names>
            <surname>Pilarski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. S.</given-names>
            <surname>Sutton</surname>
          </string-name>
          ,
          <article-title>Model-free reinforcement learning with continuous action in practice</article-title>
          , in: 2012 American Control Conference (ACC), IEEE,
          <year>2012</year>
          , pp.
          <fpage>2177</fpage>
          -
          <lpage>2182</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>J.</given-names>
            <surname>Schulman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Dhariwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Radford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Klimov</surname>
          </string-name>
          ,
          <article-title>Proximal policy optimization algorithms</article-title>
          ,
          <source>arXiv preprint arXiv:1707.06347</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>