<!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>Modeling RED algorithm modifications in the OpenModelica</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anna-Maria Y. Apreutesey</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anna V. Korolkova</string-name>
          <email>korolkova-av@rudn.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmitry S. Kulyabov</string-name>
          <email>kulyabov-ds@rudn.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Applied Probability and Informatics Peoples' Friendship University of Russia (RUDN University)</institution>
          <addr-line>6 Miklukho-Maklaya St, Moscow, 117198, Russian Federation</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Laboratory of Information Technologies Joint Institute for Nuclear Research 6 Joliot-Curie</institution>
          ,
          <addr-line>Dubna, Moscow region, 141980</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>5</fpage>
      <lpage>14</lpage>
      <abstract>
        <p>The goal of this work is to simulate the Random Random Detection algorithm (RED) and Double Slope Random Early Detection (DSRED) and Gentle Random Early Detection (GRED) modifications in Modelica. RED and its modifications allow to control the network load by selectively discarding packets before the queue is full and Transmission Control Protocol (TCP) begins to reduce the transmission rate preventing resynchronization. This selective packet loss helps TCP find the right data rate faster and keep the queue size and latency at the appropriate level. The existence of a large number of modifications of the classical RED algorithm is associated with the problem of selecting the parameters of the algorithm (queue thresholds, maximum drop parameter, etc.) under which the system would function stably and eficiently. The Modelica language is used as the implementation language. Based on the results obtained during the simulation it is planned to conduct a comparative analysis of the three algorithms with similar initial parameters to reveal the advantages of one or another algorithm.</p>
      </abstract>
      <kwd-group>
        <kwd>and phrases</kwd>
        <kwd>active queue management</kwd>
        <kwd>simulation</kwd>
        <kwd>hybrid modeling</kwd>
        <kwd>Modelica</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Copyright © 2019 for the individual papers by the papers’ authors. Copying permitted for private and
academic purposes. This volume is published and copyrighted by its editors.</p>
      <p>In: K. E. Samouylov, L. A. Sevastianov, D. S. Kulyabov (eds.): Selected Papers of the IX Conference
“Information and Telecommunication Technologies and Mathematical Modeling of High-Tech Systems”,
Moscow, Russia, 19-Apr-2019, published at http://ceur-ws.org
⎧
⎪⎪0,
⎪
⎪
⎪
⎪
⎪
⎪⎩1,
 =</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <sec id="sec-2-1">
        <title>There are many algorithm [8, 9]. The active queue management (AQM) [1–3] algorithm with the Random Early</title>
        <p>
          Detection (RED) control algorithm is used to monitor and prevent congestion in router
queues [
          <xref ref-type="bibr" rid="ref4 ref5 ref6 ref7">4–7</xref>
          ]. The RED allows you to adjust the flow rate by selectively dropping packets
before the queue is full. If the router queue is almost empty, all packets arriving at the
system are accepted. As the queue is filled and as a result of exceeding a certain threshold
value, the packet drop function starts to work. This causes TCP-like protocols to slow
down the transmission rate and prevents re-synchronization of connection parameters.
        </p>
        <p>modifications of RED that improve certain characteristics of this</p>
        <p>
          As a modeling tool is proposed to use the language Modelica in the software
environment OpenModelica [
          <xref ref-type="bibr" rid="ref10 ref11 ref12 ref13">10–13</xref>
          ].
        </p>
        <p>Modelica is a language developed by the non-profit
organization Modelica. This association is also developing a free standard library for this
language. Modelica supports continuous and hybrid (continuously discrete) paradigms.
2.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Simulation of the DSRED algorithm</title>
      <p>thresholds of the queue, = 0, 5( −
).</p>
      <p>
        The algorithm Double Slope Random Early Detection (DSRED) [
        <xref ref-type="bibr" rid="ref14 ref9">9, 14</xref>
        ] introduces
an additional threshold value  between the minimum  and maximum 
The probability function for dropping packets in the DSRED algorithm is:
2 (1 −  )
 − 
,  =
      </p>
      <p>2
 − .</p>
      <p>Variable  reflects the slope of the function in the first segment between threshold
values  and .</p>
      <p>Since overload is not critical in this segment, 
is chosen in
such a way as to discard as few packets as possible. The coeficient

