Skip to content

Commit 3f4ebcb

Browse files
committed
2 parents dc1e649 + 71ef95a commit 3f4ebcb

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

demo/dbscan-clustering-demo-v5.nlogo

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@ to setup
4444
ask agents
4545
[
4646
setxy random-xcor random-ycor
47-
set wealth (max (list min-wealth (random max-wealth)) )
47+
set wealth (max (list min-wealth (random max-wealth)))
4848
]
4949
end
5050

5151
to cluster-by-variable
5252
setup
5353

54-
; Cluster agents by variable "wealth", with at least *minimum-number-of-members* members to constitute a cluster, and a maximum value difference of *maximum-distance*
54+
; Cluster agents by variable "wealth", with at least *minimum-number-of-members* members to constitute a cluster,
55+
; and a maximum value difference of *maximum-distance*
5556
let clusters dbscan:cluster-by-variable agents "wealth" minimum-number-of-members maximum-distance
5657

5758
; Show number of clusters
@@ -84,7 +85,8 @@ end
8485
to cluster-by-location
8586
setup
8687

87-
; Cluster agents by location, with at least *minimum-number-of-members* members to constitute a cluster, and a maximum distance of *maximum-distance*
88+
; Cluster agents by location, with at least *minimum-number-of-members* members to constitute a cluster,
89+
; and a maximum distance of *maximum-distance*
8890
let clusters dbscan:cluster-by-location agents minimum-number-of-members maximum-distance
8991

9092
; Show number of clusters
@@ -189,7 +191,7 @@ NIL
189191
SLIDER
190192
185
191193
12
192-
357
194+
372
193195
45
194196
maximum-distance
195197
maximum-distance

demo/dbscan-clustering-demo-v6.nlogo

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ to setup
4141
ask agents
4242
[
4343
setxy random-xcor random-ycor
44-
set wealth (max (list min-wealth (random max-wealth)) )
44+
set wealth (max (list min-wealth (random max-wealth)))
4545
]
4646

4747
; Set up patches with clustering variable
@@ -54,7 +54,8 @@ end
5454
to cluster-agents-by-variable
5555
setup
5656

57-
; Cluster agents by variable "wealth", with at least *minimum-number-of-members* members to constitute a cluster, and a maximum value difference of *maximum-distance*
57+
; Cluster agents by variable "wealth", with at least *minimum-number-of-members* members to constitute a cluster,
58+
; and a maximum value difference of *maximum-distance-agents*
5859
let clusters dbscan:cluster-by-variable agents "wealth" minimum-number-of-members maximum-distance-agents
5960

6061
; Show number of clusters
@@ -87,7 +88,8 @@ end
8788
to cluster-agents-by-location
8889
setup
8990

90-
; Cluster agents by location, with at least *minimum-number-of-members* members to constitute a cluster, and a maximum distance of *maximum-distance-agents*
91+
; Cluster agents by location, with at least *minimum-number-of-members* members to constitute a cluster,
92+
; and a maximum distance of *maximum-distance-agents*
9193
let clusters dbscan:cluster-by-location agents minimum-number-of-members maximum-distance-agents
9294

9395
; Show number of clusters
@@ -124,7 +126,8 @@ end
124126
to cluster-patches-by-variable
125127
setup
126128

127-
; Cluster agents by variable "resource", with at least *minimum-number-of-members* members to constitute a cluster, and a maximum value difference of *maximum-distance-patches*
129+
; Cluster agents by variable "resource", with at least *minimum-number-of-members* members to constitute a cluster,
130+
; and a maximum value difference of *maximum-distance-patches*
128131
let clusters dbscan:cluster-by-variable patches "resource" minimum-number-of-members maximum-distance-patches
129132

130133
; Show number of clusters

0 commit comments

Comments
 (0)