Urban Suite - Tijuana Bordertowns

Urban Suite - Tijuana Bordertowns preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 612 times • Downloaded 45 times • Run 4 times
Download the 'Urban Suite - Tijuana Bordertowns' 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 simulates various socio-economic realities of low-income residents of the City of Tijuana for the purpose of creating propositional design interventions.

The Tijuana Bordertowns model allows input of migration rates and border crossing rates relative to employment and service centers in order to define population types (i.e. migrants or full-time residents). Population densities relative to block sizes are adjustable via the interface in order to steer the simulation toward specific land-uses such as urban centers or peripheral (rural) development. The rate of residential building is adjustable based upon relative community size, land value (approximate), required (per-capita) capital and the carrying capacity of (potentially) existing infrastructure.

The model also simulates detailed information about each agent in the simulation. During or after the simulation is run, specific agents can be inspected to determine their current income (if any), savings (if any), living expenses, job (if any), origin (from where they migrated) and the time (in years) they have lived in Tijuana. In addition, during or after the simulation is run, patches the agents occupy can also be inspected to identify the existence of infrastructural features such as water, electricity and roads. In all cases, information about agents and patches continually changes during the simulation based upon interrelated feedback.

HOW IT WORKS

A CITYSCAPE is generated, spreading out from a city center. Each patch is assigned a land-value, and a level of electrical, water and transportation service. A road network is drawn, and maquiladoras are placed at the edge of the city.

An initial set of migrants are created at the edge of the city on "irregular" patches, meaning those patches with a low land-value, near water and away from maquiladoras. A second set of migrants is created in the neighboring patches. This establishes the base population of the irregular settlements. The migrants also have a state of original, such as Jaliso or Oaxaca.

Then each migrant is assigned a living-expanses values, which is determined by the value of the land they occupy, food and other utility costs, as well as the electrical, water, and transportation. Food and other utility costs are constant for all agents. The electrical and water costs are determined by the patches values. Transportation is determined by their distance to service centers (like shopping centers), the distance to the maquiladoras they work at, and the access to transportation services their patch has.

With each model tick, new migrants move into patches next to existing migrants, some migrants cross the border, some migrants move into nicer locations once they have sufficient savings, and all of them participate in the economy, earning and spending money, as well as saving if possible.

New migrants will enter in unoccupied spaces adjacent to migrants who came from their home state.

Migrants that move will look for a patch in their area with electrical and water services, which is affordable to them.

Groups of migrants form colonias. The size of these colonias is determined by the COLONIA-SIZE slider. The larger the value, the larger the colonia. Colonias with sufficient density will be targeted for regularization. New electrical, water and transportation services will be developed for them.

HOW TO USE IT

Press CLEAR to clear the screen and prepare for the simulation

Press CITYSCAPE to draw an initial city. After it completes the city the button will de-activate. Do not use the GO button until after CITYSCAPE has completed its process, and the button has deactivated!

Press GO to run the simulation. (Only after you have run CLEAR, and let CITYSCAPE run to completion).

The INSPECT button pops up agent inspectors for the migrant with the least income, one migrant with savings above 0, and a patch with migrants living on it.

The ADD-NODE forever button allows you to click on a patch and create a service node, which has electrical, water, and transportation services.

MIGRATION-TICKS determines how many ticks of the model between waves of immigrants.

CROSSING-TICKS determined how many ticks of the model before a percentage of residents cross the border and leave the town.

#-MAQUILADORAS sets the number of maquiladoras, which are created at the edge of the city when the city is created during the CITYSCAPE step.

#-SERVICE-CENTERS determines the number of service centers (shown as large circles in the view) that are created when the city is created.

INIT-DENSITY determines the initial number of migrants at the stat of a model run.

REQUIRED-CAPITAL determines how much savings a migrant must have before moving from their current location to a new location.

COLONIA-SIZE determines the size of a region that can become a colonia. A larger size means larger colonias.

CARRYING-CAPACITY determines how large of an area a new node, created with the ADD-NODE button, effects. A new node will add services to patches in that area.

BUILDING-TICKS determines how many ticks of the model between building when areas are regularized

