Decentralized optimal routing for packets flow on data networks

This paper concerns the optimization of data traffic flows on a telecommunication network, modelled by a fluid dynamic approach. The flows can be controlled adjusting the traffic distribution and priority parameters. Two cost functionals, that measure average velocity and average travelling time of packets, are considered. First we address to general optimal control problems, showing that the existence of solutions is related to properties of packet loss probability functions. The direct solution of the general optimal control problem corresponds to a centralized policy and is hard to solve, thus we pass to a decentralized policy and give solutions for a single node with two entering and two exiting lines and asymptotic costs. Such solutions permit to simulate the behaviour of decentralized algorithms for complex networks. The local optimization ensures very good results also for the complete network. This is shown by the case study of a test telecommunication network, consisting of many lines and nodes.


Introduction
The aim of this work is to present some results about the optimal choice of parameters, describing a fluid -dynamic model for data flow on telecommunication networks.In particular, some cost functionals, that measure average velocity and average travelling time of packets along the network, are defined.Such cost functionals are useful to measure the performances of the network, and to understand typical complex phenomena of telecommunication networks, such as packets congestion.
There exist various approaches to traffic flow on telecommunication networks, especially for the Internet.A general discussion of the many different Internet layers and modelling approaches can be found in [1].While, many papers focus on properties of control congestion algorithms as TCP/IP, see for example [2,17,19,26].Our idea is to look at a large number of nodes, which use some simple routing algorithm.Via some limiting procedure, we obtain a partial differential equation for the packet density on the network, using the traffic distributions and priority coefficients at nodes as controls.
A network consists of a finite set of transmission lines and nodes (routers).Each packet can be seen as a particle on the network and it is assumed that it travels on the network with a fixed speed and with an assigned final destination.Moreover, routers have to receive, process and forward the packets.The latter can be lost with a probability, which increases as the number of packets, that have to be encoded, grows.On a single transmission line, each router sends packets to the following one a first time and lost packets are sent again and so on, until they reach the next router.Looking at an intermediate time scale, the amount of packets can be considered conserved and so the model for each line can be described by the conservation law defined by (1).The average flux function f is computed starting from the packet loss probability function P.
The dynamics at nodes, in which many lines intersect, is given by the following routing algorithm: (RA) packets are processed by arrival time (FIFO policy) and are sent to the outgoing lines in order to maximize the flux.
To determine uniquely the evolution at nodes, some parameters (priority parameters and traffic distribution coefficients) have to be introduced.Here we consider such parameters as controls and fix two functionals to measure the efficiency of the network in terms of: 1) The velocity of packets travelling through the network.
2) The travel time taken by packets from source to destination.
Clearly, to optimize 1) or 2) is equivalent if we refer to a single packet, but the averaged values may be very different (because there is a nonlinear relation among the two quantities).Since the model consider macroscopic variables, we can estimate the averages integrating over time and space the average velocity and the reciprocal of average velocity, respectively.
A multi-objective optimization technique could be more useful.Unfortunately, in general it is not possible to find explicit solutions.
A centralized approach corresponds to the solution of the general optimal control problem.We show that existence is violated when the loss probability function P does not satisfy a specific condition, see Proposition 8.In all cases, the analytical treatment of a complex network is very hard due to the high nonlinearity of the dynamics and discontinuities of the I/O maps.For these reasons, we adopt a decentralized strategy as follows: Step 1.We compute the optimal controls for asymptotic costs for simple networks formed by a single node and every constant initial data.
Step 2. For a complex network, we use the (locally) optimal parameters at every node, updating the value of the parameters at every time instant.For this, we use the actual density on lines near the node.Thus, the optimal control is determined at each node independently.
The cooperative aspect of such decentralized approach is the following.When a router optimizes the (local) functionals, it takes into considerations entering and exiting lines.Such lines reach other nodes, which benefit from the optimal choice.This in fact reflects in good global behavior as showed by simulations, described below.
For the first step, we focus on the special cases of a network of 2 × 2 type, with two entering and two exiting lines.For this network, there is a single traffic distribution coefficient, called α, and a single priority parameter, called p.We completely solve the optimization problem for α and p, every constant initial data and asymptotic functionals.
The implementation of Step 2 is done for a test telecommunication network, consisting of 24 nodes, each one having two incoming lines and two outgoing lines.Three different choices are considered for the traffic distribution coefficients and priority parameters: (locally) optimal, static random and dynamic random.The first choice is given by Step 1, while the second is simply obtained taking a fixed value.By static random parameters, we mean a random choice done at the beginning of the simulation and then kept constant.Finally, dynamic random coefficients are chosen randomly at every instant of time for every node.The results present some interesting features: the performances of the optimal and dynamic random coefficients are definitely superior with respect to the other two.Then, we discuss how the dynamic random choice may be not feasible for modelling and robustness reasons.
The routing algorithm (RA) has the unconvenience that packets may be hardly redirected.Thus, we consider also a partial optimization, where the control parameters are optimized only at more central nodes of the network.Simulations prove that, in this particular context, a total optimization of network can be adequately substituted with the partial ones.
The paper is organized as follows.The model for traffic flow on a telecommunication network is shortly introduced in Section 2.Then, we recall the construction of solutions to Riemann problems at nodes, using the approach of [6] and [7].The subsequent Section 3 is devoted to the analysis of the optimal control problem introducing the cost functionals.Then, Section 4 deals with the special case of a single node.In Section 5, we show simulations for the three different choices of parameters: optimal, static and dynamic random.The paper ends with conclusions in Section 6.

