Curb Parking Simulation Model

Curb Parking Simulation Model preview image

1 collaborator

Default-person Yanan Xin (Author)

Tags

parking 

Tagged by Yanan Xin about 10 years ago

transit 

Tagged by Yanan Xin about 10 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 5.1.0 • Viewed 500 times • Downloaded 27 times • Run 0 times
Download the 'Curb Parking Simulation Model' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This model is designed to examine the influence of Intelligent Parking Info System and Land Use Diversity on cruising for curb parking.

HOW IT WORKS

Background:

Activity centers (STOREs in the scenario), which are the driving force of trips or parking, are represented by red houses with green parking spots around. Number of stores and diversity of land use are set respectively via the slider bar. The locations of stores are set randomly. The number of green grids for each store represents the size of the parking area, which is also set randomly. Each green grid belongs to its nearest store. The number on each green grid represents the permitted parking time for that spot which is set randomly with a maximum controlled by Parking-Diversity slider. The darker the green color, the longer the parking time is.

Agent-Cars:

Each blue car is set to move towards the nearest activity center (STORE). Once it enters the green parking area for that store, it randomly picks one of the empty parking spots and stays for the parking time assigned to that spot. After that, it will move to the next nearest target store, excluding the one it just parked and repeat the process. If the parking spots for its target store are full at the time the car touches the parking area, it will cruise until successfully parked at an available spot of a next target store. The average cruising time for all cars is recorded in the plot. Note that if the InfoSystem switch is turned on, an occupancy limit of 80 percent will be applied to stop any new parking in the parking area. All cars will be informed of the occupancy information, indicated by the number on each store, before they set their target store and start to move.

HOW TO USE IT

Press SETUP button to set up the initial scenario. Turn on or off the InfoSystem? switch (see below) to include or exclude the influence of Intelligent Parking Info System. Press GO button to start the simulation. Press GO button again to stop. Adjust the slider parameters (see below), or use the default settings.

Parameters (slider): NUMBER-OF-STORES: The number of stores in the scenario. NUMBER-OF-CARS: The number of cars in the scenario. Parking-Diversity: The diversity level of parking, represented by range of parking time assigned to parking spots.

Controller (switch): InfoSystem? Turn on: Cars will not park if the parking area of its target store has occupied by more than 80 percent. Turn off: The influence of Intelligent Parking Info System, i.e. the 80 percent occupancy limit, will not be considered. Cars will stop to park only if the parking spots are full.

THINGS TO NOTICE

When you turn on or off the InfoSystem switch, note the difference between the plots. Note that, the result will greatly depend on the initial setting, especially the locations of stores.

Also compare and summarize the difference of the plot when you adjust the Parking-Diversity parameter slider.

THINGS TO TRY

If you count the switch, here are actually four parameters to control the result. Try to control three and adjust only one to see the difference.

EXTENDING THE MODEL

Considering the complexity of curb parking system, here are several ways to improve this model based on your study objective. For example, a better indicator or definition for cruising time to be plotted, adding the control of store locations, providing a street scenario setting or adding traffic influence.

Welcome for further improvements or suggestions.

NETLOGO FEATURES

Note the use of global variables: store and target. Note the use of breeds for two different kinds of turtles: cars and stores.

Note the use of ticks to make a car stay a specific period of time during the process.

RELATED MODELS

(models in the NetLogo Models Library and elsewhere which are of related interest)

CREDITS AND REFERENCES

If you mention this model in a publication, please include these citations for the model itself and for the NetLogo software:

  • Yanan Xin (2013). Curb Parking Simulation Model.

  • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

COPYRIGHT AND AUTHOR

Copyright 2013 Yanan Xin. Contact Info: yanan.xin0@gmail.com

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals[store
        target]

breed[cars]
breed[stores]

cars-own[
         satisfied
         waitingtime
         alive
         time1
         time2
         staytime
         ]
stores-own[candidate
           occupancy
          ]
patches-own[ptype
            ParkingTime
            ]

to setup
  clear-all
  setup-store
  setup-parkingspots
  setup-cars
  reset-ticks  
end 

to go
  
  ifelse InfoSystem?
  [
    ask stores with [occupancy < 0.8]
    [ set candidate 1]    
  ]
  [
    ask stores [set candidate 1]
  ]
  find-spots
  stayin-spots  
  tick
end 

to setup-store
  create-stores number-of-stores
  [
    set shape "house"
    set color red
    set candidate 0
    set occupancy 0
    move-to one-of patches with [count turtles-here = 0]
  ]
end 

to setup-parkingspots
   ask patches
  [
    set ptype -1
    set ParkingTime 0
  ]
  ask stores
  [  
      ask patches with [count stores-here = 0] in-radius (random 5 + 1)
    [ set ptype 0
      set ParkingTime (random Parking-Diversity + 1)
      set plabel ParkingTime
      set pcolor (60 - ParkingTime)     
    ] 
  ]
  ask patches with [ptype = 0]
  [
    set ptype [who] of min-one-of stores [distance myself]
  ]
end 

to setup-cars
  create-cars number-of-cars 
  [
    set shape "car"
    set color blue
    set waitingtime 0
    set satisfied 1
    set alive 1
    set time1 0
    set time2 0
    move-to one-of patches with [pcolor = black and count turtles-here = 0]
  ]
end 

to count-occupancy
  ask stores
  [
    let parkingspots patches with[ptype = [who] of myself]
    let totalspots count parkingspots
    let filledspots count parkingspots with [any? cars-here with[alive = 0]]
    set occupancy filledspots / totalspots
    set label occupancy
  ]
end 

to find-spots
  ask cars with [alive = 1]
  [
    set store one-of stores with [candidate = 1 and ([who] of stores != target)]
    face store
    fd 1
    count-occupancy
    set target [who] of store
    if [ptype] of patch-here = target
    [ 
      ifelse [occupancy] of store < 1
    [
      move-to one-of patches with [ptype = [who] of store and not any? cars-here with[alive = 0]]
      if satisfied = 0
      [
        set time2 ticks
        set waitingtime time2 - time1
        set satisfied 1
      ]
      set alive 0      
      set staytime [ParkingTime] of patch-here
      set time1 ticks
    ] 
    [
      set heading heading + 180
      fd 1
      set time1 ticks
      set satisfied 0
    ]
    ]
    
  ]
end 

to stayin-spots
  ask cars with[alive = 0]
  [
    set time2 ticks
    if time2 - time1 = staytime
    [
      set alive 1
      set time1 0
      set time2 0
    ]
  ]
end 

; Copyright 2013 Yanan Xin.
; Contact Info: yanan.xin0@gmail.com

There is only one version of this model, created about 10 years ago by Yanan Xin.

Attached files

File Type Description Last updated
Curb Parking Simulation Model.png preview Preview for 'Curb Parking Simulation Model' about 10 years ago, by Yanan Xin Download

This model does not have any ancestors.

This model does not have any descendants.