The VISUAL-UPDATE chooser allows additional visualization of various aspects of the state of the model, including "elevation", "land value gradient", "colonias", "units with no water", and "units with no electricity". If GO is running, then the view will update in real-time. Otherwise, push the UPDATE-NOW button after choosing a new visualization mode.

If the COLOR-CODE? switch is ON, then migrants will be colored on the basis of their origin ( "oaxaca" is pink, "jalisco" is orange, "zacatecas" is blue, and "mexico" is green]). If it is OFF, then all migrants are shown in black (or white, in "land value gradient" visualization mode).

The CITY-GROWTH? switch determines whether the city continues to grow as the model progresses.

THINGS TO NOTICE

Colonias will eventually build their own infrastructure if CITY-GROWTH is on.

Adding a node with the ADD-NODE button will attract migrants to that area.

THINGS TO TRY

Try setting the MIGRATION-TICKS to a lower value, thus increasing the number of migrants. Increate CROSSING-TICKS so that fewer people leave.

Try using the ADD-NODE button to add a bunch of nodes to an area to make it attractive.

EXTENDING THE MODEL

Add a button that allows the creation of colonias in explicit locations.

RELATED MODELS

This model is related to all of the other models in the "Urban Suite".

CREDITS AND REFERENCES

The original version of this model was developed during the Sprawl/Swarm Class at Illinois Institute of Technology in Fall 2006 under the supervision of Sarah Dunn and Martin Felsen, by the following student: Federico Diaz De Leon. See http://www.sprawlcity.us/ for more information about this course.

Further modification and documentation was performed by members of the Center for Connected Learning and Computer-Based Modeling before releasing it as an Urban Suite model.

The Urban Suite models were developed as part of the Procedural Modeling of Cities project, under the sponsorship of NSF ITR award 0326542, Electronic Arts & Maxis.

