Skip to content

Commit 4ea5c72

Browse files
committed
go-stop button introduced
* The new go-stop button in the interface executes a run which lasts until the exit-condition is met i.e. until scientists have converged and become sufficiently confident that their theory is the best
1 parent 5d99c5f commit 4ea5c72

File tree

2 files changed

+60
-30
lines changed

2 files changed

+60
-30
lines changed

SocNetABM.nlogo

Lines changed: 58 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ end
7171

7272

7373

74+
; runs until the exit-condition is met
75+
to go-stop
76+
while [not exit-condition][
77+
go
78+
]
79+
end
80+
81+
82+
83+
84+
7485
to-report init-ab
7586
; this formulation prevents drawing values of zero. It reports
7687
; a random-float from the intervall (0 , max-prior]
@@ -340,9 +351,9 @@ ticks
340351

341352
SLIDER
342353
13
343-
120
354+
160
344355
185
345-
153
356+
193
346357
th1-signal
347358
th1-signal
348359
0.1
@@ -355,9 +366,9 @@ HORIZONTAL
355366

356367
SLIDER
357368
14
358-
166
369+
206
359370
186
360-
199
371+
239
361372
th2-signal
362373
th2-signal
363374
0.1
@@ -370,9 +381,9 @@ HORIZONTAL
370381

371382
SLIDER
372383
14
373-
215
384+
255
374385
186
375-
248
386+
288
376387
pulls
377388
pulls
378389
100
@@ -385,9 +396,9 @@ HORIZONTAL
385396

386397
SLIDER
387398
13
388-
268
399+
308
389400
185
390-
301
401+
341
391402
max-prior
392403
max-prior
393404
1
@@ -400,9 +411,9 @@ HORIZONTAL
400411

401412
SLIDER
402413
14
403-
315
414+
355
404415
186
405-
348
416+
388
406417
jump-threshold
407418
jump-threshold
408419
1
@@ -415,9 +426,9 @@ HORIZONTAL
415426

416427
SLIDER
417428
15
418-
76
429+
116
419430
187
420-
109
431+
149
421432
scientists
422433
scientists
423434
3
@@ -430,9 +441,9 @@ HORIZONTAL
430441

431442
SLIDER
432443
13
433-
359
444+
399
434445
185
435-
392
446+
432
436447
strategy-threshold
437448
strategy-threshold
438449
0
@@ -444,10 +455,10 @@ NIL
444455
HORIZONTAL
445456

446457
BUTTON
447-
23
448-
26
449-
86
450-
59
458+
21
459+
14
460+
84
461+
47
451462
NIL
452463
setup
453464
NIL
@@ -461,10 +472,10 @@ NIL
461472
1
462473

463474
BUTTON
464-
103
465-
27
466-
166
467-
60
475+
101
476+
15
477+
164
478+
48
468479
NIL
469480
go
470481
T
@@ -479,9 +490,9 @@ NIL
479490

480491
CHOOSER
481492
13
482-
404
493+
444
483494
151
484-
449
495+
489
485496
network-structure
486497
network-structure
487498
"cycle" "wheel" "complete"
@@ -508,9 +519,9 @@ PENS
508519

509520
SWITCH
510521
13
511-
460
522+
500
512523
167
513-
493
524+
533
514525
critical-interaction
515526
critical-interaction
516527
1
@@ -519,9 +530,9 @@ critical-interaction
519530

520531
SLIDER
521532
13
522-
508
533+
548
523534
185
524-
541
535+
581
525536
crit-strength
526537
crit-strength
527538
1 / 10000
@@ -534,9 +545,9 @@ HORIZONTAL
534545

535546
SLIDER
536547
14
537-
552
548+
592
538549
198
539-
585
550+
625
540551
crit-interact-lock-default
541552
crit-interact-lock-default
542553
0
@@ -547,6 +558,23 @@ crit-interact-lock-default
547558
NIL
548559
HORIZONTAL
549560

561+
BUTTON
562+
50
563+
64
564+
124
565+
97
566+
NIL
567+
go-stop
568+
NIL
569+
1
570+
T
571+
OBSERVER
572+
NIL
573+
NIL
574+
NIL
575+
NIL
576+
0
577+
550578
@#$#@#$#@
551579
## WHAT IS IT?
552580

protocol.nls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ end
114114

115115

116116

117+
; reports the current average signal for th# and updates the global
118+
; `th-i-signal` accordingly
117119
to-report average-signal [th#]
118120
if critical-interaction and th-i-signal = (list th1-signal th2-signal) [
119121
set th-i-signal [0 0]

0 commit comments

Comments
 (0)