<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">AJCM</journal-id><journal-title-group><journal-title>American Journal of Computational Mathematics</journal-title></journal-title-group><issn pub-type="epub">2161-1203</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ajcm.2016.62007</article-id><article-id pub-id-type="publisher-id">AJCM-65971</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Inflow Outflow Effect and Shock Wave Analysis in a Traffic Flow Simulation
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>hsan</surname><given-names>Ali</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Laek</surname><given-names>Sazzad Andallah</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>Department of Mathematics, Jahangirnagar University, Dhaka, Bangladesh</addr-line></aff><aff id="aff1"><addr-line>Department of Electronics and Communications Engineering, East West University, Dhaka, Bangladesh</addr-line></aff><pub-date pub-type="epub"><day>27</day><month>04</month><year>2016</year></pub-date><volume>06</volume><issue>02</issue><fpage>55</fpage><lpage>65</lpage><history><date date-type="received"><day>21</day>	<month>February</month>	<year>2016</year></date><date date-type="rev-recd"><day>accepted</day>	<month>24</month>	<year>April</year>	</date><date date-type="accepted"><day>27</day>	<month>April</month>	<year>2016</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  This paper investigates the effect of inflow, outflow and shock waves in a single lane highway traffic flow problem. A constant source term has been introduced to demonstrate the inflow and outflow. The classical Lighthill Whitham and Richards (LWR) model combined with the Greenshields model is used to obtain analytical and numerical solutions. The model is treated as an IBVP and numerical solutions are presented using Lax Friedrichs scheme. Godunov method is also used to present shock wave analysis. The numerical procedures adopted in this investigation yield results which are very much consistent with real life scenario in terms of traffic density and velocity.
 