Please see the project web site ( http://ccl.northwestern.edu/cities/ ) for more information.

HOW TO CITE

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

COPYRIGHT AND LICENSE

Copyright 2007 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

Comments and Questions

Click to Run Model

breed [ employment-centers employment-center ]
breed [ service-centers service-center ]
breed [ builders builder ]
breed [ second-order-builders second-order-builder ]
breed [ third-order-builders third-order-builder ]
breed [ migrants migrant ]
breed [ rings ring ]
breed [ nodes node ]


migrants-own [ income savings works origin resident-since living-expenses ]
patches-own [ land-value water electricity occupied transport ctr elevation colonia]
builders-own [ too-close energy weight block-size origin]
second-order-builders-own [ energy weight origin]
third-order-builders-own [ energy weight origin ]

globals [ values weights marginal-value marginal-weight crossed third-phase max-cost]

to setup
  tick

  generate-cityscape

  if count employment-centers > 0 and count migrants = 0
     [ initial-condition ]

  if count migrants > 0 and count migrants with [ size = .65 ] > 0
     [ ask patches [ set land-value precision (land-value) 2 ] initial-condition-2 ]

  if third-phase = "go"
     [ economics ]

  if third-phase = "stop"
     [ ask patches [ set land-value precision (land-value) 2 ]
       reset-ticks stop ]
end 

to generate-cityscape

    if ticks = 1
      [ generate-topography
        let center-region n-of #-service-centers patches with
           [abs pxcor < ( max-pxcor - 20 ) and
            abs pycor < ( max-pycor - 20 ) ]
         ask patches [ set water 10.0 set electricity 1.0 set occupied "no" set transport 1.5 ]
         ask center-region
            [ set land-value 35 ask neighbors [ set land-value 35 ]
              ask patches in-radius-nowrap 20 [ set elevation 9.9 ]
              set water 2.0 set electricity 3.0 set transport 1.0 ask neighbors [set water 2.0 set electricity 3.0 set transport 1.0]
              sprout-service-centers 1 [set shape "eyeball" set size 5 set color 4 ]
              sprout-builders round (random-normal 4 1)
            [ set label (who + 1)
              set heading random-normal (label * (360 / count builders )) 20
              set energy random-normal 75 15
              set block-size round (random-normal 2 .15)
              set weight .9
              set pen-size 1.5 pd ] ]

    ask service-centers [ let my-roads builders with [ xcor = [xcor] of myself and ycor = [ycor] of myself ]
                          ask my-roads [ set origin (list myself) ] ]

    towards-other-centers ]

    ask builders
      [set too-close []
       fd 1
       set color 6
       if ( ticks mod 20 = 0 ) [ set heading random-normal heading 3 ]
       set weight weight - .02
       set weight precision weight 3
       set land-value (weight * 12)
       set transport .75
       set ctr "+"
       ask patches in-radius-nowrap 8 [ set ctr "+" ] ]

     ask builders [if ticks = block-size [ generate-second-order ]
                   if ticks = 3 * block-size [ generate-second-order ]
                   if ticks = 7 * block-size [ generate-second-order ]
                   if ticks = 10 * block-size [ generate-second-order ]
                   if [transport] of (patch-ahead 2 ) = .75
                        or [transport] of (patch-right-and-ahead 1 2) = .75
                        or [transport] of (patch-left-and-ahead 1 2) = .75
                        [fd 2 die]    ]

     let first-phase-limit round (random-normal 100 10)


     ask second-order-builders [
               set label ""
               if energy != 0 [ fd .5 ]
               pd
               set color 7
               set pen-size 1
               set weight weight - .001
               set weight precision weight 3
               set land-value (weight * 7)
               set water 2.0 set electricity 3.0 set transport 1.0
               if weight < 0 [ set weight 0 ]
               if round heading mod 15 < 5 or round heading mod 15 > 10
                   [ set heading heading + round (random-normal 5 10) ]

               if ( ctr = "+" ) and (distance-nowrap one-of service-centers) < 60
                   [ set energy energy - .5 ]
               if ctr != "+"
                   [ set energy energy - 1 ]
               if ctr != "+" and (distance-nowrap one-of service-centers) > 60
                   [ set energy energy - 2 ]
               if energy < .5 [ set energy 0 ]

               if energy = 0 [ die ]

               if [elevation] of (patch-ahead 1 ) < 9.9
                        [fd .5 die]

               if [land-value] of (patch-ahead 1 ) != 0
                        or [land-value] of (patch-right-and-ahead 1 1) != 0
                        or [land-value] of (patch-left-and-ahead 1 1) != 0
                        [fd .5 die]

               if [transport] of (patch-ahead 1 ) = .75
                        or [transport] of (patch-right-and-ahead 1 1) = .75
                        or [transport] of (patch-left-and-ahead 1 1) = .75
                        [fd 1 die]

               if ticks < first-phase-limit [ if energy = 0 [ die ] ]

               if ticks mod round (random-normal 5 1) = 0 and energy != 0
                 [ hatch-third-order-builders 1 [set heading ([heading] of myself + 90) set energy (random-normal [energy] of myself 2) + 2]
                   hatch-third-order-builders 1 [set heading ([heading] of myself - 90) set energy (random-normal [energy] of myself 2) + 2] ] ]


    ask third-order-builders [
               set label ""
               if energy != 0 [ fd .5 ]
               pd
               set color 7
               set pen-size 1
               set weight weight - .0007
               set weight precision weight 3
               set land-value (weight * 7)

               ifelse weight > .3
                   [ set water 2.0 set electricity 3.0 set transport 1.0 ask patches in-radius 2 [ set electricity 3.0 ] ]
                   [ set water 2.0 set electricity 3.0 set transport 1.0 ]

               if weight < 0 [ set weight 0 ]
               if round heading mod 15 < 5 or round heading mod 15 > 10
                   [ set heading heading + round (random-normal 5 10) ]

               if ctr = "+" and (distance-nowrap one-of service-centers) < 60
                   [ set energy energy - .5 ]
               if ctr != "+"
                   [ set energy energy - 1 ]
               if (distance-nowrap one-of service-centers) > 60
                   [ set energy energy - 2 ]
               if energy < .5 [ set energy 0 ]

               if ticks mod round (random-normal 3.75 .25) = 0 and energy != 0
                  [ hatch 1 [set heading ([heading] of myself + 90) set energy (random-normal [energy] of myself 2) + 2 ]
                    hatch 1 [set heading ([heading] of myself - 90) set energy (random-normal [energy] of myself 2) + 2 ] ]

                      if [elevation] of (patch-ahead 1 ) < 9.9
                      [die]

                      if [transport] of (patch-ahead 1 ) = .75
                        or [transport] of (patch-right-and-ahead 1 1) = .75
                        or [transport] of (patch-left-and-ahead 1 1) = .75
                        [fd .5 die]

                      if [land-value] of (patch-ahead 1 ) != 0
                        or [land-value] of (patch-right-and-ahead 1 1) != 0
                        or [land-value] of (patch-left-and-ahead 1 1) != 0
                        [fd 1 die]    ]

    ask builders with [ round abs xcor = max-pxcor or round abs ycor = max-pycor] [die]
    ask second-order-builders with [ round abs xcor = max-pxcor or round abs ycor = max-pycor] [die]
    ask third-order-builders with [ round abs xcor = max-pxcor or round abs ycor = max-pycor] [die]

    if ticks > 10 and count third-order-builders != 0 [
    set values ( mean [ land-value ] of third-order-builders  )
    set weights ( mean [ weight ] of third-order-builders ) ]

    if count builders = 0 and ( count third-order-builders with [ energy != 0 ] ) = 0 and count third-order-builders != 0
      [ no-display
        adjust
        display ]

    if count employment-centers > 0 [ stop ]
end 

to adjust
    repeat 7 [diffuse land-value 1]
    ask patches with [ land-value < 0 ] [ set land-value 0 ]
    ask patches [ set land-value precision ( land-value ) 2 ]
    set values ( mean [ land-value ] of third-order-builders )
    set marginal-value ( mean [ land-value ] of third-order-builders )
    set weights ( mean [ weight ] of third-order-builders )
    set marginal-weight ( mean [ weight ] of third-order-builders )
    ask third-order-builders [ die ]
    if #-service-centers > 1 [ ask service-centers [ set size round (land-value - 3)
        if size < 2 [ set size 2 ] ] ]
    maquiladoras
    stop
