-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModele_paysage_2.0.6.nlogo
1791 lines (1548 loc) · 42.1 KB
/
Modele_paysage_2.0.6.nlogo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
globals [
grass ;; keep track of how much plants there is
;;initialisation of lists of agents counts and means for graph smoothing functions
list_count_trees
mean_count_trees
list_count_coccinelles
mean_count_coccinelles
list_count_pucerons
mean_count_pucerons
pesticides?
pesticides_duree
]
;; pucerons and coccinelles are both breeds of turtle.
breed [pucerons puceron] ;; pucerons is its own plural, so we use "puceron" as the singular.
breed [coccinelles coccinelle]
breed [trees tree]
trees-own [species]
turtles-own [
energy
counter
] ;; both coccinelles and pucerons have energy
patches-own [
countdown
alive
]
;to setup
; clear-all
; ask patches [
; set pcolor 52
; set alive false
; ;create-tree
;
; ]
;
; crt patchNumber [
; setxy random-xcor random-ycor
; set color one-of (list 52 44 33)
; ]
;
; ask patches [
; set pcolor [color] of min-one-of turtles [distance myself]
; if pcolor = 44 [set alive true]
; ]
;
; ask turtles [die]
; create-tree
;
; ;; check GRASS? switch.
; ;; if it is true, then grass grows and the pucerons eat it
; ;; if it false, then the pucerons don't need to eat
; if Consommation_des_plantes? [
; ask patches [
; set countdown random Temps_De_Guérison ;; initialize grass grow clocks randomly
; ;set pcolor one-of [green brown]
; set alive one-of [true false]
; if alive = true [ask trees-here [die]]
;
; ]
;
; ]
;
; set-default-shape pucerons "bug"
; create-pucerons initial-number-pucerons ;; create the pucerons, then initialize their variables
; [
; set color gray
; set size 1.5 ;; easier to see
; set label-color blue - 2
; set energy random (2 * pucerons-gain-from-food)
; setxy random-xcor random-ycor
; ]
; set-default-shape coccinelles "ladybug"
; create-coccinelles initial-number-coccinelles ;; create the coccinelles, then initialize their variables
; [
; set color red
; set size 2 ;; easier to see
; set energy random (2 * coccinelles-gain-from-food)
; setxy random-xcor random-ycor
; ]
;
; set grass count patches with [alive = true]
;
;
; set list_count_trees list 0 0
; set list_count_coccinelles list 0 0
; set list_count_pucerons list 0 0
;
; set pesticides? false
; set pesticides_duree 0
; reset-ticks
;end
to setup-gotheron
clear-all
ask patches [
set pcolor 52
set alive false
;create-tree
]
; crt patchNumber [
; setxy random-xcor random-ycor
; set color one-of (list 52 44 33)
; ]
;
; ask patches [
; set pcolor [color] of min-one-of turtles [distance myself]
; if pcolor = 44 [set alive true]
; ]
;
; ask turtles [die]
;
; crt 1 [
; setxy 1 0
; ask patches in-radius 5 [set pcolor grey]
; ask patches in-radius 10 with [pcolor = 52] [set pcolor yellow]
; ask patches in-radius 20 with [pcolor = 52] [set pcolor orange]
; ask patches in-radius 30 with [pcolor = 52] [set pcolor green]
; ask patches in-radius 40 with [pcolor = 52] [set pcolor red]
;
;
; ]
crt 1 [
setxy 1 0
;map [set heading i ask patch ahead 9 [set pcolor red]] [21 22 23 24 25 26 27 28]
let distanceList (list 10 20 30 40)
foreach distanceList [
v ->
let angleList n-values 60 [ i -> i + 20] show angleList
let distList n-values v [ i -> i + 1] show distList
let ccolor one-of (list red pink green yellow orange black brown)
;let ccolor one-of (list 52 44 33)
foreach angleList [x -> set heading x
foreach distList [y -> ask patch-ahead y [if pcolor = 52 [set pcolor ccolor] ]
]
]
set angleList n-values 60 [ i -> i + 80] show angleList
set distList n-values v [ i -> i + 1] show distList
set ccolor one-of (list red pink green yellow orange black brown)
foreach angleList [x -> set heading x
foreach distList [y -> ask patch-ahead y [if pcolor = 52 [set pcolor ccolor] ]
]
]
set angleList n-values 60 [ i -> i + 140] show angleList
set distList n-values v [ i -> i + 1] show distList
set ccolor one-of (list red pink green yellow orange black brown)
foreach angleList [x -> set heading x
foreach distList [y -> ask patch-ahead y [if pcolor = 52 [set pcolor ccolor] ]
]
]
set angleList n-values 60 [ i -> i + 200] show angleList
set distList n-values v [ i -> i + 1] show distList
set ccolor one-of (list red pink green yellow orange black brown)
foreach angleList [x -> set heading x
foreach distList [y -> ask patch-ahead y [if pcolor = 52 [set pcolor ccolor] ]
]
]
set angleList n-values 60 [ i -> i + 260] show angleList
set distList n-values v [ i -> i + 1] show distList
set ccolor one-of (list red pink green yellow orange black brown)
foreach angleList [x -> set heading x
foreach distList [y -> ask patch-ahead y [if pcolor = 52 [set pcolor ccolor] ]
]
]
set angleList n-values 60 [ i -> i + 320] show angleList
set distList n-values v [ i -> i + 1] show distList
set ccolor one-of (list red pink green yellow orange black brown)
foreach angleList [x -> set heading x
foreach distList [y -> ask patch-ahead y [if pcolor = 52 [set pcolor ccolor] ]
]
]
]
; set heading 21
; ask patch-ahead 6 [set pcolor pink] ask patch-ahead 7 [set pcolor pink] ask patch-ahead 8 [set pcolor pink] ask patch-ahead 9 [set pcolor pink]
; set heading 22
; ask patch-ahead 6 [set pcolor pink] ask patch-ahead 7 [set pcolor pink] ask patch-ahead 8 [set pcolor pink] ask patch-ahead 9 [set pcolor pink]
; set heading 23
; ask patch-ahead 6 [set pcolor pink] ask patch-ahead 7 [set pcolor pink] ask patch-ahead 8 [set pcolor pink] ask patch-ahead 9 [set pcolor pink]
; set heading 24
; ask patch-ahead 6 [set pcolor pink] ask patch-ahead 7 [set pcolor pink] ask patch-ahead 8 [set pcolor pink] ask patch-ahead 9 [set pcolor pink]
; ;ask patch-at-heading-and-distance 21 6 [set pcolor pink]
; ask patches in-radius 10 with [pcolor = 52] [set pcolor yellow]
; ask patches in-radius 20 with [pcolor = 52] [set pcolor orange]
; ask patches in-radius 30 with [pcolor = 52] [set pcolor green]
; ask patches in-radius 40 with [pcolor = 52] [set pcolor red]
die
]
;;création des chemins et haies transverses
crt 1 [ ;;chemin vertical
setxy 0 0
set heading 20
hatch 1 [ repeat 40 [ fd 1 ask patches in-radius 1 [set pcolor grey] ] die]
move-to patch-at-heading-and-distance 90 2
repeat 40 [ fd 1 ask patches in-radius 1 [set pcolor blue] ]
die
]
crt 1 [ ;;chemin droite
setxy 0 0
set heading 140
hatch 1 [ repeat 40 [ fd 1 ask patches in-radius 1 [set pcolor grey] ] die]
move-to patch-at-heading-and-distance 90 2
repeat 40 [ fd 1 ask patches in-radius 1 [set pcolor blue] ]
die
]
crt 1 [ ;;chemin gauche
setxy 0 0
set heading 260
hatch 1 [ repeat 40 [ fd 1 ask patches in-radius 1 [set pcolor grey] ] die]
move-to patch-at-heading-and-distance 100 4
repeat 45 [ fd 1 ask patches in-radius 1 [set pcolor blue] ]
die
]
;;rond point central
crt 1 [
setxy 1 0
ask patches in-radius 5 [set pcolor grey]
die
]
;;create-trees
ask patches with [pcolor = green] [
sprout-trees 1 [
set shape "tree"
set size 2
set color 52
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
;;create-trees
ask patches with [pcolor = orange] [
sprout-trees 1 [
set shape "flower"
set size 2
set color 24
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
ask patches with [pcolor = red] [
sprout-trees 1 [
set shape "tree"
set size 2
set color 14
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
ask patches with [pcolor = brown] [
sprout-trees 1 [
set shape "plant"
set size 2
set color 52
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
ask patches with [pcolor = yellow] [
sprout-trees 1 [
set shape "flower"
set size 2
set color 43
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
ask patches with [pcolor = pink] [
sprout-trees 1 [
set shape "tree"
set size 2
set color 123
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
ask patches with [pcolor = black] [
sprout-trees 1 [
set shape "plant"
set size 2
set color gray
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
ask patches [
if count turtles-here with [shape = "tree"] > 0 [set alive true]
]
; create-tree
;; check GRASS? switch.
;; if it is true, then grass grows and the pucerons eat it
;; if it false, then the pucerons don't need to eat
if Consommation_des_plantes? [
ask patches [
set countdown random Temps_De_Guérison ;; initialize grass grow clocks randomly
;set pcolor one-of [green brown]
set alive one-of [true false]
if alive = false [ask trees-here [die]]
]
]
set-default-shape pucerons "bug"
create-pucerons initial-number-pucerons ;; create the pucerons, then initialize their variables
[
set color gray
set size 1.5 ;; easier to see
set label-color blue - 2
set energy random (2 * pucerons-gain-from-food)
setxy random-xcor random-ycor
move-to one-of patches with [count turtles-here with [shape = "tree"] > 0]
]
set-default-shape coccinelles "ladybug"
create-coccinelles initial-number-coccinelles ;; create the coccinelles, then initialize their variables
[
set color red
set size 2 ;; easier to see
set energy random (2 * coccinelles-gain-from-food)
setxy random-xcor random-ycor
]
;set grass count patches with [alive = true]
set grass count patches with[count turtles-here with [shape = "tree"] > 0]
set list_count_trees list 0 0
set list_count_coccinelles list 0 0
set list_count_pucerons list 0 0
set pesticides? false
set pesticides_duree 0
reset-ticks
end
to go
;if count coccinelles + count pucerons = 0 [ stop ]
ask pucerons [
move-pucerons
if Consommation_des_plantes? [
set energy energy - 1 ;; deduct energy for pucerons only if grass? switch is on
eat-grass
]
death
reproduce-pucerons
]
ask coccinelles [
move-coccinelles
set energy energy - 1 ;; coccinelles lose energy as they move
catch-pucerons
if Coccinelles_Généralistes? [eat-plant]
death
reproduce-coccinelles
]
;pesticides
;if Consommation_des_plantes? [ ask patches [ grow-grass ] ]
ask patches [ grow-grass ]
set grass count patches with [alive = true]
calculate-means-over-time
tick
;progress
if Limite_De_Temps? and ticks > Limite [stop]
end
to move ;; turtle procedure
rt random 50
lt random 50
fd 1
end
to move-pucerons
set counter counter + 1
let turning 50
if count turtles-here with [shape = "flower"] > 0 [
rt 180 ;ew
set turning 15 ;repulsive, let's go away
]
if count turtles-here with [shape = "tree"] > 0 [
set turning 380 ;there's food here, let's forage
set counter 0
]
if counter > 30 [ set turning 15];no food around, let's go away
if random 100 > 50 [
rt random turning
lt random turning
]
if Fleurs_Répulsives? [
let repulsor 0
ask patch-ahead 7 [set repulsor count turtles-here with [shape = "flower"] ]
if repulsor > 0 [
rt 180 ;ew, there are repulsive plants ahead
set turning 15 ;repulsive, let's go away
]
]
if Barrières_Centrales? [if [pcolor] of patch-ahead 1 = 5 or [pcolor] of patch-ahead 1 = 105 [if random 100 > 10 [rt 180]]] ; barrier]
fd 1
end
to move-coccinelles
;move
set counter counter + 1
let turning 50
if count turtles-here with [shape = "plant"] > 0 [
set turning 380 ;there's food here, let's forage
set counter 0
]
if count turtles-here with [shape = "tree"] > 0 [
set turning 380 ;there's food here, let's forage
set counter 0
]
;if count pucerons-here > 0 [set counter 0]
if counter > 15 [ set turning 15];no food around, let's go away
if random 100 > 50 [
rt random turning
lt random turning
]
if Barrières_Centrales? [if [pcolor] of patch-ahead 1 = 5 or [pcolor] of patch-ahead 1 = 105 [if random 100 > 10 [rt 180]]] ; barrier]
fd 1
end
to eat-grass ;; pucerons procedure
;; pucerons eat grass, turn the patch brown
;if [alive] of patch-here = true and [pcolor] of patch-here = 44 [
if [alive] of patch-here = true and count turtles-here with [shape = "tree"] > 0 [
;set pcolor brown
ask patch-here [set alive false]
ask trees-here [die]
set energy energy + pucerons-gain-from-food ;; pucerons gain energy by eating
]
end
to eat-plant ;; coccinelles procedure
;; pucerons eat grass, turn the patch brown
;if [alive] of patch-here = true and [pcolor] of patch-here = 44 [
if [alive] of patch-here = true and count turtles-here with [shape = "plant"] > 0 [
;set pcolor brown
ask patch-here [set alive false]
ask trees-here [die]
set energy energy + (coccinelles-gain-from-food / 4) ;; coccinelles gain energy by eating plants
]
end
to reproduce-pucerons ;; pucerons procedure
; if random-float 100 < pucerons-reproduce [ ;; throw "dice" to see if you will reproduce
; set energy (energy / 2) ;; divide energy between parent and offspring
; hatch 1 [ rt random-float 360 fd 1 ] ;; hatch an offspring and move it forward 1 step
; ]
if energy > pucerons-reproduce [
set energy (energy / 2) ;; divide energy between parent and offspring
hatch 1 [ rt random-float 360 fd 1 ] ;; hatch an offspring and move it forward 1 step
]
end
to reproduce-coccinelles ;; coccinelle procedure
; if random-float 100 < coccinelle-reproduce [ ;; throw "dice" to see if you will reproduce
; set energy (energy / 2) ;; divide energy between parent and offspring
; hatch 1 [ rt random-float 360 fd 1 ] ;; hatch an offspring and move it forward 1 step
; ]
if energy > coccinelles-reproduce [
set energy (energy / 2) ;; divide energy between parent and offspring
hatch 1 [ rt random-float 360 fd 1 ] ;; hatch an offspring and move it forward 1 step
]
end
to catch-pucerons ;; coccinelle procedure
let prey one-of pucerons-here ;; grab a random pucerons
if prey != nobody ;; did we get one? if so,
[ ask prey [ die ] ;; kill it
set counter 0 ;; counter for movement
set energy energy + coccinelles-gain-from-food ] ;; get energy from eating
end
to death ;; turtle procedure
;; when energy dips below zero, die
if energy < 0 [ die ]
end
to grow-grass ;; patch procedure
;; countdown on brown patches: if reach 0, grow some grass
if alive = false or count turtles-here with [shape = "tree"] < 0 [
ifelse countdown <= 0
[ ;set pcolor green
set alive true
create-tree-ongoing
set countdown Temps_De_Guérison ]
[ set countdown countdown - 1 ]
]
end
;to create-tree
; ask patches with [pcolor = 44] [
; sprout-trees 1 [
; set shape "tree"
; set color green
; ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
; ]
; ]
;
;
;end
;to create-tree-ongoing
;
; sprout-trees 1 [
; set shape "tree"
; set color green
; ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
; ]
;
;end
to create-tree-ongoing
;;create-trees
if pcolor = green [
sprout-trees 1 [
set shape "tree"
set size 2
set color 52
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
;;create-trees
if pcolor = orange [
sprout-trees 1 [
set shape "flower"
set size 2
set color 24
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
if pcolor = red [
sprout-trees 1 [
set shape "tree"
set size 2
set color 14
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
if pcolor = brown [
sprout-trees 1 [
set shape "plant"
set size 2
set color 52
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
if pcolor = yellow [
sprout-trees 1 [
set shape "flower"
set size 2
set color 43
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
if pcolor = pink [
sprout-trees 1 [
set shape "tree"
set size 2
set color 123
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
if pcolor = black [
sprout-trees 1 [
set shape "plant"
set size 2
set color gray
ifelse Consommation_des_plantes? [set size 1.5] [set size 1]
]
]
end
to progress2
let mmax 270000
file-close
file-open "log_behaviorspace.txt"
let tt 1
while [file-at-end? = false] [set tt read-from-string file-read-line]
;set tt file-read-line
print tt
print precision ((tt / mmax) * 100) 4
set tt tt + 1
file-close
file-open "log_behaviorspace.txt"
file-print tt
file-close
end
to progress
let mmax 270000
file-close
file-open "log_behaviorspace.txt"
let tt 1
set tt read-from-string file-read-line
print tt
print precision ((tt / mmax) * 100) 4
set tt tt + 1
file-close
file-delete "log_behaviorspace.txt"
file-open "log_behaviorspace.txt"
file-write tt
file-close
end
to calculate-means-over-time
;trees----------------------------------------------
set list_count_trees lput count trees with [shape = "tree"] list_count_trees
if (length list_count_trees > smooth ) [
let depassement (length list_count_trees - smooth)
repeat depassement [ set list_count_trees remove-item 0 list_count_trees]
]
if (length list_count_trees != 0) [ set mean_count_trees mean list_count_trees ]
;trees----------------------------------------------
set list_count_coccinelles lput count coccinelles list_count_coccinelles
if (length list_count_coccinelles > smooth ) [
let depassement (length list_count_coccinelles - smooth)
repeat depassement [ set list_count_coccinelles remove-item 0 list_count_coccinelles]
]
if (length list_count_coccinelles != 0) [ set mean_count_coccinelles mean list_count_coccinelles ]
;trees----------------------------------------------
set list_count_pucerons lput count pucerons list_count_pucerons
if (length list_count_pucerons > smooth ) [
let depassement (length list_count_pucerons - smooth)
repeat depassement [ set list_count_pucerons remove-item 0 list_count_pucerons]
]
if (length list_count_pucerons != 0) [ set mean_count_pucerons mean list_count_pucerons ]
end
to pesticides
set pesticides_duree pesticides_duree + 1
if pesticides? = true [
ask pucerons [set energy energy - round (energy * intensité)]
ask coccinelles [set energy energy - round (energy * intensité)]
]
if pesticides_duree >= remanence [set pesticides? false]
end
@#$#@#$#@
GRAPHICS-WINDOW
881
30
2012
1162
-1
-1
13.212
1
14
1
1
1
0
1
1
1
-42
42
-42
42
0
0
1
ticks
30.0
SLIDER
2524
476
2719
509
initial-number-pucerons
initial-number-pucerons
0
250
100.0
1
1
NIL
HORIZONTAL
SLIDER
2522
352
2717
385
pucerons-gain-from-food
pucerons-gain-from-food
0.0
50.0
4.0
1.0
1
NIL
HORIZONTAL
SLIDER
2522
387
2717
420
pucerons-reproduce
pucerons-reproduce
10
20
15.0
1
1
NIL
HORIZONTAL
SLIDER
2726
476
2932
509
initial-number-coccinelles
initial-number-coccinelles
0
250
50.0
50
1
NIL
HORIZONTAL
SLIDER
2728
353
2934
386
coccinelles-gain-from-food
coccinelles-gain-from-food
10
100
20.0
10
1
NIL
HORIZONTAL
SLIDER
2728
389
2934
422
coccinelles-reproduce
coccinelles-reproduce
10
20
15.0
1
1
NIL
HORIZONTAL
SWITCH
2522
249
2758
282
Consommation_des_plantes?
Consommation_des_plantes?
0
1
-1000
SLIDER
2763
250
2975
283
Temps_De_Guérison
Temps_De_Guérison
0
100
10.0
1
1
NIL
HORIZONTAL
BUTTON
78
48
328
81
--> SIMULER ! -->
go
T
1
T
OBSERVER
NIL
NIL
NIL
NIL
0
PLOT
2543
1114
3107
1539
populations
time
pop.
0.0
100.0
0.0
100.0
true
true
"" ""
PENS
"Pucerons" 1.0 0 -13345367 true "" "plot count pucerons"
"Coccinelles" 1.0 0 -2674135 true "" "plot count coccinelles"
"Arbres (/ 4)" 1.0 0 -10899396 true "" "if Consommation_des_plantes? [ plot grass / 4 ]"
MONITOR
2535
651
2609
696
pucerons
count pucerons
3
1
11
MONITOR
2535
696
2609
741
coccinelles
count coccinelles
3
1
11
MONITOR
2535
742
2609
787
Plantes
grass
0
1
11
TEXTBOX
2524
447
2745
477
Propriétés des puçerons\n----------------------------------
14
0.0
1
TEXTBOX
2726
446
2963
480
Propriétés des coccinelles\n-----------------------------
14
0.0
1
TEXTBOX
2522
212
2737
243
Propriétés des plantes\n-------------------------------
14
0.0
1
BUTTON
76
155
281
188
Ajouter des coccinelles
create-coccinelles 50 ;; create the wolves, then initialize their variables\n [\n set color red\n set size 2 ;; easier to see\n set energy random (2 * coccinelles-gain-from-food)\n setxy random-xcor random-ycor\n ]
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
SWITCH
2541
1069
2727
1102
Limite_De_Temps?
Limite_De_Temps?
1
1
-1000
BUTTON
2512
19
2763
52