adjusts the slope
of the function for the second segment between  and . In this segment, the
probability of dropping a packet must be high enough to warn the sender of overload.</p>
      <sec id="sec-3-1">
        <title>Therefore,  must be greater than  . The mode selector for setting the packet drop function is the variable  (fig. 1).</title>
        <p>der ( q_avg ) = wq * C * ( q - q_avg ) ;
when w &lt;= 1.0 then</p>
        <p>The packet drop function (^), which distinguishes the DSRED algorithm from the
classic RED, is described in Modelica as follows (listing 2).</p>
        <p>Listing 2: The packet drop function in the DSRED algorithm
p = if q_avg &lt; thmin * R then 0.0
then
elseif
then
else 1.0;
elseif q_avg &gt;= thmin * R and q_avg &lt; thmid * R
alfa
* ( q_avg</p>
        <p>- thmin * R)
q_avg
&gt;=
thmid
* R
and</p>
        <p>q_avg &lt; thmax * R
– ℎ is the normalized lower queue threshold;
– ℎis the normalized high queue threshold;
–  is the maximum probability of dropping packets.</p>
        <p>As a result of the simulation, the graphs demonstrating the improvement in the
behavior of the function of the average queue size () in the DSRED algorithm compared
to RED
with some parameters were obtained.
parameters ℎ = 0, 25, ℎ = 0, 6,  = 0, 01, i.e. as the maximum probability
of dropping packets  decreases, the amplitude of the oscillations of the queue length
function in the DSRED</p>
        <p>algorithm is also slightly less than when using the classic RED,
in which the function () reaches its maximum value (fig. 4). However, the frequency
of oscillation of the average queue size function in DSRED increases, comparing with
this function in RED(fig. 4). The simulation results(fig. 5) also show that with

= 0, 8,
ℎ = 0, 25, ℎ = 0, 9,  = 0, 01 parameters using the DSRED algorithm, the
amplitude of fluctuations of the average queue size decreases slightly, and the frequency
increases.</p>
        <p>When the lower threshold of the queue rises, i.e.
with an increase in the
length of the queue on which the packet drop function operates, it can be seen that
the queue function () in the classical RED process in the oscillation process reaches
its maximum value and is held at this level for some time. When using DSRED, the
function () does not reach the maximum possible value(fig. 5), which indicates a more
stable behavior of the system parameters.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3. Simulation of the GRED algorithm</title>
      <p>
        In the Gentle RED algorithm (GRED) [
        <xref ref-type="bibr" rid="ref15 ref9">9, 15</xref>
        ], the packet drop function (^) is
      </p>
      <p>The variables ℎ, ℎ,  are variable initial system parameters. When
 &gt; 0, 9, diferences in the behavior of systems operating on RED and GRED are