Model for telecommunication networks
We consider a transmission line as a sequence of nodes (routers) N k .Each node N k sends packets to the following node N k+1 and packets may be lost in such process.
We assume that there exists a function P : [0, ρ max ] → [0, 1], that determines the packets loss probability as function of the packets density ρ, where ρ max is the maximal density.From the packets loss probability, it is possible to get an average velocity, v(ρ), and a flux function f (ρ) = ρv(ρ), see [8] and the Appendix (to be removed in the final version).
We assume: (A) the loss probability function P is smooth and increasing, i.e.P (ρ) ≥ 0. The corresponding flux function f is concave and has a unique maximum.
A telecommunication network is represented by a finite set of transmission lines, modelled by intervals Such lines are connected by some nodes, and each node J has a finite number of incoming and outgoing lines; hence, the complete model can be described by the couple (I, J ) , where I = {I i : i = 1, ..., N } is the set of lines, while J is the collection of nodes.A Riemann Problem (RP) at a node is a Cauchy problem with constant initial data on each line.To describe the dynamics at nodes, we introduce the following: Definition 1 A Riemann solver for a node J, that consists of n incoming lines and m outgoing lines, is a map associates to Riemann data ρ 0 = (ρ 1,0 , ..., ρ n+m,0 ) at J a vector ρ = ( ρ 1 , ..., ρ n+m ) so that the solution on an incoming line I i , i = 1, ..., n, is given by the wave (ρ i,0 , ρ i ) and on an outgoing one I j , j = n+1, ..., n+m is given by the wave ( ρ j , ρ j,0 ) .We require the consistency condition: (CC) RS (RS (ρ 0 )) = RS (ρ 0 ) .
In [8], a Riemann solver was introduced, based on the following rule: (RA) Packets are processed by arrival time (FIFO policy) and sent to the outgoing lines in order to maximize the flux.
From (RA), we determine a unique RS depending on distribution and priority parameters, which we then consider as controls.