end 

to generate-topography
    ask patches [ set elevation 9.9 ]
    let topography n-of ((random 4) + 2) patches with
            [abs pxcor < ( max-pxcor - 20 ) and
             abs pycor < ( max-pycor - 20 ) ]
    repeat 3 [ ask topography [ set elevation 8 ask n-of 15 patches in-radius-nowrap (random-normal 15 3)
                  [ set elevation 8 ] ask one-of neighbors
                  [ set elevation 8 ask n-of 13 patches in-radius-nowrap (random-normal 8 2)
                  [ set elevation 8 ] ] ] ]
    repeat 2 [ ask patches with [ (count neighbors with [ elevation = 8 ]) > 2 ] [ set elevation 8 ] ]
    ask patches with [ elevation = 8 and (count neighbors with [ elevation = 8 ]) < 2 ] [ set elevation 9.9 ]
    repeat 1 [ diffuse elevation 1 ]
end 

to towards-other-centers
     if #-service-centers > 1 [ ask service-centers
                        [ let my-roads builders with [ (member? myself ([origin] of self)) = true ]
                          ask one-of my-roads
                               [ set heading towards-nowrap one-of service-centers with
                               [ (member? self ( [origin] of myself )) = false ] ] ] ]
end 

to generate-second-order
     hatch-second-order-builders 1 [set heading heading + 90 set energy (random [energy] of myself) ]
     hatch-second-order-builders 1 [set heading heading - 90 set energy (random [energy] of myself) ]
end 