practically not observed. The simulation results with the parameters ℎ = 0, 25,
ℎ = 0, 6,  = 0, 01 (fig. 6) reflect that the amplitude of the average queue
() size with the GRED remained almost unchanged compared to the RED, and the
oscillation frequency increased. Figure 7 shows the change in the average size of the TCP
window. When using the GRED, the system behaves more stable, since the oscillations
of the () in GRED do not reach zero, unlike the system according to RED. When
increasing the length of the queue on which the packet drop function operates, for
example with ℎ = 0, 25, ℎ = 0, 9,  = 0, 01 parameters, it can be seen that
the () function does not reach zero when using GRED, i.e. the amplitude of oscillation
is slightly smaller compared with the same function in the RED (fig. 8). A more vivid
example of reducing the amplitude of oscillations in a system operating on the GRED is
shown in the figure 9, which shows the () function. The average size of a TCP window
in the GRED ranges from 8, 7 to 17, 5 packets; in the classic RED, the () function
ranges from 0, 13 to 19, 4, demonstrating the advantages of the GRED algorithm with
these initial parameters.</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>In this paper, the principles of the operation of such RED algorithm modifications ,
such as DSRED and GRED, were described, mathematical models of these algorithms
were given, and the systems controled by these algorithms were simulated using the
Modelica language in the OpenModelica. During the simulation, the results were
obtained demonstrating that under some initial parameters the amplitude or frequency
of oscillations of the average queue size can be reduced. The systems operating on
DSRED and GRED, mainly showed a slight decrease in the amplitude of the oscillation
parameters () or (), which indicates a positive efect on the system behavior, however
the oscillation frequency in most cases increased. By increasing the length of the queue
on which the packet drop function operates, the DSRED algorithm made the behavior
of the () function more stable, reducing its amplitude. In the GRED system, the
behavior of the function of the average queue size changed slightly, however, the ()
function graphs showed a more stable behavior of the system than at lower maximum
threshold values of the queue.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>The publication has been prepared with the support of the “RUDN University
Program 5-100” (Anna-Maria Y. Apreutesey, Anna V. Korolkova, calculation model
development and algorithms on Modelica language). The reported study was funded by
Russian Foundation for Basic Research (RFBR), project number 19-01-00645 (Dmitry
S. Kulyabov, research algorithm development).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>L.</given-names>
            <surname>Chrost</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Chydzinski</surname>
          </string-name>
          ,
          <article-title>On the Evaluation of the Active Queue Management Mechanisms, 2009</article-title>
          <source>First International Conference on Evolving Internet</source>
          (
          <year>2009</year>
          )
          <fpage>113</fpage>
          -
          <lpage>118doi</lpage>
          :
          <fpage>10</fpage>
          .1109/INTERNET.
          <year>2009</year>
          .
          <volume>25</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>R.</given-names>
            <surname>Adams</surname>
          </string-name>
          , Active Queue Management: A Survey,
          <source>IEEE Communications Surveys &amp; Tutorials</source>
          <volume>15</volume>
          (
          <issue>3</issue>
          ) (
          <year>2013</year>
          )
          <fpage>1425</fpage>
          -
          <lpage>1476</lpage>
          . doi:
          <volume>10</volume>
          .1109/SURV.
          <year>2012</year>
          .
          <volume>082212</volume>
          .00018.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>C. V. V.</given-names>
            <surname>Hollot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Misra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Towsley</surname>
          </string-name>
          ,
          <string-name>
            <surname>Wei-Bo</surname>
            <given-names>Gong</given-names>
          </string-name>
          ,
          <article-title>On Designing Improved Controllers for AQM Routers Supporting TCP Flows</article-title>
          ,
          <source>in: Proceedings IEEE INFOCOM 2001. Conference on Computer Communications. Twentieth Annual Joint Conference of the IEEE Computer and Communications Society (Cat. No.01CH37213)</source>
          , Vol.
          <volume>3</volume>
          , IEEE,
          <year>2001</year>
          , pp.
          <fpage>1726</fpage>
          -
          <lpage>1734</lpage>
          . doi:
          <volume>10</volume>
          .1109/INFCOM.
          <year>2001</year>
          .
          <volume>916670</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>S.</given-names>
            <surname>Floyd</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Jacobson</surname>
          </string-name>
          ,
          <article-title>Random Early Detection Gateways for Congestion Avoidance</article-title>
          ,
          <source>IEEE/ACM Transactions on Networking</source>
          <volume>1</volume>
          (
          <issue>4</issue>
          ) (
          <year>1993</year>
          )
          <fpage>397</fpage>
          -
          <lpage>413</lpage>
          . doi:
          <volume>10</volume>
          .1109/90. 251892.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>V.</given-names>
            <surname>Jacobson</surname>
          </string-name>
          ,
          <source>Congestion Avoidance and Control</source>
          ,
          <source>ACM SIGCOMM Computer Communication Review</source>
          <volume>18</volume>
          (
          <issue>4</issue>
          ) (
          <year>1988</year>
          )
          <fpage>314</fpage>
          -
          <lpage>329</lpage>
          . arXiv:arXiv:
          <fpage>1011</fpage>
          .1669v3, doi: 10.1145/52325.52356.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>V.</given-names>
            <surname>Misra</surname>
          </string-name>
          ,
          <string-name>
            <surname>W.-B. Gong</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Towsley</surname>
          </string-name>
          ,
          <article-title>Stochastic Diferential Equation Modeling and Analysis of TCP-Windowsize Behavior</article-title>
          ,
          <source>Proceedings of PERFORMANCE 99</source>
          (
          <year>1999</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>V.</given-names>
            <surname>Misra</surname>
          </string-name>
          ,
          <string-name>
            <surname>W.-B. Gong</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Towsley</surname>
          </string-name>
          ,
          <article-title>Fluid-Based Analysis of a Network of AQM Routers Supporting TCP Flows with an Application to RED</article-title>
          ,
          <source>ACM SIGCOMM Computer Communication Review</source>
          <volume>30</volume>
          (
          <issue>4</issue>
          ) (
          <year>2000</year>
          )
          <fpage>151</fpage>
          -
          <lpage>160</lpage>
          . doi:
          <volume>10</volume>
          .1145/347057. 347421.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Korolkova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Kulyabov</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. I. Chernoivanov</surname>
          </string-name>
          ,
          <article-title>On the Classification of RED Algorithms</article-title>
          , Bulletin of Peoples' Friendship University of Russia.
          <source>Series “Mathematics. Information Sciences. Physics” (3)</source>
          (
          <year>2009</year>
          )
          <fpage>34</fpage>
          -
          <lpage>46</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Korolkova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Kulyabov</surname>
          </string-name>
          ,
          <article-title>Mathematical Model of the Dynamic Behavior of RED-Like System Parameters</article-title>
          , Bulletin of Peoples' Friendship University of Russia.
          <source>Series “Mathematics. Information Sciences. Physics” (1)</source>
          (
          <year>2010</year>
          )
          <fpage>54</fpage>
          -
          <lpage>64</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. P. Fritzson,
          <source>Principles of Object-Oriented Modeling and Simulation with Modelica 2</source>
          .1, Wiley-IEEE Press,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. P. Fritzson, Introduction to Modeling
          <source>and Simulation of Technical and Physical Systems with Modelica</source>
          , John Wiley &amp; Sons, Inc., Hoboken, NJ, USA,
          <year>2011</year>
          . doi:
          <volume>10</volume>
          .1002/9781118094259.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Korolkova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. R.</given-names>
            <surname>Velieva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. O.</given-names>
            <surname>Abaev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. A.</given-names>
            <surname>Sevastianov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Kulyabov</surname>
          </string-name>
          ,
          <source>Hybrid Simulation Of Active Trafic Management, Proceedings 30th European Conference on Modelling and Simulation</source>
          (
          <year>2016</year>
          )
          <fpage>685</fpage>
          -
          <lpage>691doi</lpage>
          :
          <fpage>10</fpage>
          .7148/2016-0685.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>T. R. Velieva</surname>
            ,
            <given-names>E. G.</given-names>
          </string-name>
          <string-name>
            <surname>Eferina</surname>
            ,
            <given-names>A. V.</given-names>
          </string-name>
          <string-name>
            <surname>Korolkova</surname>
            ,
            <given-names>D. S.</given-names>
          </string-name>
          <string-name>
            <surname>Kulyabov</surname>
            ,
            <given-names>L. A.</given-names>
          </string-name>
          <string-name>
            <surname>Sevastianov</surname>
          </string-name>
          ,
          <article-title>Modelica-based TCP simulation</article-title>
          ,
          <source>Journal of Physics: Conference Series</source>
          <volume>788</volume>
          (
          <issue>100</issue>
          ) (
          <year>2017</year>
          )
          <volume>012036</volume>
          .
          <fpage>1</fpage>
          -
          <lpage>7</lpage>
          . doi:
          <volume>10</volume>
          .1088/
          <fpage>1742</fpage>
          -6596/788/1/012036.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>B.</given-names>
            <surname>Zheng</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Atiquzzaman, DSRED: A New Queue Management Scheme for the Next Generation Internet</article-title>
          ,
          <source>IEICE Transactions on Communications E89-B (3)</source>
          (
          <year>2006</year>
          )
          <fpage>764</fpage>
          -
          <lpage>774</lpage>
          . doi:
          <volume>10</volume>
          .1093/ietcom/e89-b.
          <volume>3</volume>
          .764.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. G. Iannaccone,
          <string-name>
            <given-names>M.</given-names>
            <surname>May</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Diot</surname>
          </string-name>
          ,
          <article-title>Aggregate trafic performance with active queue management and drop from tail</article-title>
          ,
          <source>ACM SIGCOMM Computer Communication Review</source>
          <volume>31</volume>
          (
          <issue>3</issue>
          ) (
          <year>2001</year>
          )
          <article-title>4</article-title>
          . doi:
          <volume>10</volume>
          .1145/505659.505661.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>