# Reinforcement Learning Ramp Metering without Complete Information

Authors: Xing-Ju Wang; Xiao-Ming Xi; Gui-Feng Gao
Journal: Journal of Control Science and Engineering
 (2012)

---

## Abstract

This paper develops a model of reinforcement learning ramp metering (RLRM) without complete information, which is applied to alleviate traffic congestions on ramps. RLRM consists of prediction tools depending on traffic flow simulation and optimal choice model based on reinforcement learning theories. Moreover, it is also a dynamic process with abilities of automaticity, memory and performance feedback. Numerical cases are given in this study to demonstrate RLRM such as calculating outflow rate, density, average speed, and travel time compared to no control and fixed-time control. Results indicate that the greater is the inflow, the more is the effect. In addition, the stability of RLRM is better than fixed-time control.


---

## Body

## 1. Introduction

Increasing dependence on car-based travel has led to the daily occurrence of recurrent and nonrecurrent freeway congestions not only in China but also around the world. Congestion on highways forms when the demand exceeds capacity. Recurrent congestion reduces substantially the available infrastructure capacity at rush hour, that is, at the time this capacity is most urgently needed. Moreover, congestion also causes delays, increases environmental pollution, and reduces traffic safety.Ramp metering is essential to the efficient operation of highways, particularly when volumes are high. According to Papageorgiou and others, ramp metering is divided roughly into the reacted type and the preceded type [1]. DC (demand-capacity), OCC (occupancy), and ALNEA [2] are among the well-known local response type ramp metering [3]. In DC, the actual upstream volume is measured at regular short intervals and is then compared to the downstream capacity, which may be calculated by using downstream traffic conditions. OCC uses a predetermined relationship between occupancy rate and lane volume, developed from data previously collected at the highway adjacent to the ramp being considered. ALNEA is the ramp metering which sets up the private-use rate of an onramp based on the measured value of main line traffic. ALINEA has an example of application in some countries of Europe and is made highly validated compared to DC and OCC. Iwata, Tsubota, and Kawashima have proposed the ramp metering technique using the predicted value by a traffic simulator [4]. Reinforcement learning ramp metering based on traffic simulation model with desired speed was proposed by Wang et al. [5]. The aim of this study is to propose reinforcement learning ramp metering without complete information.


## 2. Methods

### 2.1. Traffic Flow Simulation Model