to maquiladoras
    let roads patches with [ transport = .75 ]
    let industrial-candidate patches with
                    [ land-value < .75 and land-value > .05
                      and abs pycor < (max-pycor - 5)
                      and abs pxcor < (max-pxcor - 5)
                      and [land-value] of (max-one-of neighbors [land-value]) < .6 and land-value > .015
                      and transport != .75
                      and elevation = 9.9
                      and ( count roads with [ distance-nowrap myself < 6 ] > 0 )
                      and ( count roads with [ distance-nowrap myself < 3 ] = 0 )
                      and transport != .75
                      ]

    if ( count industrial-candidate < #-maquiladoras )
       [ user-message "Warning: unable to create all employment centers, insufficient candidate patches." ]

    create-employment-centers #-maquiladoras [ set shape "factory"
                    set label ""
                    set color 95
                    set size 7
                    let industrial-site one-of industrial-candidate
                        with [ count employment-centers with [ distance-nowrap myself < 5 ] = 0 ]
                    if industrial-site != nobody
                    [ setxy ( [pxcor] of industrial-site ) ( [pycor] of industrial-site ) ]
                    set water "0.0"
                    set electricity "0.0"
                    set transport "0.0" ]

    ask employment-centers [ ask employment-centers with
                    [ self != myself and xcor = [xcor] of myself and ycor = [ycor] of myself ] [ die ] ]

    ;ask employment-centers with [ count roads with [ distance-nowrap myself < 6 ] = 0 ] [ die ]

    ask industrial-candidate
                    with [ ( any? employment-centers-here ) = true ]
                   [set occupied "maquiladora" ask neighbors [ set occupied "maquiladora"
                    ask neighbors [ set occupied "maquiladora" ] ] ]
end 

to initial-condition
      let potential-irregular-lots patches with
          [occupied = "no" and occupied != "maquiladora" and transport != .75 and not any? employment-centers in-radius 10
            and elevation > 8.5
            and land-value <= ( values - .35  )
            and land-value > ( values ) / 45
            and (count patches with [ water = 2 and (distance-nowrap myself) < 6 ]) > 0 ]
      ask potential-irregular-lots [ set ctr "p-i-lots" ]

      let floating-population ( round (((count patches with [ water = 2 and electricity = 3]) * init-density) / 6) )

      ask n-of ( floating-population / 5 ) potential-irregular-lots
          [sprout-migrants 1
                [ set size .65
                  set shape "circle"
                  set origin one-of ["oaxaca" "jalisco" "zacatecas" "mexico"]
                  set occupied [origin] of self
                  set works [] set (works) lput (min-one-of employment-centers [ distance-nowrap myself ]) (works)
                  set resident-since round (random-normal 8 2)
                  ]]
      stop
end 

to initial-condition-2
      if count migrants with [ size = .65 ] != 0 [
      ask one-of migrants with [ size = .65 ]
                  [ set size .6
                    repeat 4 [ ask one-of patches in-radius-nowrap 3 with [ occupied = "no" and occupied != "maquiladora"
                    and elevation > 8.5 ]
                    [ sprout-migrants 1 [
                    set shape "circle"
                    set size .6
                    set color red
                    set origin one-of [ "oaxaca" "jalisco" "zacatecas" "mexico"]
                    set occupied [origin] of self
                    set color red
                    set works [] set (works) lput (min-one-of employment-centers [ distance-nowrap myself ]) (works)
                    set resident-since round (random-normal 8 2)
                    get-costs ] ] ] ] ]

      ask migrants [ ifelse color-code? = true
      [ if origin = "oaxaca" [set color pink]
        if origin = "jalisco" [set color orange]
        if origin = "zacatecas" [set color blue]
        if origin = "mexico" [set color green] ]
        [ set color black ] ]

      ask migrants [ set occupied [origin] of self ]
      if (count migrants with [ size = .65 ]) = 0 [ set third-phase "go" stop ]
end 

to economics
   ask migrants [ ask patches in-radius-nowrap (4 - (colonia-size) / 2) [ set colonia colonia - .5 ]
   get-costs
   set max-cost max [ living-expenses ] of migrants
   set income precision (random-normal max-cost 3) 2
   set income precision (income) 2 set living-expenses precision (living-expenses) 2 ]
   ask migrants with [ income < living-expenses ] [ while [ income < living-expenses ] [set living-expenses living-expenses - 1 ] ]
   if (count migrants with [ income < living-expenses ]) = 0
   [ set third-phase "stop" stop ]
end 