A Riemann Solver at nodes
We consider the solver introduced in [8], which depends on two parameters, the distribution coefficient α and the priority parameter p (for further details, see the Appendix).Then, we consider α and p as controls.
We restrict ourselves to the case of n = 2 incoming lines and m = 2 outgoing lines.For a junction J, we indicate the packets densities on incoming lines, a and b, by ρ a and ρ b , and on outgoing lines, c and d, by ρ c and ρ d , and by (ρ a,0 , ρ b,0 , ρ c,0 , ρ d,0 ) the initial data.
Proposition 3 Consider a flux function given by (2) or (3).Let γ max ϕ , ϕ = a, b, and γ max ψ , ψ = c, d, the maximum fluxes that can be obtained on incoming lines and outgoing lines, respectively.Then: ( For the proof of such proposition, see the Appendix.One defines: The through flux at J is represented by Γ and solutions on lines are determined using the priority parameter, p, and the distribution coefficient α.A detailed description is in [8] and in the Appendix.

Optimal control problems for telecommunication networks
We are now ready to state optimal control problems on the network.We have a network (I, J ), with nodes having at most two incoming and at most two outgoing lines, and an initial data ρ = (ρ i ) i=1,...,N .The evolution is determined by equation (1) on each line I i and by Riemann Solvers RS J at each node, depending on priority and traffic distribution parameters, p and α, respectively.We now consider α and p as controls.
To measure the efficiency of the network, it is natural to consider two quantities for this aim: 1) The average velocity at which packets travel through the network.
2) The average time taken by packets from source to destination.
Clearly, to optimize 1) and 2) is the same if we refer to a single packet, but the averaged values may be very different (since there is a nonlinear relation among the two quantities).Since the model consider macroscopic quantities, we can estimate the averages integrating over time and space the average velocity and the reciprocal of average velocity, respectively.We thus define the following: and, to obtain finite values, we assume that the optimization horizon is given by [0, T ] for some T > 0.
Notice that this corresponds to the following operation: -average in time and then w.r.t packets, to compute the probability loss function; -average in space, to pass to the limit and get model (1); -integrate in space and time to get the final value.
Remark 4 Starting from a real telecommunication network, the value of such functionals depend on the order in which averages and integrations are taken.
Dynamics.Equation (1) on each line I ∈ I and Riemann Solver RS J for each J ∈ J , depending on controls α and p.
Control Variables.Traffic distribution parameter t → α J (t) and priority parameter t → p J (t), i.e. two controls for every node J ∈ J .
Cost functions.Integrated functionals: Definition 5 We call (P i ) the optimal control problem referred to the functional J i : .
Remark 6 Notice that at most one control variable is active at any time t for a node J ∈ J .Thus the control functions are redundant.For example, you can notice (see [8]) that, for some situations (Γ out > Γ in ), the solution of the RP at node J does not depend on α J ; hence, the control α J does not influence the solution.In this sense, α J is not active and for this reason it can be considered redundant.
The solution of the above optimal control problems is extremely difficult.In fact, we have the following results: Proposition 7 Fix a probability loss function P satisfying (A), a junction J with an assigned Riemann Solver RS J and initial data at the node ρ 0 .We have the following: i) The Input/Output maps α → f (ρ i (α)) and p → f (ρ i (p)) are continuous.
Proof.The continuity of the maps α → f (ρ i (α)) and p → f (ρ i (p)) easily follows from the construction of the Riemann Solver described in Section 6.1.Thus i) holds true.
An immediate consequence of Proposition 7 is the following: Proposition 8 For a given loss probability function P, if σ 1 (P) < σ 2 (P), then the optimal control problems (P 1 ) and (P 2 ) may have no solution if the flux function is given by 3.
Proof.If σ 1 (P ) < σ 2 (P ), it is enough to take a network formed by a single node with two incoming and two outgoing lines, and initial data that renders the I/O maps discontinuous as in the proof of Proposition 7 ii) and iii).In this way, one exhibits a problem (P 1 ) (or (P 2 )) for which no solution exists.
Example 10 Consider a junction J, that consists of two incoming lines, a and b, and two outgoing lines, c and d, flux function (3), and initial data given by: We have that: and so The fluxes of the solution to the Riemann problem at J are given by: For T sufficiently big, J 1 (T ) has two discontinuity points, for α = 0.64 and α = 0.75 (see Figure 1).In this case, the optimal solution does not exist.
Notice that the direct solution of problems (P i ) corresponds to a centralized approach.We propose the alternative approach of decentralized algorithm more precisely: Step 1 For every node J and Riemann Solver RS J , solve the simplified optimal control problem: max (or min) J i (T ), for T sufficiently big, on the network formed only by J with constant initial data, taking approximate solutions when there is lack of existence.
Step 2 Apply the obtained optimal control at every time t in the optimization horizon and at every node J, taking the value at J on each road as initial data.
To deal with such approach, we start with Step 1 in next Section.Notice that, for T sufficiently big, we can assume that the datum is constant on each road: this strongly simplifies the approach.