Figure1 describes car-following behaviors. In a microsimulation model, a modeled fundamental behavior is the “car-following” which adjusts the driver’s characteristics: the distance between two adjacent cars, the relative speed, and so forth.Figure 1
Car-following behavior.In 1953, Pipes proposed the following basic differential equation model for car-following behavior:(1)ẍn+1(t)=a[ẋn(t)-ẋn+1(t)],
where ẍ, ẋ, and x denote the acceleration, speed, and distance from the reference point of vehicle n, respectively, and a is a constant. In the model, the acceleration of the vehicle which follows a leading vehicle is proportional to the speed difference between the vehicles. It is assumed that the delay of time in which the vehicle responds to the speed difference is so small that it can be neglected. To remove this drawback, Chandler introduced a reactive delay time T. Based on the rationale that the acceleration of the following car is also influenced by its speed and the distance between the vehicles, Gazis, Herman, and Rothery proposed the general type of car-following model:(2)ẍn+1(t+T)=a[ẋn+1(t+T)]m[ẋn(t)-ẋn+1(t)][xn(t)-xn+1(t)]l.Newell proposed the following model in which the acceleration is propositional to an exponential function of the distance between the vehicles, based on real data:(3)ẍn+1(t+T)=a1[ẋn(t)-ẋn+1(t)]×l-(a2/[xn(t)-xn+1(t)-a3]).
Although the above modifications have improved the reality of car-following model, they have the following two drawbacks. When the proceeding vehicle does not exist, this implies that a car will maintain an initial speed. On the other hand, when the speed difference is 0, the acceleration is 0. This implies the unrealistic phenomenon that the following car will not apply the brake even when the distance to the preceding car approaches 0 and will not accelerate even if the distance is very long. To solve the above-mentioned problems, Treiber and Helbing introduced the intelligent driver model [6], which introduces a desired speed and a shortest distance between cars. The IDM is given as(4)v̇n=a[1-(vnv0)δ-(s*(vn,Δvn)sn)2],(5)s*(v,Δv)=s0+max⁡(Tv+vΔv2ab,0),(6)sn(t)=[xn-1-xn-l],(7)Δvn(t)=[vn(t)-vn-1(t)],wherex is distance; n is the nth car; v is the speed; l is the length of car; s0 is the desired minimum gap; a is the maximum acceleration; s* is the effective gap; b is the comfortable deceleration (a≤b); δ is the parameter; T is the time gap; ν0 is the desired speed.Figure2 presents lane change behaviors. To simulate driver’s behavior in the merging section on freeways and the merging behavior in the weave section, and so forth, the lane change model is needed [7]. We propose a new lane change model which describes driver’s behavior depending on judgment functions [8, 9]. We focus on a vehicle approaching to a confluence point and describe its behavior with several variables: the relative speed between the car and cars in current lane, the locations of both the main line cars and the on-ramp cars, driver’s judgment functions for changing his lane, and driver’s desired speed. The driver’s judgment function for the free merging is different from the judgment function for the forced merging. A free merging implies that a car on the ramp can merge into the main line without influences, and cars on the main line are not interfered. When forced merging models of psychological condition and physical condition are both satisfied, the driver conducts lane change behaviors. Otherwise, the driver continues the car-following behavior without lane change behaviors.Figure 2
Lane change behavior.Physical condition presents the ability of lane change. The lane change model with driver’s judgment function is expressed as follows:(8)h=xf-xc-L+(vf-vc)t+(-A+B)t22+δ(v0f-vf)v0fS+ζ(v0c-vc)v0cS≥S,(9)g=xc-xb-L+(vc-vb)t+(A-B)t22-θ(vb0-vf)vb0S-ξ(vc0-vc)vc0S≥S,(10)0≤A≤e,(11)0≤B≤d,whereh, g  are judgment function; x is the distance from reference point; ν  is the speed; L  is the length of a vehicle; t is the judgment time; ν0 is the desired speed, subject to normal distribution;  δ,ζ,θ,ξ(δ,ζ,θ,ξ∈[0,1])are the adjustment coefficients; A  is the rapid acceleration with upper bound e; and B is the  rapid deceleration with upper bound d. Parameters A and B are associated with vehicle c’s  judgment functions for lane change and decide the free merging or the forced merging. Since vehicle c  judges to accelerate or decelerate to merge into the main line, two events are mutually exclusive.The functionh judges whether vehicle c accelerates or decelerates to merge according to the given space and speed conditions between vehicles f and c. Similarly, the function g is applied to judge in the relationship between vehicles c and b. If both A and B take 0, the distance between two vehicles f and b is large enough for vehicle c to be accommodated to enter into the main line, then the free merging occurs (no acceleration or deceleration behavior is required for vehicle c). Conversely, in the case of the forced merging, we need to examine whether the solution of inequality (8) to (11) exists. If A and B are mutually exclusive, then the following two conditions (1) and (2) are obtained. (1)
When a rapid brake eventB does not exist, then B=0, and only an event A could happen.(2)
When a rapid acceleration eventA does not exist, then A=0, and only an event B is approved.The lane changing behavior of vehiclec could happen when a solution of (1) or (2) exists.Psychological constraints describe driver’s motivations on lane change. If the present car has not reached the desired speed and if the predicted speed of lane change is greater than that of no change, or gain speed advantage,a1 and a2  describe predicted acceleration of lane change and no lane change, respectively. a1 and a2 are given from the IDM. Then the psychological constraints can be given by(12)a1<a2.If (12) has a solution, the driver has maneuvers of changing the current lane to the target lane. Conversely, the driver does not conduct the lane changing maneuvers.Lane change behaviors can be characterized as a sequence of three stages: the ability of lane change (physical condition); the motivation of lane change (psychological constraints); the execution of lane change. When lane change models of psychological condition and physical condition are both satisfied, the driver conducts the above-mentioned three stages. Otherwise, the driver continues the car-following behavior without lane change behaviors.We develop a traffic flow simulation model consisting of car-following model and lane change model [10–12]. ﻿The basic concept of car-following theories is the relationship between stimuli and response. In the classic car-following theory, the stimuli are represented by the relative speed of following and leading vehicle, and the response is represented by the acceleration (or deceleration) rate of the following vehicle. The car-following model describes following behaviors that drivers follow each other in the traffic stream on only one lane. To reproduce the traffic flow in two or more lanes, lane change model which explores lane change behaviors is needed. By using the car-following model and lane change model, we express dynamic and complex traffic behaviors in two or more lanes. Moreover, traffic flow simulation models are applied to reproduce the traffic congestion represented by Helbing and Kerner [13–16].


