You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo/dbscan-clustering-demo-v5.nlogo
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -44,14 +44,15 @@ to setup
44
44
ask agents
45
45
[
46
46
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)))
48
48
]
49
49
end
50
50
51
51
to cluster-by-variable
52
52
setup
53
53
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*
55
56
let clusters dbscan:cluster-by-variable agents "wealth" minimum-number-of-members maximum-distance
56
57
57
58
; Show number of clusters
@@ -84,7 +85,8 @@ end
84
85
to cluster-by-location
85
86
setup
86
87
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*
88
90
let clusters dbscan:cluster-by-location agents minimum-number-of-members maximum-distance
Copy file name to clipboardExpand all lines: demo/dbscan-clustering-demo-v6.nlogo
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ to setup
41
41
ask agents
42
42
[
43
43
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)))
45
45
]
46
46
47
47
; Set up patches with clustering variable
@@ -54,7 +54,8 @@ end
54
54
to cluster-agents-by-variable
55
55
setup
56
56
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*
58
59
let clusters dbscan:cluster-by-variable agents "wealth" minimum-number-of-members maximum-distance-agents
59
60
60
61
; Show number of clusters
@@ -87,7 +88,8 @@ end
87
88
to cluster-agents-by-location
88
89
setup
89
90
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*
91
93
let clusters dbscan:cluster-by-location agents minimum-number-of-members maximum-distance-agents
92
94
93
95
; Show number of clusters
@@ -124,7 +126,8 @@ end
124
126
to cluster-patches-by-variable
125
127
setup
126
128
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*
128
131
let clusters dbscan:cluster-by-variable patches "resource" minimum-number-of-members maximum-distance-patches
0 commit comments