Optimization of traffic at a single node
We fix the flux function given by (2).For the optimization in case of flux (3), we refer the reader to [23,24]. Since , where H(x) is the Heavyside function and, for incoming lines: for outgoing lines: Then, for T sufficiently big, We define the following conditions: Then, if Γ = Γ in , the solutions of the RP are: Notice that the case of both A 1 , A 2 false is not possible, since it would be Γ in > Γ out .For the incoming lines, we consider the conditions: , the solutions of the RP are the following: Notice that the case of both B 1 , B 2 false is not possible since it would be Γ out > Γ in .Once fixed ρ ϕ and ρ ψ , ϕ ∈ {a, b} e ψ ∈ {c, d} , we can find for which values of α and Then, for α ≥ 1 1 + β − , A 1 is false and A 2 is true; for α ≤ Then, for p ≥ 1 1 + q − , B 1 is false and B 2 is true; for p ≤ Remark 11 We could also refer to a third cost functional, J 3 , measuring the total flux, defined as: For T sufficiently big, if Γ = Γ in , then In a short way, we can write that: Thus, J 3 (T ) is constant.
We want to maximize the cost J 1 (T ) and to minimize the cost J 2 (T ) with respect to the parameters α and p.In [23] and [5], you can find a similar approach for telecommunication networks and road networks, respectively, modelled with flux function (3).
Theorem 12 Consider a junction J with two incoming lines and two outgoing lines.If Γ = Γ in = Γ out and T is sufficiently big, the cost functionals J 1 (T ) and J 2 (T ) depend neither on α nor p.If Γ = Γ in , the cost functionals J 1 (T ) and J 2 (T ) depend only on α.The optimal values for J 1 (T ) are the following: If Γ = Γ in , the optimal values for J 2 (T ) are the following: If Γ = Γ out , the cost functionals J 1 (T ) and J 2 (T ) depend only on p.The optimal values for J 1 (T ) and J 2 (T ) are the same for α when Γ = Γ in , if we substitute α with p, β − with q − , and β + with q + .Proof.For simplicity, from now on we drop the dependence on T from J 1 and J 2 .If Γ = Γ in = Γ out , A 1 and A 2 are both satisfied if and only if and J 1 and J 2 depend neither on α nor on p.
Assume that Γ = Γ in < Γ out , and A 1 and A 2 are both satisfied.In this case, and maximizing J 1 and minimizing J 2 is equivalent to maximize (6) and to minimize (7), respectively.
Assume that Γ = Γ in , and that A 1 and A 2 are both true.Then, s c = s d = +1; so, we have to maximize and to minimize Note that the case ρ a = ρ b = 1 2 cannot happen, since we would have 2 , and Γ = 1; but the maximal value of Γ out is 1, which fact contradicts the assumption that Γ in < Γ out .By the expression of the first and the second derivatives of J 1 and J 2 , we get that J 1 and J 2 are convex with a minimum in α,where α = 1 2 .For the α s such that A 1 is sarisfied but A 2 is not and viceversa, we have that J 1 and J 2 do not depend on α and, in particular, the values of J 1 and J 2 are the following: where we have used the notation