### 2.2. The Reinforcement Learning Ramp Metering

Reinforcement learning is a kind of machine learning treating the problem at which the agent under a certain environment determines the action. And the action should observe and take the present state. An agent gets reward from environment by choosing actions. Reinforcement learning learns a policy from which most reward is obtained through a series of actions [17]. Reinforcement learning is a broad class of optimal control methods depending on estimating value functions from experience or simulations [18–21].The model of reinforcement learning ramp metering (RLRM) is shown in Figure3. qin  is the inflow of the upstream of the  main line; r is the metering rate; qout  is the  outflow of the downstream of main line; dm is the density of the main line in merging section; dr is the density of onramp; vm  is the average speed of the main line; vr is the average speed of onramp.(13)q=qin+r-qout.Figure 3
Reinforcement learning ramp metering model.According to the volumeq in merging section, upstream traffic qin is updated by(14)qint+1⟵qint+1+q,whereqin called state variable can be collected by the control variable detector. r is set as a choosing action variable. Moreover, qout is the reward based on the choosing action. ρL is the traffic density in the merging section of L long. ρL can be obtained by(15)ρL=qint+1L.According to Figure4, the framework of RLRM is explained briefly. RLRM consists of metering rate choice model, outflow function, value function, and environmental model. The metering rate choice model is a rule to choose the optimal metering rate. Outflow function describes the data of downstream traffic which can be collected and calculated by detectors. Value function presents the total of volumes of downstream traffic. Environmental model predicts inflow and outflow in the next period of time depending on optimal metering rate and inflow.Figure 4
Block diagram for reinforcement learning ramp metering.


### 2.3. RLRM with Complete Information

The RLRM with complete information faces a Markov decision problem (MDP). In addition, since inflow and metering rate’s set denotesS, A(qin)(qint∈S) is finite. We typically use a set of matrices(16)Rqinqin′r=Pr{qint+1=qin′∣qint=qin,rt=r}to describe the transition structure. Traffic outflow at timet is obtained by(17)Rqinqin′r=E{qoutt+1∣qint=qin,rt=r,qint+1=qin′},for allqin∈S, for all r∈A(qin), and for all qin′∈S+.If maximum outflowV* or Q* is given by Bellman formula, we have(18)Vπ(qin)=max⁡rE{qoutt+1+λV*(qint+1)∣qint=qin,rt=r}=max⁡r∑qin′Pqinqin′r[qoutqinqin′r+λVπ(qin′)],or(19)Q*(qin,r)=E{qoutt+1+λmax⁡r′Q*(qint+1,r′)∣qint=qin,rt=r}=∑qin′Pqinqin′r[Rqinqin′r+λmax⁡r′Q*(qin′,r′)].We can obtain transit probabilityPqinqin′r and next outflow Vπ(qin) with MDP’s complete information. And we assume that traffic outflow is finite. Moreover, we can also compute traffic outflow.


### 2.4. RLRM without Complete Information

