Σχόλια 0

Το κείμενο της παρουσίασης

Basics of cellular automata modelsCE 391FApril 2,2013Cellular automataANNOUNCEMENTSHomework 3 due Thursday,April 4Wednesday oce hours rescheduled due to CTR symposium:9:30{11Cellular automataAnnouncementsREVIEWThe basic car following modelxf(t) = ( _x`(t T)  _xf(t T))Local and asymptotic stabilityHow did  and T aect these stability values?What kind of  values have been observed in experiments?Cellular automataReviewHow did car-following models correspond to continuum models?Cellular automataReviewOUTLINE1Cellular automata2Towards lane-changing models3Random number generation?Cellular automataOutlineCELLULAR AUTOMATAAn alternative to continuous car-following are discrete\cellular automata"models.These were developed in the 1990s by physicists,and are the trac modelused in TRANSIMS.Cellular automata simplify car-following models in the same way that theCTM simplies the LWR model.As we will see shortly,it also provides aneasy avenue for handling lane-changing behavior.Cellular automataCellular automataWhat is a cellular automaton?Celluar automata are dened on a discrete grid of cells,at a discrete set oftimes.Each cell exists in one of a nite number of statesMoving from one timestep to the next,the state of each cell isupdated based on the state of nearby cells.Cellular automataCellular automataCellular automata were developed by John von Neumann and StanislawUlam in the 1940s,and have been applied to simulate computer processors,seashell patterns,neurons, uid dynamics,and many other objectcs.Cellular automataCellular automataConway's Game of LifeThe\game of life"is the best-known cellular automaton.Imagine an innite grid of cells,which exist in one of two possible states:\alive"or\dead"Each cell has eight neighbors,and updates occur based on the followingrules:1Any live cell with fewer than two live neighbors dies(under-population)2Any live cell with two or three live neighbors stays alive3Any live cell with more than three live neighbors dies(over-population)4Any dead cell with exactly three live neighbors becomes alive(reproduction)Cellular automataCellular automataUsing only these simple rules,a huge variety of complex patterns can becreated.In a similar way,when applied to trac ow,cellular automata canreplicate complex phenomena with a simple set of rules.Cellular automataCellular automataKai Nagel pioneered the application of CAs to trac modeling,largely atLos Alamos National Laboratory (although this research started earlier,atthe Universitat zu Koln).Cellular automataCellular automataFor now,consider a one-lane roadway,which is represented with aone-dimensional line of cells.These cells are much smaller than the CTM cells |here,a cell can containat most one vehicle.Cellular automataCellular automataThe state of a cell is either\empty"(if there is no vehicle present),or anonnegative integer v expressing the vehicle's speed (in units of cells pertick).Cellular automataCellular automataThe system is governed by the following rules,all four of which are appliedto each vehicle in the stated order:Acceleration:If the velocity v is less than vmax,and the distance tothe next car ahead is greater than v +1,the speed increases by 1.Car-following:If the distance to the next vehicle is j and j  v,thespeed decreases to j 1.Randomization:If the velocity is positive,it decreases by 1 withprobability pMotion:The vehicle advances v cells.These steps are performed in parallel for each vehicle.Cellular automataCellular automataCellular automataCellular automataCellular automataCellular automataCellular automataCellular automataCellular automataCellular automataCellular automataCellular automataLANE CHANGINGTo accommodate lane changing,we add a second row to the grid.Asbefore,cells are either empty or contain the velocity of the vehicle in thatcell.The previous rules are called the\single-lane update rules."With lane changing,we allow vehicles to move laterally before applyingthe single-lane update rules.Cellular automataLane changingSome questions to consider:Symmetry:Should the rules for changing from left-to-right be thesame as those for changing right-to-left?Stochasticity:Is there any randomness involved in the decision tochange lanes?Anisotropy:Drivers presumably need to look upstream beforedeciding whether or not to change lanes.Will this cause problems?Cellular automataLane changingOne candidate set of rules...a vehicle changes lanes if all of the followingconditions are satised:1Distance to next vehicle in current lane is less than l2Distance to next vehicle in other lane is greater than lo3Distance to previous vehicle in other lane is greater than lo;backWe can construct variations of these rules to describe dierent scenarios:Ignore rule 1 for left-to-right move (asymmetry)In addition to the above,only make the lane change with someprobability (stochasticity)Set lo;back= 0 (complete anisotropy)Cellular automataLane changingSymmetric rulesCellular automataLane changingAsymmetric rulesCellular automataLane changingPing-pong EectThe\ping-pong"eect occurs when a platoon of vehicles continuallyswitches from one lane to the next.It can happen with both symmetric and asymmetric lane-switchingbehaviorsHow can we address this?Cellular automataLane changingIMPLEMENTINGCELLULAR AUTOMATACellular automata models are fairly easy to implement in programminglanguage (and,with a bit more eort,in a spreadsheet).Method 1:Explicitly simulate the state of every cellMethod 2:Only keep track of the vehicles,storing the loation and speeds.What are some advantages and disadvantages of these methods?Cellular automataImplementing cellular automataDo you move vehicles all at once,or sequentially?How do you perform a certain action with some probability?Cellular automataImplementing cellular automataRANDOM NUMBERGENERATIONWhat does it mean to generate a random number?Most computers produce pseudorandom numbers:they give theappearance of randomness,while being generated by a formula.Cellular automataRandom number generationA few historical options for generating random numbers in scienticwork...Roll dice,draw cards,cast lots...Draw balls from a\well-stirred urn"Table of 40,000 digits\taken at random from census reports"Atmospheric noiseCellular automataRandom number generationMiddle-square methodLet's say we want to generate a sequence of random two-digit numbers.Begin by picking a seed value 1234The rst random number is the middle two digits:23Square 23,and pick the middle two digits as the next random number:232= 0529Square 52,and get 2704.Cellular automataRandom number generationSo,the sequence begins 23,52,70,90,and so forth.Even though this sequence is completely deterministic,it gives anappearance of randomness.Unfortunately,this simple method tends to get stuck in a loop:23,52,70,90,10,10,10,10,...Choosing a dierent seed gives a dierent sequence:85,22,48,30,90,10,10,10,...42,76,77,92,46,11,12,14,19,36,29,84,5,25,62,84,5,25,62,84,...Researchers have developed much better ways of generating random num-bers (and for quantifying how\random"a sequence appearsCellular automataRandom number generationFor now,we'll focus on generating a random real number from auniform(0,1) distribution.We can use this to simulate a wide variety of random processes.How canwe use this to perform an action with probability p?How can we convert the middle-square method into a uniform(0,1),approximately?Cellular automataRandom number generationStochastic desiderataA pseudorandom U(0;1) sequence would ideally pass the following tests:Frequency test (histograms with any bin width should showapproximately equal frequency)Serial test (correlation should not be evident;equivalently the randomnumber should not be easily predictable)Gap test (the sequence should not\avoid"particular intervals forlong stretches)Poker test (bin data,check frequency of pairs,three-of-a-kind,fullhouse,etc.to\true"U(0;1) probabilities)Coupon collector testRun testBirthday spacings testCellular automataRandom number generation