Optimal choice of α
We give the optimal choice of α first when s c = s d = +1.Then, we will consider the case when either s c or s d or both are equal to −1.We can collect the following informations for J 1 : if , and then it is again constant for We distinguish three cases: Simplifying, we obtain the three cases: In the first case, we have that the optimal values of J 1 are for α ∈ 0, 1 1+β + , in the second case, the optimal values of J 1 are for α ∈ 0, , and in the third case the optimal values of J 1 are for α ∈ The optimal values of J 1 are for α ∈ The optimal values of J 1 are for α ∈ 0, 1 1+β + .For J 2 we have the following cases: if The optimal values of J 1 are for α ∈ 0, The optimal values of J 2 are for α ∈ 1 1+β − , 1 .We focus our attention on the cost functional J 1 and consider the case s c = −s d = −1.We have that the following inequalities hold: , we have that the following inequalities hold: As for the cost functional J 2 , we can make like before for J 1 , and the results can be summarized in the following way: if Assume that Γ = Γ out < Γ in , and B 1 and B 2 are both satisfied.In this case, and maximizing J 1 and minimizing J 2 is equivalent to maximize (6) and to minimize (7), respectively.Assume that Γ = Γ out , B 1 and B 2 are both true.Then, s a = s b = +1; so, we have to maximize and to minimize For the p s such that B 1 is satisfied but B 2 is not and viceversa, we have that J 1 and J 2 do not depend on α and, in particular, the values of J 1 and J 2 are the following: ϕ , where we have used the notation The optimal values of p for J 1 and J 2 can be computed considering the results of the previous subsection, if we substitute α with p, β − with q − , and β + with q + .

Simulation of traffic on a test network
In this section, we consider the simulation results of a test telecommunication network, that consists of nodes with two incoming lines and two outgoing lines.We study the cost functionals introduced in the previous section, whose temporal evolution is strictly connected with the choice of priority parameters and distribution coefficients.In what follows, we compare the locally optimal algorithms for such parameters with other possible choice strategies, in order to verify the goodness of our strategy.

Network topology
The topology of the network, represented in Figure 2, consists of:

Case studies
We distinguish three case studies, that can be called, case A, B, and C. Notice that, for the presented network, it is necessary to assign initial conditions and boundary data.Precisely, inner lines need only initial conditions, unlike incoming and outgoing lines.We report a table for the simulation of the network, denoting with ρ i,0 and ρ bi,0 the initial conditions and the boundary data (if necessary) on the i−th line, respectively.For the inner lines of the network, that are not contained in the previous table, an initial condition of 0.75 is assumed.

Simulation features
In this section, we show some simulation results for different choices of priority parameters and distribution coefficients.As in [4], we consider approximations obtained by the numerical method of Godunov ([12]), with space step ∆x = 0.0125 and time step determined by the CFL condition ( [11]).The telecommunication network is simulated in a time interval [0, T ], where T = 50 min.We study four simulation cases, considering the flux function (2) or the flux function (3): 1. parameters, that optimize the cost functionals J 1 and J 2 (optimal case).The technique for the simulation of the optimal case is based on the local optimization of every node, which is inside the network; 2. random parameters (static random case).In this type of simulation, the parameters α and p for nodes of 2 × 2 type are chosen in a random way at the beginning of the simulation process.For each simulation case, 100 static random simulations are made; 3. dynamic random parameters (dynamic random case).The parameters for nodes of 2 × 2 type change randomly at every step of the simulation process.

Simulation Graphics
In the following pictures, we show some simulation results for the simulated network, that we have considered.More precisely, we show the values of the functionals J 1 and J 2 , computed on the whole network, as function of time.It is possible to note that there is a distinction among the cost functionals and different case studies.A legend for every picture indicates the different simulation cases.