Supposed Markov decision process with complete information is given in Section2.3. But this argument is untenable in fact. We can give ramp metering rate by using evaluation of the experience without complete information. Since transit probability is not necessary, we can rewrite (18) as(20)Vπ(qint)=Vπ(qint)+at[qoutt-Vπ(qint)],whereqoutt is real time outflow at time t, and constant at is transit probability function of t.  Equation (19) can be replaced by(21)Q(qint,rt)⟵Q(qint,rt)+at[qout+λE{Q(qint+1,rt+1∣st)}-Q(qint,rt)].If expected value of metering rate is not given, we also replace(22)qout+λE{Q(qint+1,rt+1st)}-Q(qint,rt)by(23)qout+λ∑aπ(qint,rt)Q(qint+1,rt)-Q(qint,rt).We get(24)Q(qint,rt)⟵Q(qint,rt)+at[qout+λ∑aπ(qint,rt)Q(qint+1,rt)-Q(qint,rt)].We suppose that the probability of on-ramp control policyπ can be obtained in (24). Here, it is difficult to satisfy the initial condition. The values ∑aπ(qint,rt)Q(qint+1,rt)   associated with an optimal on-ramp control policy are called the optimal ramp inflow and are often written as maxQ(qint+1,r). We get(25)Q(qint,rt)⟵Q(qint,rt)+at[qout+λmax⁡Q(qint+1,r)-Q(qint,rt)],where(26)∑t=1∞at=∞,(27)∑t=1∞at2<∞.In the (25), the action value function Q is gained by learning approximates Q* (the optimal action value function) directly by using current policy. The state variable can be updated depending on the policy.When the traffic reaches the jam density, it is possible to result in closure of the ramp for a long period of time, which must be taken into consideration. Maximum of waiting time(Tmax) and its metering rate (rT) are given. When  ∑n=1mTSn>Tmax, the control (qint,rT) is selected. In order to remove the curse of dimensionality, the discrete equation of the continuous variable rt  is represented. The average difference between 0 and rmax  is divided by rn. rn is given by(28)Nr=cell(rmax⁡rn),whereNr is the amount of the metering rate, and  cell is the function of the bottom integral function. The metering rate is max(krn,rmax)for k∈N.The algorithm of reinforcement learning on-ramp metering is shown in Figure5.(1)
InitializeQ, qout, qin, and k.(2)
Determine cycle time of a traffic signalt.(3)
Updateqint.(4)
Give metering rate byrt=k×rn.(5)
Determine the traffic state(qint,rt).(6)
Generate the densityρL by using traffic simulation and choose the metering rate.(7)
Ifrt<rmax, then update k=k+1 and go to (4), and otherwise generate the optimal control (qint,r*).(8)
If one closes the ramp, then update waiting timeT  by =T+t, and otherwise initialize the waiting time T  by T=0. If T>Tmax, then update metering rate by  rT→r*.(9)
Operate the optimal control(qint,r*) and update Q.Figure 5
Algorithm of reinforcement learning ramp metering.When the cycle timet  is over, determine to continue the ramp metering. If yes, then collect the data of inflow qint+1, go to (3), and update qint, that is, qint+1→qint; otherwise, complete the ramp metering.


## 2.1. Traffic Flow Simulation Model

