View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Nagel Schreckenberg model implementation

5.0 | 3 ratings Rate this file 15 Downloads (last 30 days) File Size: 4.01 KB File ID: #34956 Version: 1.4
image thumbnail

Nagel Schreckenberg model implementation



06 Feb 2012 (Updated )

Simulation of the Nagel Schreckenberg single-lane traffic model, with visualization and plotting.

| Watch this File

File Information

Simulation the Nagel Schreckenberg single lane model. All standard parameters are implemented:
-braking probability

Also, rendering flag allows user to disable rendering for faster flow-density curve calculations.

MATLAB release MATLAB 7.11 (R2010b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
06 Jun 2013 nguyen

nguyen (view profile)

06 Jun 2013 Son

Son (view profile)

28 May 2013 Thomas Kelly

28 May 2013 Thomas Kelly

Hi Alex,
I've tried your code out in R2011a and it works perfectly. I'm just wondering how I would go about drawing up a time/cell plot from it to show flow over time? (Similar to what you have implemented in your analyze.m file) I can't quite figure out how to do it.

Thank you in advance

Comment only
13 Jan 2013 sgtdf

sgtdf (view profile)

Hi Alex,
I tried your code in R2011b, the figure shows a only single straight line at flow value of zero, can you please fix it? Or tell me the reason why? Thank you very much for your help.

Comment only
16 Jul 2012 1.1

Fixed problem with vehicle velocity updates.

14 Jan 2013 1.2

Fixed a problem with vmax=1 showing zero flow.

13 Jun 2013 1.3

Fixed calculated of total flow for FD plot

10 Feb 2015 1.4

Updated to support Octave

Contact us