Discussion of simulation results
In this section, the results, obtained by simulations, are discussed.The algorithm of optimization, which is of local type, can be applied to complex networks, without com-   promising the possibility of a global optimization.This situation is evident if we consider the pictures of J 1 for case A and J 2 for case B. Notice that, for case A and B, the cost functionals simulated with flux function (2) are constant, which is not surprising since the initial data on the lines is less than 1 2 .In case C, we present the behaviour of the cost functionals J 1 and J 2 for flux function (2).In this case, boundary data are of Dirichlet type (unlike case A and B where we have considered Neumann boundary conditions) and the network is simulated with high incoming fluxes for the incoming lines and high initial conditions for inner lines.We can see, from Figure 5, that J 1 and J 2 are not constant as in cases A and B.Moreover, we have to consider that we have two different optimization algorithms for J 1 and J 2 .For Figure 5, we refer to such different algorithms.Notice that the dynamic random case follows the optimal case for J 2 and not for J 1 .Moreover, the optimal algorithm for J 1 presents an interesting aspect.When simulation begins, it is worst than the static random configuration.In the steady state, instead, the optimal configuration is the highest.
Let us focus our attention on the dynamic random simulation.The evolution of the simulation in the dynamic random case looks very similar to the optimal simulation for cases A and B (for case C, only J 2 presents optimal and dynamic random configurations very similar).It is necessary to consider the performances of the network in the optimal case and in the dynamic random one.We could ask if it is possible to avoid the optimization of the network, and operate in dynamic random conditions.It is obvious that a network designer, or a traffic engineer, could think that the traffic becomes very chaotic, with the consequent origin of strange phenomena, that cannot be well modelled.To give a confirmation of this intuition, one has to analyze the behaviour of the packets densities in the optimal simulation.In order to study this situation, we refer to the line 13 of the network.The choice of such line is essential, as it is a central inner one, and so the packets density is strongly influenced by the dynamics of the various nodes of the network.As we can see from Figure 6, it is evident that the density of the optimal case shows more regularity than the dynamic random configuration, which exhibits an oscillating situation.
, case C, in optimal and dynamic random simulations.Dashed line: optimal simulation for J 2 ; solid line: dynamic random simulation.

Comparison among static random and the optimal case
We can consider the simulations for the static random case, compared with the optimal case.In Figure 7, we compare some cases of static random simulations and the optimal configuration, showing that the optimal case is always higher than the static random ones for J 1 , and lower for J 2 .In the histogram of Figure 8, the values of the functionals J 1 and J 2 at the final time of simulation (T = 50), for the static random simulations, are reported for case B and flux function 3. We can refer to the table below for comparing the value of J 1 and J 2 in the optimal configuration at T = 50, called "opt T = 50" with the average value of the random static simulations at T = 50, called "rst T = 50 ".For the other simulation cases, that are not reported or with some tables or with some pictures, the situation is similar.

Analysis of a partially optimized networks
In telecommunication networks, routers receive, process and then forward packets.The packets forwarded can follow various ways to reach their destination.For this reason, it can happen that two packets forwarded by the same router can reach the same destination travelling along paths with different lengths.This is a typical phenomenon of telecommunication networks.Some problems can arise when packets have to travel from a source node, which is very near to the destination node (if we refer to Figure 2, the problems of travelling from node 1 to node 6 is a classical example).In fact, packets could be redirected towards uncongested paths and not reach their own destination.According to this situation, it is necessary to study the performances of the network when not all packets are redirected.Particularly, referring to the topology of the network of Figure 2, the node 5, 6, 10, 15 and 19 are assumed to have fixed parameters α = 0.3 and p = 0.2, while the other nodes are initialized with optimal values computed during the steps of the simulation.
The simulation indicates the behaviour of the network when some boundary nodes are not all optimized and, as we can see from (9), there are not significant changes comparing the optimal situation with the partially optimized situation, in terms of functionals.

Conclusions
In this paper, we considered the optimization of packets flow on a telecommunication network, using the fluid-dynamic model suggested in [8].The optimization is over parameters, which assign priority among incoming lines and traffic distribution among outgoing lines.Two cost functionals, measuring average velocity and average travelling time are introduced.A complete solution is provided in a simple case, and then used as local optimal choice for a decentralize control of a complex test network.
Three different choices of parameters are considered: locally optimal, static random, and dynamic random (changing in time).The local optimal and dynamic random outperform the others.Then, we consider the behaviour of packets densities on the lines, that permits to rule out the dynamic random case.
Finally, we consider a partially optimal algorithm, which well approximates the optimal one, while guaranteeing partial redirection of packets.