Figure1 describes car-following behaviors. In a microsimulation model, a modeled fundamental behavior is the “car-following” which adjusts the driver’s characteristics: the distance between two adjacent cars, the relative speed, and so forth.Figure 1
Car-following behavior.In 1953, Pipes proposed the following basic differential equation model for car-following behavior:(1)ẍn+1(t)=a[ẋn(t)-ẋn+1(t)],
where ẍ, ẋ, and x denote the acceleration, speed, and distance from the reference point of vehicle n, respectively, and a is a constant. In the model, the acceleration of the vehicle which follows a leading vehicle is proportional to the speed difference between the vehicles. It is assumed that the delay of time in which the vehicle responds to the speed difference is so small that it can be neglected. To remove this drawback, Chandler introduced a reactive delay time T. Based on the rationale that the acceleration of the following car is also influenced by its speed and the distance between the vehicles, Gazis, Herman, and Rothery proposed the general type of car-following model:(2)ẍn+1(t+T)=a[ẋn+1(t+T)]m[ẋn(t)-ẋn+1(t)][xn(t)-xn+1(t)]l.Newell proposed the following model in which the acceleration is propositional to an exponential function of the distance between the vehicles, based on real data:(3)ẍn+1(t+T)=a1[ẋn(t)-ẋn+1(t)]×l-(a2/[xn(t)-xn+1(t)-a3]).
Although the above modifications have improved the reality of car-following model, they have the following two drawbacks. When the proceeding vehicle does not exist, this implies that a car will maintain an initial speed. On the other hand, when the speed difference is 0, the acceleration is 0. This implies the unrealistic phenomenon that the following car will not apply the brake even when the distance to the preceding car approaches 0 and will not accelerate even if the distance is very long. To solve the above-mentioned problems, Treiber and Helbing introduced the intelligent driver model [6], which introduces a desired speed and a shortest distance between cars. The IDM is given as(4)v̇n=a[1-(vnv0)δ-(s*(vn,Δvn)sn)2],(5)s*(v,Δv)=s0+max⁡(Tv+vΔv2ab,0),(6)sn(t)=[xn-1-xn-l],(7)Δvn(t)=[vn(t)-vn-1(t)],wherex is distance; n is the nth car; v is the speed; l is the length of car; s0 is the desired minimum gap; a is the maximum acceleration; s* is the effective gap; b is the comfortable deceleration (a≤b); δ is the parameter; T is the time gap; ν0 is the desired speed.Figure2 presents lane change behaviors. To simulate driver’s behavior in the merging section on freeways and the merging behavior in the weave section, and so forth, the lane change model is needed [7]. We propose a new lane change model which describes driver’s behavior depending on judgment functions [8, 9]. We focus on a vehicle approaching to a confluence point and describe its behavior with several variables: the relative speed between the car and cars in current lane, the locations of both the main line cars and the on-ramp cars, driver’s judgment functions for changing his lane, and driver’s desired speed. The driver’s judgment function for the free merging is different from the judgment function for the forced merging. A free merging implies that a car on the ramp can merge into the main line without influences, and cars on the main line are not interfered. When forced merging models of psychological condition and physical condition are both satisfied, the driver conducts lane change behaviors. Otherwise, the driver continues the car-following behavior without lane change behaviors.Figure 2
Lane change behavior.Physical condition presents the ability of lane change. The lane change model with driver’s judgment function is expressed as follows:(8)h=xf-xc-L+(vf-vc)t+(-A+B)t22+δ(v0f-vf)v0fS+ζ(v0c-vc)v0cS≥S,(9)g=xc-xb-L+(vc-vb)t+(A-B)t22-θ(vb0-vf)vb0S-ξ(vc0-vc)vc0S≥S,(10)0≤A≤e,(11)0≤B≤d,whereh, g  are judgment function; x is the distance from reference point; ν  is the speed; L  is the length of a vehicle; t is the judgment time; ν0 is the desired speed, subject to normal distribution;  δ,ζ,θ,ξ(δ,ζ,θ,ξ∈[0,1])are the adjustment coefficients; A  is the rapid acceleration with upper bound e; and B is the  rapid deceleration with upper bound d. Parameters A and B are associated with vehicle c’s  judgment functions for lane change and decide the free merging or the forced merging. Since vehicle c  judges to accelerate or decelerate to merge into the main line, two events are mutually exclusive.The functionh judges whether vehicle c accelerates or decelerates to merge according to the given space and speed conditions between vehicles f and c. Similarly, the function g is applied to judge in the relationship between vehicles c and b. If both A and B take 0, the distance between two vehicles f and b is large enough for vehicle c to be accommodated to enter into the main line, then the free merging occurs (no acceleration or deceleration behavior is required for vehicle c). Conversely, in the case of the forced merging, we need to examine whether the solution of inequality (8) to (11) exists. If A and B are mutually exclusive, then the following two conditions (1) and (2) are obtained. (1)
When a rapid brake eventB does not exist, then B=0, and only an event A could happen.(2)
When a rapid acceleration eventA does not exist, then A=0, and only an event B is approved.The lane changing behavior of vehiclec could happen when a solution of (1) or (2) exists.Psychological constraints describe driver’s motivations on lane change. If the present car has not reached the desired speed and if the predicted speed of lane change is greater than that of no change, or gain speed advantage,a1 and a2  describe predicted acceleration of lane change and no lane change, respectively. a1 and a2 are given from the IDM. Then the psychological constraints can be given by(12)a1<a2.If (12) has a solution, the driver has maneuvers of changing the current lane to the target lane. Conversely, the driver does not conduct the lane changing maneuvers.Lane change behaviors can be characterized as a sequence of three stages: the ability of lane change (physical condition); the motivation of lane change (psychological constraints); the execution of lane change. When lane change models of psychological condition and physical condition are both satisfied, the driver conducts the above-mentioned three stages. Otherwise, the driver continues the car-following behavior without lane change behaviors.We develop a traffic flow simulation model consisting of car-following model and lane change model [10–12]. ﻿The basic concept of car-following theories is the relationship between stimuli and response. In the classic car-following theory, the stimuli are represented by the relative speed of following and leading vehicle, and the response is represented by the acceleration (or deceleration) rate of the following vehicle. The car-following model describes following behaviors that drivers follow each other in the traffic stream on only one lane. To reproduce the traffic flow in two or more lanes, lane change model which explores lane change behaviors is needed. By using the car-following model and lane change model, we express dynamic and complex traffic behaviors in two or more lanes. Moreover, traffic flow simulation models are applied to reproduce the traffic congestion represented by Helbing and Kerner [13–16].