to update-display
     if visual-update = "off" [ ask patches [set pcolor white] ]
     if visual-update = "land value gradient" [ ask patches [set pcolor land-value] ]
     if visual-update = "units with no water" [ ask patches with [ water = 10 and (any? migrants-here) = true ]
                                        [ set pcolor 67 ] ]
     if visual-update = "units with no electricity" [ ask patches with [ electricity = 1 and (any? migrants-here) = true ]
                                              [ set pcolor 127 ] ]
     if visual-update = "elevation" [ask patches [ set pcolor elevation + 50 ] ]
     if visual-update = "colonias" [ ask patches with [ colonia = 0 ] [ set colonia 9.9 ]
                          ask patches with [ colonia != 0 and colonia > -10 ] [set pcolor colonia + 10]
                          ask patches with [ colonia < -9.9 ] [ set pcolor 0 ] ]

  ifelse color-code? = true
  [ ask migrants [
      if origin = "oaxaca" [set color pink]
      if origin = "jalisco" [set color orange]
      if origin = "zacatecas" [set color blue]
      if origin = "mexico" [set color green] ] ]
  [ ifelse visual-update = "land value gradient"
      [ ask migrants with [ shape = "circle" ] [ set color white ] ]
      [ ask migrants with [ shape = "circle" ] [ set color black ] ] ]
end 

to go
    tick
    if count third-order-builders != 0 [
      set values ( mean [ land-value ] of third-order-builders )
      set weights ( mean [ weight ] of third-order-builders ) ]
    set max-cost max [ living-expenses ] of migrants

    update-display
    ask migrants [set savings precision (savings) 2 set living-expenses precision (living-expenses) 2 ]
    ;ask migrants [ set size (size + 1 / (savings + 1)) ]

    ;show "About to migrate"
    if ( ticks mod migration-ticks = 0 ) [migrate-static]


    ask migrants [ set occupied [origin] of self ]


    if ( ticks mod 15 = 0 )
        [ ask migrants [set resident-since resident-since + 1 set resident-since round resident-since ] ]



    ;show "About to grow the city"
    ifelse city-growth? = true [ ask third-order-builders [ set hidden? false ] ]
                              [ ask third-order-builders [ set hidden? true ] ]

    ;show "About to regulate"
    if city-growth? = true [ regulate ]

    ;show "About to call grow-city"
    if city-growth? = true [ if ( ticks mod building-ticks = 0  ) [ grow-city ] ]

    ;show "About to call on third-order builders"
    if ( city-growth? = true and ticks mod ( building-ticks * 2 ) = 0 ) [ ask third-order-builders [
                hatch 1 [set heading ([heading] of myself + 90) set weight marginal-weight ]
                hatch 1 [set heading ([heading] of myself - 90) set weight marginal-weight ] ] ]
    ;show "About to update patch values"
    ask patches [
      if ( land-value < 0 ) [ set land-value 0 ]
      if ( not any? migrants-here and occupied != "maquiladora" ) [ set occupied "no" ]
      if ( colonia > -.1 ) [ set colonia 9.9 ]
    ]

    ask turtles with [ round abs xcor = max-pxcor or round abs ycor = max-pycor] [die]

    ;show "About to regularize"
    regularize

    ;show "About to cross borders"
    cross

    ;show "About to earn and spend"
    ask migrants [ earn-spend ]

    ;show "About to move"
    move
end 

to migrate-static
    ask one-of migrants
        [ let mypatch patch-here
          let newcomer one-of patches in-radius-nowrap 1.5 with
            [ occupied = "no"
              and elevation > 8.5
              and land-value <= [land-value] of mypatch ]
          if newcomer != nobody
          [ hatch 1 [ setxy ( [pxcor] of newcomer ) ( [pycor] of newcomer ) ]
            set occupied [origin] of self
            set shape "circle"
            set resident-since 0
            get-costs
            set income precision (random-normal 55 3) 2
            set savings precision (random-normal 15 5) 2
            get-costs
            ask patches in-radius-nowrap (4 - colonia-size) [ set colonia colonia - .5 ] ] ]
end 

