Skip to content

Commit

Permalink
Add model
Browse files Browse the repository at this point in the history
  • Loading branch information
Olga Lyashevska committed Nov 7, 2023
1 parent fdf507d commit 9406b3f
Show file tree
Hide file tree
Showing 11 changed files with 37,126 additions and 0 deletions.
5,586 changes: 5,586 additions & 0 deletions AvailableWaterSupply.nls

Large diffs are not rendered by default.

3,718 changes: 3,718 additions & 0 deletions ExpansionEvaluation.nls

Large diffs are not rendered by default.

1,068 changes: 1,068 additions & 0 deletions ExpansionWithin2ndPrimaryCanal.nls

Large diffs are not rendered by default.

2,676 changes: 2,676 additions & 0 deletions ExpansionWithinSecondaryCanal.nls

Large diffs are not rendered by default.

1,420 changes: 1,420 additions & 0 deletions FarmersHarvestEvaluation.nls

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions FieldStorage.nls
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
to FieldStorage
ask patches with [pcolor = grey] ;; ask the storage fields at the right side of the river
[
set CurrentStorage (CurrentStorage + count RiverVolumes-here)
sprout-StorageVolumes (count RiverVolumes-here)
ask StorageVolumes-here
[
set color blue
set size 0.5
set heading 0
]
if ticks > 365 * (Year - 1) and ticks < 365 * Year
[
set Landed (Landed + count RiverVolumes-here)
set Landed_Year Landed
]

ask RiverVolumes-here [die] ;; ask the river volumes on the storage patch to die, since they have been replaced by storage volumes
]

ask patches with [pcolor = red] ;; set the current storage value of the gated canal stretch to the value of the storage patch, so that it can check in a new round if the gate should let water through in case the storage patch is not full
[
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;for gates along the primary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if pxcor = 28
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1)))
]
if pxcor = 32
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1)))
]
if pxcor = 36
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1)))
]
if pxcor = 41
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1)))
]
if pxcor = 45
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1)))
]
if pxcor = 49
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1)))
]
if pxcor = 30
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor - 1)))
]
if pxcor = 34
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor - 1)))
]
if pxcor = 43
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor - 1)))
]
if pxcor = 47
[
set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor - 1)))
]
]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;for gates along the secondary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ask patches with [pcolor = red + 2] ;; set the current storage value of the gated canal stretch to the value of the storage patch, so that it can check in a new round if the gate should let water through in case the storage patch is not full
[
if pycor = 13
[
set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor - 1) pycor))
]
if pycor = 11
[
set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor + 1) pycor))
]
if pycor = 9
[
set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor - 1) pycor))
]
if pycor = 7
[
set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor + 1) pycor))
]
if pycor = 5
[
set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor - 1) pycor))
]
if pycor = 3
[
set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor + 1) pycor))
]
]
end
979 changes: 979 additions & 0 deletions GateCapacity.nls

Large diffs are not rendered by default.

5,585 changes: 5,585 additions & 0 deletions HarvestMemory.nls

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions InitialLayout.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 1 1 1 4 1 1 1 4 1 1 1 4 4 1 1 1 4 1 1 1 4 1 1 1 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 1 3 1 4 1 3 1 4 1 3 1 4 4 1 3 1 4 1 3 1 4 1 3 1 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -2 -2 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 5
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 1 3 1 4 1 3 1 4 4 4 4 4 4 1 3 1 4 1 3 1 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 1 1 1 4 1 1 1 4 4 4 4 4 4 1 1 1 4 1 1 1 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 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