## 2.2. The Reinforcement Learning Ramp Metering

Reinforcement learning is a kind of machine learning treating the problem at which the agent under a certain environment determines the action. And the action should observe and take the present state. An agent gets reward from environment by choosing actions. Reinforcement learning learns a policy from which most reward is obtained through a series of actions [17]. Reinforcement learning is a broad class of optimal control methods depending on estimating value functions from experience or simulations [18–21].The model of reinforcement learning ramp metering (RLRM) is shown in Figure3. qin  is the inflow of the upstream of the  main line; r is the metering rate; qout  is the  outflow of the downstream of main line; dm is the density of the main line in merging section; dr is the density of onramp; vm  is the average speed of the main line; vr is the average speed of onramp.(13)q=qin+r-qout.Figure 3
Reinforcement learning ramp metering model.According to the volumeq in merging section, upstream traffic qin is updated by(14)qint+1⟵qint+1+q,whereqin called state variable can be collected by the control variable detector. r is set as a choosing action variable. Moreover, qout is the reward based on the choosing action. ρL is the traffic density in the merging section of L long. ρL can be obtained by(15)ρL=qint+1L.According to Figure4, the framework of RLRM is explained briefly. RLRM consists of metering rate choice model, outflow function, value function, and environmental model. The metering rate choice model is a rule to choose the optimal metering rate. Outflow function describes the data of downstream traffic which can be collected and calculated by detectors. Value function presents the total of volumes of downstream traffic. Environmental model predicts inflow and outflow in the next period of time depending on optimal metering rate and inflow.Figure 4
Block diagram for reinforcement learning ramp metering.


## 2.3. RLRM with Complete Information

The RLRM with complete information faces a Markov decision problem (MDP). In addition, since inflow and metering rate’s set denotesS, A(qin)(qint∈S) is finite. We typically use a set of matrices(16)Rqinqin′r=Pr{qint+1=qin′∣qint=qin,rt=r}to describe the transition structure. Traffic outflow at timet is obtained by(17)Rqinqin′r=E{qoutt+1∣qint=qin,rt=r,qint+1=qin′},for allqin∈S, for all r∈A(qin), and for all qin′∈S+.If maximum outflowV* or Q* is given by Bellman formula, we have(18)Vπ(qin)=max⁡rE{qoutt+1+λV*(qint+1)∣qint=qin,rt=r}=max⁡r∑qin′Pqinqin′r[qoutqinqin′r+λVπ(qin′)],or(19)Q*(qin,r)=E{qoutt+1+λmax⁡r′Q*(qint+1,r′)∣qint=qin,rt=r}=∑qin′Pqinqin′r[Rqinqin′r+λmax⁡r′Q*(qin′,r′)].We can obtain transit probabilityPqinqin′r and next outflow Vπ(qin) with MDP’s complete information. And we assume that traffic outflow is finite. Moreover, we can also compute traffic outflow.


## 2.4. RLRM without Complete Information