APPENDIX
We consider a transmission line as a sequence of nodes (routers) N k .Each node N k sends packets to the following node N k+1 and packets may be lost in such process.More precisely, if ρ max indicates the maximal amount of packets, that a single node can manage, we assume that there exists a function P : [0, ρ max ] → [0, 1], that determines the packets loss probability as function of the packets density ρ.Let δ be the distance between two consecutive nodes N k and N k+1 , ∆t 0 be the transmission time of the packets from node N k to node N k+1 when they are sent with success at the first attempt and, finally, ∆t av be the average transmission time when some packets are lost by the node N k+1 .Also denote by v = δ/∆t 0 and v = δ/∆t av the packets speeds in the two cases.The average transmission time is then given by ∆t av = +∞ n=1 n∆t 0 (1 − P) P n−1 = ∆t 0 1 − P .
Indeed, if Q is the total amount of packets to be sent, then the first time (1 − P)Q packets are sent successfully and PQ are lost.Thus (1−P)Q packets take ∆t 0 time to reach N k+1 , while PQ are sent again.By simple computations, (1 − P)P n Q are sent successfully at the n-th attempt, thus taking n∆t 0 time to reach N k+1 .Therefore, Once the average velocity function v is determined, the corresponding flux function is given by f (ρ) = ρv(ρ).We thus immediately get the following: The flux function f is concave if and only if ρP (ρ) + 2P (ρ) ≥ 0.
We assume: (A) the loss probability function P is smooth and increasing, i.e.P (ρ) ≥ 0. The corresponding flux function f is concave and has a unique maximum.
The first assumption is quite natural, while the second permits a simpler mathematical treatment.There are various possible choices of the loss probability function P satisfying (A).In [8] it was considered: Since the flux is given by f (ρ) = ρv (ρ), setting for simplicity, v = ρ max = 1, we obtain that Another natural flux function is that used also in car traffic simulation, see [23], and given by For our simulations, we use two types of flux functions, namely (8) and by (9).Now, for every P satisfying (A), let us define and σ 2 (P) to be the maximum point of f .We easily get the following: Proposition 14 Given P satisfying (A), we have σ 1 (P) ≤ σ 2 (P).Moreover, v is constant on [0, σ 2 (P)] if and only if σ 1 (P) = σ 2 (P).
For a single conservation law (1) on a real line, a Riemann Problem (briefly RP) is a Cauchy problem with initial data piecewise constant having only one discontinuity.The solutions are either formed by continuous waves, called rarefactions, or by travelling discontinuities, called shocks.The velocity of the waves is linked to the values of f (ρ) .In a similar manner, we call RP at a node the Cauchy problem corresponding to an initial data, which is constant on each line.As the condition (10) does not guarantee the uniqueness of solutions, further conditions are needed.We aim at finding a systematic way of solving RP at nodes as described by next definition.
For packets traffic flow, in [8], a Riemann solver was introduced, based on the following rule: (RA) Packets are processed by arrival time (FIFO policy) and sent to the outgoing lines in order to maximize the flux.
A telecommunication network (following [8], [23], [24]) consists of a finite set of transmission lines, modelled by intervals with one of the endpoints that can be infinite.The lines are connected by some nodes, and each node J has a finite number of incoming and outgoing lines; hence, the complete model can be described by the couple (I, J ) , where I = {I i : i = 1, ..., N } is the set of lines, while J is the collection of nodes.
On each transmission line, the evolution is given by equation ( 1), while a Riemann solver RS J must be assigned for every junction J.A set of initial data consists of initial density functions ρ i , i = 1, . . ., N .If an extreme point a i (or b i ) of a line I i is not infinite and is not connected to any junction J, then a boundary datum must be assigned.For every initial-boundary data, one can construct solutions on the whole network by wave front tracking methods, see [10].
We want to construct a Riemann solver at nodes, which satisfies the rule (RA).In particular, we treat the case of a node with two incoming lines and two outgoing lines, i.e a node with n = m = 2. Our RS will depend on some control parameters, α and p.First, we need some additional notation.Consider a node J with n incoming lines and m outgoing lines.We indicate the packets densities on incoming lines and outgoing lines, respectively, by ρ ϕ (t, x) ∈ [0, 1] , ϕ = 1, ..., n, and ρ ψ (t, x) ∈ [0, 1] , ψ = n + 1, ..., n + m, and by (ρ ϕ,0 , ρ ψ,0 ) the initial data.We define: We remark that waves generated on incoming lines from the node must have negative velocity, while those generated on outgoing lines must have positive velocity, thus we get: Proposition 17 Consider a flux function given by (8) or (9).Let RS be a Riemann Solver for a node, ρ 0 = (ρ ϕ,0 , ρ ψ,0 ) the initial data and RS(ρ 0 ) = ρ = (ρ ϕ , ρψ ).Then, for every ϕ, and for every ψ.
From Proposition 17, we get immediately also bounds on possible flux values: Proposition 18 Consider a flux function given by ( 8) or (9).Let RS be a Riemann Solver for a node, ρ 0 = (ρ ϕ,0 , ρ ψ,0 ) the initial data, γ max ϕ , and γ max ψ , be the maximum fluxes that can be obtained on incoming lines and outgoing lines, respectively.Then: Another consequence of Proposition 17 is the following: Proposition 19 Consider a flux function given by ( 8) or (9).Let RS be a Riemann Solver for a node, ρ 0 = (ρ ϕ,0 , ρ ψ,0 ) the initial data and ρ = RS(ρ 0 ).Then, to describe the solution on each transmission line, it is enough to specify the flux values γϕ = f (ρ ϕ ) and γψ = f (ρ ψ ).
Proof.It is enough to notice that, for each ρ ϕ,0 and each flux values γ, there is at most one density value ρ, which satisfies f (ρ) = γ and the bounds given in the statement of Proposition 17.The same conclusion holds for ρ ψ,0 .In order to determine γ a and γ b , we have to distinguish two cases: There are two different cases, represented in Figure 11: P belongs to Ω, or P does not belong to Ω.In the first case, we set ( γ a , γ b ) = P, while, in the second case, we set ( γ a , γ b ) = Q = proj Ω∩r Γ (P ) , where proj is the projection on the convex set Ω ∩ r Γ .

