Simulation the Nagel Schreckenberg single lane model. All standard parameters are implemented:
Also, rendering flag allows user to disable rendering for faster flow-density curve calculations.
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
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.
Updated to support Octave
Fixed calculated of total flow for FD plot
Fixed a problem with vmax=1 showing zero flow.
Fixed problem with vehicle velocity updates.