Supposed Markov decision process with complete information is given in Section2.3. But this argument is untenable in fact. We can give ramp metering rate by using evaluation of the experience without complete information. Since transit probability is not necessary, we can rewrite (18) as(20)Vπ(qint)=Vπ(qint)+at[qoutt-Vπ(qint)],whereqoutt is real time outflow at time t, and constant at is transit probability function of t.  Equation (19) can be replaced by(21)Q(qint,rt)⟵Q(qint,rt)+at[qout+λE{Q(qint+1,rt+1∣st)}-Q(qint,rt)].If expected value of metering rate is not given, we also replace(22)qout+λE{Q(qint+1,rt+1st)}-Q(qint,rt)by(23)qout+λ∑aπ(qint,rt)Q(qint+1,rt)-Q(qint,rt).We get(24)Q(qint,rt)⟵Q(qint,rt)+at[qout+λ∑aπ(qint,rt)Q(qint+1,rt)-Q(qint,rt)].We suppose that the probability of on-ramp control policyπ can be obtained in (24). Here, it is difficult to satisfy the initial condition. The values ∑aπ(qint,rt)Q(qint+1,rt)   associated with an optimal on-ramp control policy are called the optimal ramp inflow and are often written as maxQ(qint+1,r). We get(25)Q(qint,rt)⟵Q(qint,rt)+at[qout+λmax⁡Q(qint+1,r)-Q(qint,rt)],where(26)∑t=1∞at=∞,(27)∑t=1∞at2<∞.In the (25), the action value function Q is gained by learning approximates Q* (the optimal action value function) directly by using current policy. The state variable can be updated depending on the policy.When the traffic reaches the jam density, it is possible to result in closure of the ramp for a long period of time, which must be taken into consideration. Maximum of waiting time(Tmax) and its metering rate (rT) are given. When  ∑n=1mTSn>Tmax, the control (qint,rT) is selected. In order to remove the curse of dimensionality, the discrete equation of the continuous variable rt  is represented. The average difference between 0 and rmax  is divided by rn. rn is given by(28)Nr=cell(rmax⁡rn),whereNr is the amount of the metering rate, and  cell is the function of the bottom integral function. The metering rate is max(krn,rmax)for k∈N.The algorithm of reinforcement learning on-ramp metering is shown in Figure5.(1)
InitializeQ, qout, qin, and k.(2)
Determine cycle time of a traffic signalt.(3)
Updateqint.(4)
Give metering rate byrt=k×rn.(5)
Determine the traffic state(qint,rt).(6)
Generate the densityρL by using traffic simulation and choose the metering rate.(7)
Ifrt<rmax, then update k=k+1 and go to (4), and otherwise generate the optimal control (qint,r*).(8)
If one closes the ramp, then update waiting timeT  by =T+t, and otherwise initialize the waiting time T  by T=0. If T>Tmax, then update metering rate by  rT→r*.(9)
Operate the optimal control(qint,r*) and update Q.Figure 5
Algorithm of reinforcement learning ramp metering.When the cycle timet  is over, determine to continue the ramp metering. If yes, then collect the data of inflow qint+1, go to (3), and update qint, that is, qint+1→qint; otherwise, complete the ramp metering.


## 3. Data Combination and Reduction

Our aim is to design a reinforcement learning control law for the ramp metering controller without complete information. We need to control the inflow from the ramp into main line, and the metering rate should be given by traffic states. Traffic flow simulation is conducted to demonstrate this control of the ramp metering. In our simulation, we set the main line length on highways to 1000 m, ramp length to 200 m, and length in merging sections of the main line and ramp to100 m. Parameters of RLRM are shown in Table1, and the metering rate matrix is {0,100,200,300,……,900,1000,1100}.Table 1
RLRM parameters.
Tmax(min)rTrmaxrnNr5200110010011Table2 shows the inflow of cases A, B, C, D, E, and F. Inflow rate of the main line increases from 1200 pcu/hour of case A to 2500 pcu/hour of case F. Moreover, inflow rate of ramp rises from 300 pcu/hour of case A to 900 pcu/hour of case F. The cycle length of the fixed-time control is 20 s which consists of 15 s green time and 5s red time.Table 2
Traffic inflow.
CaseABCDEFInflow of main line (pcu/hour)120015001800180025002500Inflow of ramp (pcu/hour)300300600900600900Total inflow150018002400270031003400


## 4. Result and Discussion