Figure 1 :
Figure 1: Jumps for the functional J 1 for T sufficiently big.

Figure 3 :
Figure 3: J 1 for flux function (3), case A, and zoom around the optimal and dynamic random case (right).

Figure 4 :
Figure 4: J 2 for flux function (3), case B, and zoom around the optimal and dynamic random case (right).

Figure 6 :
Figure 6: Behaviour of the density on the line 13 of the network of Figure 2, for t = 10, flux function (2), case C, in optimal and dynamic random simulations.Dashed line: optimal simulation for J 2 ; solid line: dynamic random simulation.

2 Figure 7 :
Figure 7: Some cases of static random simulations and optimal configuration for: J 1 for flux function (3), case A; J 2 for flux function (3), case B. Dashed line: optimal simulation; solid lines: static random simulations.

Figure 8 :
Figure 8: Histograms for the static random values of the simulations at T = 50 for J 1 (left) and J 2 (right), case B, and flux function (3).Dashed line: rst T = 50.

1 Figure 9 :
Figure 9: Comparison between the optimal and the partially optimal behaviour of J 1 for flux function (3), case A. Dot line: optimal simulation; dashed line: partially optimal simulation.

Figure 10 :
Figure 10: Network with two incoming lines and two outgoing lines.
a) Γ = Γ in .In this case, we set γ a = γ max a and γ b = γ max b .b) Γ < Γ in .Here, we have to use a priority parameter, p ∈ ]0, 1[, because not all packets can enter the node o.If C is the amount of packets that can do it, then pC packets come from the first incoming line and (1 − p) C packets from the second one.Consider the space (γ a , γ b ) and define the lines: r Γ : γ a + γ b = Γ, r p : γ b = 1 − p p γ a .Let P be the point of intersection among r Γ and r p .The final fluxes must belong to the region Ω = {(γ a , γ b ) : 0 ≤ γ a ≤ γ max a , 0 ≤ γ b ≤ γ max b } .

Figure 11 :Figure 12 :
Figure 11: P belongs to Ω (left), or P does not belong to Ω (right) in the case Γ < Γ in .

Table 1 :
Initial conditions and boundary data for the lines of the network for the case A.

Table 2 :
Initial conditions and boundary data for the lines of the network for the case C.