to move
    ask migrants with [ resident-since > 5  ]
    [ if water = 10.0 and savings > required-capital
    [ let somewhere-nice one-of patches in-radius-nowrap 50 with
        [ water = 2.0 and electricity = 3.0
          and land-value < ([savings] of myself * 0.0010) ]
      if somewhere-nice != nobody [
          face-nowrap somewhere-nice
          jump distance-nowrap somewhere-nice
          set color red set size .8
          set savings ( savings - ( land-value / 0.0010) )
          get-costs ] ] ]
end 

to cross
    if ticks mod crossing-ticks = 0
      [ ask one-of migrants [ set color 108 set size 15 die ] set crossed crossed + 1 ]
end 

to regularize

    let colonias one-of patches with [ colonia < (-14 - colonia-size)
                                       and (any? migrants-on neighbors) = true
                                       and pxcor < (max-pxcor - 4) and pycor < (max-pycor - 4)
                                       and (count rings with [ distance-nowrap myself < 15 ]) = 0
                                     ]

    if (count rings) < 5 and colonias != nobody
        [ ask colonias
                   [ sprout-rings 1 [
                     set color 27
                     set shape "loop" ] ] ]



    ask rings [ set size abs ((mean [ colonia ] of (migrants in-radius-nowrap 10 )) ^ 2 ) / 3
               if size < 3 [ die ]
               if (count patches in-radius-nowrap 8 with [ water = 10 ]) < 5  [ die ]
               if (count third-order-builders in-radius-nowrap 6) < 1
                       [ let buildit
                               one-of patches in-radius-nowrap size with
                             [ (abs (land-value) - values) < .25
                               and any? migrants-here = true
                               and water = 10
                               and not any? third-order-builders-here ]
                         if buildit != nobody [ ask buildit
                             [ sprout-third-order-builders 1 [ set size 1
                                              set color red
                                              set weight marginal-weight
                                              face-nowrap min-one-of migrants [ distance-nowrap myself ]
                                              set origin myself] ] ] ] ]
end 

to grow-city
    ask third-order-builders [
         fd .75
         pd
         set pen-size 1
         set weight weight - .05
         set weight precision weight 3
         ask other migrants-here [ get-costs ]
         set land-value (weight * 3)
         set water 2.0
         set electricity 3.0
         set transport 1.0
         set colonia colonia + .15 ask neighbors [ set colonia (colonia + .15) ] ]
end 

to regulate
    ask third-order-builders [
        if [transport] of (patch-ahead 1) = .75
             or [transport] of (patch-right-and-ahead 1 1) = .75
             or [transport] of (patch-left-and-ahead 1 1) = .75
             [fd 1 die]

        if [land-value] of (patch-ahead 1) > land-value
             or [land-value] of (patch-right-and-ahead 1 1) > land-value
             or [land-value] of (patch-left-and-ahead 1 1) > land-value
             [fd .5 die]

        if [occupied] of (patch-ahead 1) = "maquiladora"
              [ die ]

        ;if ( count third-order-builders-on patch-ahead 1 > 0 )
        ;      [ die ]

        if not any? migrants-on patch-ahead 1
              [ die ]

        if not any? rings in-radius 8
              [ die ] ]
end 

to earn-spend
      set savings precision (savings + income - living-expenses) 2
      if savings < 7 [ set savings 0.0 ]
end 

to get-costs
       let food 27.0
       let other-utilities 8.0
       let my-workplace one-of employment-centers with [ ( member? self ( [works] of myself )  ) = true ]
       let transport-costs ( transport * ( ( distance-nowrap one-of service-centers / 30 ) +
                                             distance-nowrap my-workplace / 25 ) )

       set living-expenses ( land-value + electricity + water + food + transport-costs + other-utilities )
end 


; Copyright 2007 Uri Wilensky.
; See Info tab for full copyright and license.

There are 11 versions of this model.

Uploaded by When Description Download
Uri Wilensky almost 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky over 11 years ago Updated version tag Download this version
Uri Wilensky over 11 years ago Updated to version from NetLogo 5.0.3 distribution Download this version
Uri Wilensky almost 12 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky over 12 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky almost 14 years ago Urban Suite - Tijuana Bordertowns Download this version

Attached files

File Type Description Last updated
Urban Suite - Tijuana Bordertowns.png preview Preview for 'Urban Suite - Tijuana Bordertowns' about 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.