The results of no control, fixed-time control, and RLRM are shown in Figures6–9. Total inflow increases from 1500 pcu/h in case A to 3400 pcu/h in case F. Figure 6 presents average speed and its rate compared to no control. The average speed of no control, about 108 km/h, is faster than fixedtime and RLRM in case A. The similar results are shown in case B. The average speed of no control, about 79 km/h, is faster than fixedtime and is slower than RLRM in case C. The average speed of no control, about 51 km/h, is slower than fixedtime and RLRM in case F. According to the average speed, rates of congestion reliefs of fixed-time control from case A to case F arrive at −7.80%, −6.65%, −3.77%, 0. 26%, 2.70%, and 8.26%, respectively. In addition, rates of congestion reliefs of RLRM from case A to case F arrive at −6.31%, −6.49%, 5.69%, 13.55%, 20.50%, and 18.18%, respectively.Figure 6
Average speed and its rate compared to no control.Figure 7
Density and its rate compared to no control.Figure 8
Outflow and its rate compared to no control.Figure 9
Travel time and its rate compared to no control.Figure7 describes density and its rate compared to no control. Densities of fixed-time control and RLRM are about 38 pcu/km, an about 60% increase, in case A. Densities of fixed-time control and RLRM are about 52 pcu/km and 45 pcu/km, about 11.46% and 22.60% decreases, in case C. Densities of fixed-time control, no control, and RLRM are about 120 pcu/km. According to densities, rates of congestion reliefs of fixed-time control from case A to case F arrive at −57.55%, −19.92%, −11.46%, −21.35%, 7.6%, and 0.39%, respectively. In addition, rates of congestion reliefs of RLRM from case A to case F arrive at −59.59%, −22.05%, 22.60%, 8.18%, 9.65%, and 3.42%, respectively.Figure8 shows outflow and its rate compared to no control. Outflow rate rises from 1700 pcu/h without control to 2308 pcu/h with fixed-time control and 1800 pcu/h with RLRM in case A. Moreover, 3.82% and 7.85% increases are shown depending on outflow rate in case C. In addition, 18.97% and 30.65% increases are explored depending on outflow rate in case F. Rates of congestion reliefs of fixed-time control from case A to case F arrive at 35.76%, −14.25%, 7.82%, 7.93%, 12.51%, and 18.97%, respectively. On the other hand, rates of congestion reliefs of RLRM from case A to case F arrive at 7.06%, 0.58%, 3.85%, 10.47%, 54.63%, and 30.65%, respectively.Figure9 represents travel time and its rate compared to no control. According to travel time, 6.25% and 9.38% increases are explored in case A. Travel time rises from 342 s without control to 370 s with fixed-time control and falls into 330 s with RLRM in case C. Travel time falls from 617 s to 469 s with fixed-time control and 343 s with RLRM in case F. Rates of congestion reliefs of fixed-time control from case A to case F arrive at −6.25%, −25.26%, −8.19%, 7.36%, 27.06%, and 23.99%, respectively. On the other hand, rates of congestion reliefs of RLRM from case A to case F arrive at −9.38%, −5.26%, 3.51%, 38.17%, 40.32%, and 44.41%, respectively.According to Figures6–9 when the traffic inflows are low, controls not efficient. Controls get efficient with the traffic inflows increasing. Controls are very efficient, and RLRM is optimal control when the traffic inflows are high. Moreover, based on curves of Figures 7–9 assessment indicators of fixed-time control fluctuate around indicators of no control. Fixed-time control shows instability compared to RLRM. Abilities of automaticity, memory, and performance feedback of RLRM are also shown.


## 5. Conclusion

The on-ramp metering ensures that traffic moves at a speed approximately equal to the optimum speed which results in maximum flow rates or travel time. This study develops an RLRM model without complete information, which consists of prediction tools depending on traffic flow simulation and optimal choice model based on reinforcement learning theories. Numerical cases are given to demonstrate RLRM compared to no control and fixed-time control. In addition, densities and outflow rates are calculated. Moreover, average speeds are computed, and travel times are assessed. According to cases A, B, C, D, E, and F, fixed-time control and RLRM are discussed depending on average speeds, densities, outflow rates, and travel times. When traffic inflow is low, controls are not efficient, and there are little differences among no control, fixed-time control, and RLRM. On the other hand, when traffic inflow is high, controls are very efficient, and RLRM is optimal control. Moreover, the greater is inflow, the more is the effect. In addition, the stability of RLRM is better than fixed-time control.



---

*Source: 208456-2012-03-05.xml*