</p></abstract><kwd-group><kwd>Macroscopic Model</kwd><kwd> Source Term</kwd><kwd> Shock Wave</kwd><kwd> Lax Friedrichs Scheme</kwd><kwd> Godunov Method</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The problem of traffic congestion is becoming endemic due to increased levels of population. Traffic conditions in many major metropolitan areas are becoming increasingly congested, affecting the operational efficiency of whole networks as well as the travel cost of each trip. Therefore, traffic flow models are becoming more important in traffic engineering and the transportation policy making process. In an effort to minimize congestion, an accurate method for modeling the flow of traffic is imperative. Mainly two approaches are widely used in describing traffic flow phenomena mathematically. The first one is the microscopic model which describes flow by tracking individual vehicles using car-following logic. On the other hand, macroscopic models are concerned with describing the flow-density relationship for a traffic stream (a group of vehicles). Macroscopic models are more suitable for modeling traffic flow since less supporting data and computation are needed. In this paper, we have studied macroscopic traffic flow models.</p><p>Computer simulation of traffic is a widely used method in research of traffic modeling, planning and development of traffic networks and systems. Many research groups are involved in dealing with the problem with different kinds of traffic models for several decades [<xref ref-type="bibr" rid="scirp.65971-ref1">1</xref>] - [<xref ref-type="bibr" rid="scirp.65971-ref3">3</xref>] . In most cases, the source terms that have been appeared in traffic flow equations [<xref ref-type="bibr" rid="scirp.65971-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.65971-ref5">5</xref>] represent inflow and outflow in a single-lane highway. In this paper, some necessary modifications have been made in existing macroscopic models to represent the effect of constant rate inflow and outflow. This analysis also focuses on the existence and propagations of stationary shock waves. The approximation of scalar conservation laws is carried out by using conservative methods, such as the Lax- Friedrichs scheme and classical Godunov scheme with the use of suitable initial and boundary conditions.</p></sec><sec id="s2"><title>2. Mathematical Modeling and Procedures</title><p>If a vehicle in a single lane highway can be assumed to be a molecule, then the traffic can be defined to be an incompressible fluid which cannot be compressed after a certain density. In 1955 and 1956, Lighthill, Whitham and Richards proposed a macroscopic traffic flow model which is known as the LWR model [<xref ref-type="bibr" rid="scirp.65971-ref6">6</xref>] . According to this model, the traffic flow is represented using a first order partial differential equation. Based on a hyperbolic system of conversation laws, this equation is defined as following:</p><disp-formula id="scirp.65971-formula3"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x6.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x7.png" xlink:type="simple"/></inline-formula> is the density of cars and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x8.png" xlink:type="simple"/></inline-formula> denote the traffic flow rate (flux) all of which are functions of space, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x9.png" xlink:type="simple"/></inline-formula>and time,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x10.png" xlink:type="simple"/></inline-formula>. Flux <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x11.png" xlink:type="simple"/></inline-formula> can be written as the product of the density and of the mean velocity of the cars, i.e.<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x12.png" xlink:type="simple"/></inline-formula>. Inserting this relationship in (1), we obtain</p><disp-formula id="scirp.65971-formula4"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x13.png"  xlink:type="simple"/></disp-formula><p>A linear relationship between velocity and density proposed by Greenshields [<xref ref-type="bibr" rid="scirp.65971-ref7">7</xref>] is given by the following equation:</p><disp-formula id="scirp.65971-formula5"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x14.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x15.png" xlink:type="simple"/></inline-formula> is the maximum velocity and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x16.png" xlink:type="simple"/></inline-formula> is the maximum density of the road. This specific relationship between traffic velocity, flux and density is presented in <xref ref-type="fig" rid="fig1">Figure 1</xref>. According to [<xref ref-type="bibr" rid="scirp.65971-ref8">8</xref>] , inserting the linear velocity- density closure relationship (3) into (2), we obtain the specific first order non-linear partial differential equation of the form:</p><disp-formula id="scirp.65971-formula6"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x17.png"  xlink:type="simple"/></disp-formula><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> The fundamental <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x19.png" xlink:type="simple"/></inline-formula> diagram and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x20.png" xlink:type="simple"/></inline-formula> diagram according to Greenshields</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x18.png"/></fig><sec id="s2_1"><title>2.1. Role of Source Term in Traffic Flow Models</title><p>A source term in the Equation (4) for the vehicular density may represent entries or exits. We are concerned with the role of source terms in traffic flow models based on hyperbolic systems of conservation laws in order to account for entries and exits or local changes of the traffic in the considered road [<xref ref-type="bibr" rid="scirp.65971-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.65971-ref9">9</xref>] . After introducing a source term<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x21.png" xlink:type="simple"/></inline-formula>, Equation (4) becomes</p><disp-formula id="scirp.65971-formula7"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x22.png"  xlink:type="simple"/></disp-formula><p>If we consider the source to be a constant, the Equation (5) becomes</p><disp-formula id="scirp.65971-formula8"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x23.png"  xlink:type="simple"/></disp-formula><p>We will examine the effects of inflow and outflow using Equation (6).</p></sec><sec id="s2_2"><title>2.2. Shock Waves in Traffic Streams</title><p>The flow of traffic along a stream can be considered similar to a fluid flow. Consider a stream of traffic flowing with steady state conditions, i.e., all the vehicles in the stream are moving with a constant velocity, density and flow. Suddenly due to some obstructions in the stream (like an accident or traffic block) the steady state characteristics changes and they acquire another state of flow. In the context of traffic flow theory, the boundary which distinguishes one flow state from another is called a shock wave. Now to analyze shocks in a single lane highway, we consider the traffic flow Equation (1). We propose that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x24.png" xlink:type="simple"/></inline-formula> from the realization that the typical car velocity depends on the level of congestion, i.e. the car density. Under this assumption Equation (1) becomes</p><disp-formula id="scirp.65971-formula9"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x25.png"  xlink:type="simple"/></disp-formula><p>Since the mean velocity <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x26.png" xlink:type="simple"/></inline-formula> should clearly be a decreasing function of<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x27.png" xlink:type="simple"/></inline-formula>, reaching zero at the fully congested level<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x28.png" xlink:type="simple"/></inline-formula>, then the ﬂux<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x29.png" xlink:type="simple"/></inline-formula>, computed from the relation<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x29.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x30.png" xlink:type="simple"/></inline-formula>, must be concave, with zeros at both <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x29.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x31.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x29.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x32.png" xlink:type="simple"/></inline-formula>, and achieving its maximum value in between, say at <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x29.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x33.png" xlink:type="simple"/></inline-formula> In order to constitute one such function, we choose the following simple relation</p><disp-formula id="scirp.65971-formula10"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x34.png"  xlink:type="simple"/></disp-formula></sec></sec><sec id="s3"><title>3. Analytical Solution and Characteristics</title><p>The non-linear PDE (6) can be solved if we know the traffic density at a given initial time, i.e. if we know the traffic density at a given initial time <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x35.png" xlink:type="simple"/></inline-formula> we can predict the traffic density for all future time <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x36.png" xlink:type="simple"/></inline-formula> in principle. Then we have to solve an initial value problem (IVP) of the form:</p><disp-formula id="scirp.65971-formula11"><label>(9)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x37.png"  xlink:type="simple"/></disp-formula><p>We solve the IVP (9) using method of characteristics and the analytical solution is given by</p><disp-formula id="scirp.65971-formula12"><label>(10)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x38.png"  xlink:type="simple"/></disp-formula><p>Again for a first-order PDE, the method of characteristics discovers curves along which the PDE becomes an ordinary differential equation (ODE). We use the crossings of the characteristics to find shock waves. Intuitively, we can think of each characteristic line implying a solution to <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x39.png" xlink:type="simple"/></inline-formula> along itself. Thus, when two characteristics cross two solutions are implied. This causes shock waves and the solution to <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x40.png" xlink:type="simple"/></inline-formula> becomes a multi-valued function. In this case the analytical solution to (7) subject to initial data <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x41.png" xlink:type="simple"/></inline-formula> is given by</p><disp-formula id="scirp.65971-formula13"><label>(11)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x42.png"  xlink:type="simple"/></disp-formula></sec><sec id="s4"><title>4. Numerical Solution Methods</title><p>In this section, we present the discretization of the traffic flow model by finite difference formula. According to [<xref ref-type="bibr" rid="scirp.65971-ref10">10</xref>] , we formulate Lax-Friedrichs scheme for the numerical solution of the traffic flow model with inflow and outflow at particular positions in a single lane highway based on linear velocity-density function. We also present here the well-posedness and stability condition of the investigating scheme. Secondly, we discuss the first order Godunov method based on [<xref ref-type="bibr" rid="scirp.65971-ref11">11</xref>] [<xref ref-type="bibr" rid="scirp.65971-ref12">12</xref>] , applied to single conservation laws to analyze the propagation of shock waves.</p><sec id="s4_1"><title>4.1. Numerical Solution using Lax-Friedrichs Method</title><p>The Lax-Friedrichs method is a numerical method for the solution of hyperbolic partial differential equations based on finite differences. The method can be described as the FTCS (forward in time, centered in space) scheme. For Lax-Friedrichs scheme, we consider our specific non-linear traffic model problem as an IBVP characterized with two sided boundary conditions using [<xref ref-type="bibr" rid="scirp.65971-ref13">13</xref>] :</p><disp-formula id="scirp.65971-formula14"><label>(12)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x43.png"  xlink:type="simple"/></disp-formula><p>In order to develop the scheme, we discretize the space and time. We discretize the time derivative <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x44.png" xlink:type="simple"/></inline-formula> and space derivative <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x45.png" xlink:type="simple"/></inline-formula> in the IBVP (12) at any discrete point (<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x46.png" xlink:type="simple"/></inline-formula>) for <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x47.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x48.png" xlink:type="simple"/></inline-formula>. The discretization of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x49.png" xlink:type="simple"/></inline-formula> is obtained by first order forward difference in time and the discretization of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x50.png" xlink:type="simple"/></inline-formula> is</p><p>obtained by first order central difference in space. The discrete version of the PDE (12) is given by:</p><disp-formula id="scirp.65971-formula15"><label>(13)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x51.png"  xlink:type="simple"/></disp-formula><p>But unfortunately, despite the quite natural derivation of the method (13) it suffers from severe stability prob-</p><p>lems and is useless in practice, i.e. the scheme becomes unstable. But if we replace <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x52.png" xlink:type="simple"/></inline-formula> by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x53.png" xlink:type="simple"/></inline-formula> then the unstable method becomes stable provided that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x53.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x54.png" xlink:type="simple"/></inline-formula> is sufficiently small. Hence (13) takes the form of</p><disp-formula id="scirp.65971-formula16"><label>(14)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x55.png"  xlink:type="simple"/></disp-formula><p>where,</p><disp-formula id="scirp.65971-formula17"><graphic  xlink:href="http://html.scirp.org/file/1-1100505x56.png"  xlink:type="simple"/></disp-formula><p>This difference Equation (14) is known as Lax-Friedrichs scheme.</p><p>It is verified that the well-posedness and stability of the Lax-Friedrichs scheme is guaranteed by the simultaneous conditions</p><disp-formula id="scirp.65971-formula18"><graphic  xlink:href="http://html.scirp.org/file/1-1100505x57.png"  xlink:type="simple"/></disp-formula></sec><sec id="s4_2"><title>4.2. Numerical Solution Using Godunov’s Method</title><p>The main challenge in simulating the traffic flow Equation (7) numerically is that the solutions are typically not smooth, due to the presence of shockwaves. Hence general finite difference methods are not well suited in this task. For this reason, Godunov method [<xref ref-type="bibr" rid="scirp.65971-ref12">12</xref>] [<xref ref-type="bibr" rid="scirp.65971-ref14">14</xref>] is applied in single conservation laws in order to find out the numerical solution. We consider a discrete spatial grid with mesh size <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x58.png" xlink:type="simple"/></inline-formula> and a discretized dependent variable <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x58.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x59.png" xlink:type="simple"/></inline-formula> whose average over a grid cell is given by</p><disp-formula id="scirp.65971-formula19"><graphic  xlink:href="http://html.scirp.org/file/1-1100505x60.png"  xlink:type="simple"/></disp-formula><p>Every time step<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x61.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x62.png" xlink:type="simple"/></inline-formula>is updated by an equation of the form</p><disp-formula id="scirp.65971-formula20"><label>(15)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x63.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x64.png" xlink:type="simple"/></inline-formula> is an approximation to the flux <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x64.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x65.png" xlink:type="simple"/></inline-formula> averaged over the time interval<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x64.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x65.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x66.png" xlink:type="simple"/></inline-formula>. Hence the only task left to compute the approximate fluxes<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x64.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x65.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x66.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x67.png" xlink:type="simple"/></inline-formula>. So we compute exact fluxes corresponding to an approximate profile <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x64.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x65.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x66.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x68.png" xlink:type="simple"/></inline-formula> consistent with the local numerical averages<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x64.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x65.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x66.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x69.png" xlink:type="simple"/></inline-formula>. We chose the simplest profile which consists of a piecewise constant function, defined by</p><disp-formula id="scirp.65971-formula21"><label>(16)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x70.png"  xlink:type="simple"/></disp-formula><p>Since information travels along characteristics at a finite speed, non?neighboring cells will not interact with each other, provided that we pick <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x71.png" xlink:type="simple"/></inline-formula> small enough that characteristics coming from two adjacent interfaces do not intersect. This completes the description of the (ﬁrst order) Godunov method, applied to single conservation laws.</p></sec></sec><sec id="s5"><title>5. Results and Discussion</title><p>Based on the numerical methods discussed above, we now present outcomes from various simulations in this section.</p><sec id="s5_1"><title>5.1. Comparison of Numerical Solution for Two Specific Cases</title><p>Using the procedure for Lax-Friedrichs scheme presented in Section 4.1, we now demonstrate the effect of constant rate inflow in traffic flow simulation. We present the numerical solution for two specific cases. For this, we</p><p>use the initial condition <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x72.png" xlink:type="simple"/></inline-formula> and boundary conditions given by</p><disp-formula id="scirp.65971-formula22"><graphic  xlink:href="http://html.scirp.org/file/1-1100505x73.png"  xlink:type="simple"/></disp-formula><p>where x<sub>a</sub> and x<sub>b</sub> are the positions of left and right boundary respectively. We take <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x74.png" xlink:type="simple"/></inline-formula> (0.1 km/sec) = 60.12 km/hour, satisfying the physical constraint condition <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x74.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x75.png" xlink:type="simple"/></inline-formula>/km in the spatial domain [0 km, 10 km]. We perform the numerical experiment for 6 minutes in <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x74.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x76.png" xlink:type="simple"/></inline-formula> time steps for a highway of 10 km with step size <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x74.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x77.png" xlink:type="simple"/></inline-formula> meters = 0.25 which guarantees the stability condition γ = 0.0668 &lt; 1.</p><p>In <xref ref-type="fig" rid="fig2">Figure 2</xref>, the first case represents numerical solution based on Lax-Friedrichs scheme without any inhomogeneities in the considered road. But the second case in <xref ref-type="fig" rid="fig2">Figure 2</xref> represents numerical solution of the same traffic flow problem which consists of an additional constant rate inflow in the 5<sup>th</sup> km position of our 10 km considered highway.</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Comparison of numerical solutions in order to observe the effect of inflow in 5<sup>th</sup> km position</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x78.png"/></fig></sec><sec id="s5_2"><title>5.2. Density, Velocity and Flux Profiles Using Lax-Friedrichs Scheme</title><p>In this section we present numerical experiments using Lax-Friedrichs scheme for some specific cases of flow parameters like<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x79.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x79.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x80.png" xlink:type="simple"/></inline-formula>etc. We consider the initial condition given by the equation:</p><disp-formula id="scirp.65971-formula23"><graphic  xlink:href="http://html.scirp.org/file/1-1100505x81.png"  xlink:type="simple"/></disp-formula><p>Here, the maximum density is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x82.png" xlink:type="simple"/></inline-formula> cars/km. The constant two-sided boundary conditions for Lax- Friedrichs scheme are given by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x82.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x83.png" xlink:type="simple"/></inline-formula> km and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x82.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x83.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x84.png" xlink:type="simple"/></inline-formula> km. We consider constant rate inflow source term <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x82.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x83.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x84.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x85.png" xlink:type="simple"/></inline-formula> in the interval [5 km, 5.1 km] and outflow sink (negative source) term <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x82.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x83.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x84.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x85.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x86.png" xlink:type="simple"/></inline-formula> in the interval [8 km, 8.1 km]. The layout of the considered 10 km highway is presented in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</p><p>At first we demonstrate the density profile figures with comparative initial and 6 minute position of cars with respect to the certain points of 10 km highway. For <xref ref-type="fig" rid="fig4">Figure 4</xref>(a) the maximum velocity is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x87.png" xlink:type="simple"/></inline-formula> km/hour whereas <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x88.png" xlink:type="simple"/></inline-formula> km/hour for <xref ref-type="fig" rid="fig4">Figure 4</xref>(b) and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x89.png" xlink:type="simple"/></inline-formula> km/hour for <xref ref-type="fig" rid="fig4">Figure 4</xref>(c). At each situation, we observe that the density of cars increases at 5<sup>th</sup> km position and decreases at 8<sup>th</sup> km position of our considered 10 km highway. This particular situation arises due to the effect of constant rate inflow and outflow at 5<sup>th</sup> km and 8<sup>th</sup> km position respectively. Since the maximum velocity in 4(a) is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x89.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x90.png" xlink:type="simple"/></inline-formula> km/hour which is very low so the density of cars at inflow position exceeds our fixed maximum density <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x89.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x90.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x91.png" xlink:type="simple"/></inline-formula> cars/km i.e.<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x89.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x90.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x91.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x89.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x90.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x91.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x92.png" xlink:type="simple"/></inline-formula>. This condition leads us to the situation of congested traffic at inflow position. So in this case, we can consider the inflow as a local disturbance in traffic flow stream.</p><p>In <xref ref-type="fig" rid="fig4">Figure 4</xref>(b) and <xref ref-type="fig" rid="fig4">Figure 4</xref>(c), the maximum velocity of cars is comparably high than that of the case discussed in <xref ref-type="fig" rid="fig4">Figure 4</xref>(a). In both of the following cases, density of cars considerably increases at inflow position but does not exceed the jam density i.e. density at inflow position fulfills the condition<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x94.png" xlink:type="simple"/></inline-formula>. So that vehicles can move with low velocity at that position. Therefore the inflow source term has no significant effect in both of these cases. Under light traffic condition, vehicles are able to travel freely at their desired speed. We have also introduced an outflow sink term at the 8<sup>th</sup> km position where some vehicles are able to leave from our 10 km single lane highway. Consequently, the density of vehicles slowly decreases at outflow position. As a result, at outflow position, drivers are able to attain their own comfortable driving speed.</p><p><xref ref-type="fig" rid="fig5">Figure 5</xref>(a) and <xref ref-type="fig" rid="fig5">Figure 5</xref>(b) respectively shows the density profiles and velocity profiles for three different times. In <xref ref-type="fig" rid="fig5">Figure 5</xref>(a), we see that the density of traffic at inflow position slowly acquires reduced wave height as time goes on. But in case of outflow placed at 8<sup>th</sup> km position, as time goes on, the density of cars increase. This particular situation occurs because the rate of flow in the single lane highway is continuously increasing but the number of cars that leave through the sink is constant.</p><p>In <xref ref-type="fig" rid="fig5">Figure 5</xref>(b), the average velocity of cars decreases for high density in the inflow source position placed at 5<sup>th</sup> km, and vice-versa for outflow position. <xref ref-type="fig" rid="fig5">Figure 5</xref>(c) represents the flux profile for different minutes. The flux of traffic is computed by the following relation</p><disp-formula id="scirp.65971-formula24"><graphic  xlink:href="http://html.scirp.org/file/1-1100505x95.png"  xlink:type="simple"/></disp-formula><fig-group id="fig3"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> Layout of a 10 km highway with an inflow source term at 5<sup>th</sup> km and outflow sink term at 8<sup>th</sup> km position.</title></caption><fig id ="fig3_1"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x96.png"/></fig></fig-group><fig-group id="fig4"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> Comparative position of cars between initial and six minutes in case of Lax-Friedrichs Scheme (a) when <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x100.png" xlink:type="simple"/></inline-formula> km/hour; (b) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x100.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x101.png" xlink:type="simple"/></inline-formula>km/hour and (c) when <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x100.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x101.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x102.png" xlink:type="simple"/></inline-formula> km/hour.</title></caption><fig id ="fig4_1"><label> (b)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x97.png"/></fig><fig id ="fig4_2"><label>(c)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x98.png"/></fig><fig id ="fig4_3"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x99.png"/></fig></fig-group><p>According to the flux profile, it is clear that flux of traffic increases at 5<sup>th</sup> km position due to the constant rate inflow and decreases at 8<sup>th</sup> km position for constant rate outflow through a sink situated at that position.</p><p>We now compare two special cases to visualize the effect of inflow and outflow in a single lane highway. In each case we perform numerical simulation for 6 minutes using Lax-Friedrichs scheme. <xref ref-type="fig" rid="fig6">Figure 6</xref>(a) represents the density of cars for 6 minutes in a 10 km highway without any entries or exits. <xref ref-type="fig" rid="fig6">Figure 6</xref>(b) represents the effect of both inflow and outflow in the main stream density of cars. <xref ref-type="fig" rid="fig7">Figure 7</xref>(a) and <xref ref-type="fig" rid="fig7">Figure 7</xref>(b) represents the corresponding velocity profiles.</p></sec><sec id="s5_3"><title>5.3. Shock Wave Analysis Using Godunov Method</title><p>From the construction of characteristics summarized in the implicit solution (11), it follows that the information</p><fig-group id="fig5"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> (a) Density profile and (b) Velocity profile and (c) Flux profile in 10 km highway with inflow at 5<sup>th</sup> km position and outflow at 8<sup>th</sup> km position.</title></caption><fig id ="fig5_1"><label> (b)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x103.png"/></fig><fig id ="fig5_2"><label>(c)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x104.png"/></fig><fig id ="fig5_3"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x105.png"/></fig></fig-group><fig-group id="fig6"><label><xref ref-type="fig" rid="fig6">Figure 6</xref></label><caption><title> (a) Density profile simulation for 6 minute without any inflow or outflow; (b) Density profile simulation for 6 minutes with an inflow at 5<sup>th</sup> km position and outflow at 8<sup>th</sup> km position.</title></caption><fig id ="fig6_1"><label> (b)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x106.png"/></fig><fig id ="fig6_2"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x107.png"/></fig></fig-group><p>yielding a solution <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x108.png" xlink:type="simple"/></inline-formula> to (7) travels along straight line in the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x108.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x109.png" xlink:type="simple"/></inline-formula> plane. These straight lines are not generally parallel to each other, since <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x108.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x109.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x110.png" xlink:type="simple"/></inline-formula> typically adopts different values for different values of<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x108.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x109.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x110.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x111.png" xlink:type="simple"/></inline-formula>. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x108.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x109.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x110.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x111.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x112.png" xlink:type="simple"/></inline-formula>is in fact a decreasing function of<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x108.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x109.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x110.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x111.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x112.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x113.png" xlink:type="simple"/></inline-formula>. Hence lower traffic densities will travel faster than higher ones. Consequently, any non-constant initial profile will deform as time progresses. This phenomenon is illustrated in <xref ref-type="fig" rid="fig8">Figure 8</xref>, with the constitutive relation given by (8), and initial data (17).</p><fig-group id="fig7"><label><xref ref-type="fig" rid="fig7">Figure 7</xref></label><caption><title> (a) Corresponding velocity profile without any inflow or outflow; (b) Velocity profile with an inflow at 5<sup>th</sup> km position and outflow at 8<sup>th</sup> km position.</title></caption><fig id ="fig7_1"><label> (b)</label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x114.png"/></fig><fig id ="fig7_2"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x115.png"/></fig></fig-group><fig id="fig8"  position="float"><label><xref ref-type="fig" rid="fig8">Figure 8</xref></label><caption><title> Numerical solutions using Godunov method in different time steps</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x116.png"/></fig><disp-formula id="scirp.65971-formula25"><label>(17)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-1100505x117.png"  xlink:type="simple"/></disp-formula><p>Note that at approximately<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x118.png" xlink:type="simple"/></inline-formula>, the solution deforms by developing a vertical slope at<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x118.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x119.png" xlink:type="simple"/></inline-formula>. This corresponds to the first crossing of characteristics [<xref ref-type="bibr" rid="scirp.65971-ref14">14</xref>] . Smooth solutions of a single conservation law can blow up (develop discontinuities or singularities) in finite time.</p><p>Therefore, the blow up time is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x120.png" xlink:type="simple"/></inline-formula> which describes a road condition where cars are approaching red traffic light. After the blow-up time the implicit solution given by (11) is multivalued. The profile corresponding to the initial data above, evaluated at<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x120.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x121.png" xlink:type="simple"/></inline-formula>, is presented in <xref ref-type="fig" rid="fig8">Figure 8</xref>. At the point where the solution switches from a characteristic branch to another, the solution <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x120.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x121.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-1100505x122.png" xlink:type="simple"/></inline-formula> will be discontinuous. An example of this construction is shown in <xref ref-type="fig" rid="fig9">Figure 9</xref> with a dotted line; the locus of discontinuity is called a shock wave [<xref ref-type="bibr" rid="scirp.65971-ref12">12</xref>] [<xref ref-type="bibr" rid="scirp.65971-ref14">14</xref>] .</p></sec></sec><sec id="s6"><title>6. Conclusion</title><p>In this paper, a modification of classical LWR model has been presented to investigate the significant effects of constant rate inflow and outflow in a single lane highway. Although the model has been developed for a single lane highway, due to the presence of off ramps and on ramps, this model can be extended for multilane highway</p><fig id="fig9"  position="float"><label><xref ref-type="fig" rid="fig9">Figure 9</xref></label><caption><title> A multivalued solution</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-1100505x123.png"/></fig><p>easily. This investigation also shows that Godunov method outperforms finite difference methods in presence of stationary shock waves. Various numerical simulations carried out through this investigation will obviously make important contributions to the existing models so that we can minimize traffic congestion problems in an efficient way.</p></sec><sec id="s7"><title>Cite this paper</title><p>Ahsan Ali,Laek Sazzad Andallah, (2016) Inflow Outflow Effect and Shock Wave Analysis in a Traffic Flow Simulation. American Journal of Computational Mathematics,06,55-65. doi: 10.4236/ajcm.2016.62007</p></sec></body><back><ref-list><title>References</title><ref id="scirp.65971-ref1"><label>1</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Daganzo</surname><given-names> C.F. </given-names></name>,<etal>et al</etal>. (<year>1995</year>)<article-title>A Finite Difference Approximation of the Kinematic Wave Model of Traffic Flow</article-title><source> Transportation Research Part B: Methodological</source><volume> 29</volume>,<fpage> 261</fpage>-<lpage>276</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.65971-ref2"><label>2</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Zhang</surname><given-names> H.M. </given-names></name>,<etal>et al</etal>. (<year>2001</year>)<article-title>A Finite Difference Approximation of a Non-Equilibrium Traffic Flow Model</article-title><source> Transportation Research Part B: Methodological</source><volume> 35</volume>,<fpage> 337</fpage>-<lpage>365</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.65971-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Bretti, G., Natalini, R. and Piccoli, B. (2007) A Fluid-Dynamic Traffic Model on Road Networks. Comput Methods Eng., &amp;copy; CIMNE, Barcelona.</mixed-citation></ref><ref id="scirp.65971-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Ali, A., Andallah, L.S. and Hossain, Z. (2015) Numerical Solution of a Fluid Dynamic Traffic Flow Model Associated with a Constant Rate Inflow. American Journal of Computational and Applied Mathematics, 5, 18-26.</mixed-citation></ref><ref id="scirp.65971-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Bagnerini, P., Colombo, R.M. and Corli, A. (2006) On the Role of Source Terms in Continuum Traffic Flow Models. Mathematical and Computer Modelling, 44, 917-930. http://dx.doi.org/10.1016/j.mcm.2006.02.019</mixed-citation></ref><ref id="scirp.65971-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Lighthill, M.J. and Whitham, G.B. (1955) On Kinematic Waves. II. A Theory of Traffic Flow on Long Crowded Roads. Proceedings of the Royal Society of London. Series A, 229, 317-345. http://dx.doi.org/10.1098/rspa.1955.0089</mixed-citation></ref><ref id="scirp.65971-ref7"><label>7</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Greenshields</surname><given-names> B.D. </given-names></name>,<etal>et al</etal>. (<year>1935</year>)<article-title>A Study of Traffic Capacity</article-title><source> Highway Research Board</source><volume> 14</volume>,<fpage> 448</fpage>-<lpage>477</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.65971-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Andallah, L.S., Ali, S., Gani, M.O., Pandit, M.K. and Akhter, J. (2009) A Finite Difference Scheme for a Traffic Flow Model Based on a Linear Velocity-Density Function. Jahangirnagar University Journal of Science, 33, 61-71.</mixed-citation></ref><ref id="scirp.65971-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Haberman, R. (1977) Mathematical Models: Mechanical Vibrations, Population Dynamics and Traffic Flow. Prentice-Hall, Inc., Englewood Cliffs.</mixed-citation></ref><ref id="scirp.65971-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Le Veque, R.J. (1992) Numerical Methods for Conservation Laws. Birkhauser, Berlin.</mixed-citation></ref><ref id="scirp.65971-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Hoogendoorn, S.P., Luding, S., Bovy, P.H.L., Schreckberg, M. and Wolf, D.E. (2005) Traffic and Granular Flow ’03. Springer. http://dx.doi.org/10.1007/3-540-28091-x</mixed-citation></ref><ref id="scirp.65971-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Trangenstein, J.A. (2007) Numerical Solution of Hyperbolic Conservation Laws. Department of Mathematics, Duke University, Durham, NC 27708-0320. https://services.math.duke.edu/~jliu/math226/</mixed-citation></ref><ref id="scirp.65971-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Hasan, M., Sultana, S., Andallah, L. and Azam, T. (2015) Lax-Friedrich Scheme for the Numerical Simulation of a Traffic Flow Model Based on a Nonlinear Velocity Density Relation. American Journal of Computational Mathematics, 5, 186-194. http://dx.doi.org/10.4236/ajcm.2015.52015</mixed-citation></ref><ref id="scirp.65971-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Tabak, E.G. (2004) Notes for PDE I (Traffic Flow) Spring 2004 [PDF Document]. Retrieved from Lecture Notes Online Website. http://math.nyu.edu/faculty/tabak/PDEs/</mixed-citation></ref></ref-list></back></article>