⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ---coelhos-ervas.nlogo

📁 NETLOGO
💻 NLOGO
字号:
globals [ geracao energia-total ]turtles-own [ energia ]breeds [ coelhos ]to preparar  clear-all  set geracao 0  set energia-total 0  crescer-ervas  set-default-shape coelhos "rabbit-shape"  create-custom-coelhos numero-inicial  [ set color white    setxy random-float screen-size-x random-float screen-size-y    set energia random 10    without-interruption    [ set energia-total energia-total + energia ] ]  preparar-grafico  fazer-graficoendto executar  crescer-ervas  movimento  fazer-grafico  set geracao geracao + 1  if not any? turtles  [ stop ]endto movimento  ask coelhos  [ passo    comer-erva    comer-daninhas    if reproducao?    [ reproduzir ]    morrer ]endto crescer-ervas  ask patches with [ pcolor = black ]  [ if random-float 1000 < crescimento-daninhas    [ set pcolor violet ]    if random-float 1000 < crescimento-erva    [ set pcolor green ] ]endto passo  rt random-float 50  lt random-float 50  forward 1  set energia energia - 0.5  set energia-total energia-total - 0.5endto comer-erva  if pcolor = green  [ stamp black    set energia energia + energia-erva    set energia-total energia-total + energia-erva ]endto comer-daninhas  if pcolor = violet  [ stamp black    set energia energia + energia-daninhas    set energia-total energia-total + energia-daninhas ]endto reproduzir  if energia > limite-reproducao  [ set energia energia / 2    hatch 1    [ forward 1 ] ]endto morrer  if energia <= 0  [ without-interruption    [ set energia-total energia-total - energia ]      die ]endto fazer-grafico  set-current-plot "Populacoes"  set-current-plot-pen "erva"  plot count patches with [ pcolor = green ] / 4  set-current-plot-pen "coelhos"  plot count turtles  set-current-plot-pen "daninhas"  plot count patches with [ pcolor = violet ] / 4endto preparar-grafico  set-current-plot "Populacoes"  set-plot-y-range 0 numero-inicialend; Vers鉶 ICES Copyright 2004, Centro de F韘ica Te髍ica e Computacional; *** NetLogo Model Copyright Notice ***;; This model was created as part of the project:; PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN; CLASSROOMS.  The project gratefully acknowledges the support of the; National Science Foundation (REPP program) -- grant number REC #9814682.;; Copyright 2001 by Uri Wilensky.  Updated 2001.  All rights reserved.;; Permission to use, modify or redistribute this model is hereby granted,; provided that both of the following requirements are followed:; a) this copyright notice is included.; b) this model will not be redistributed for profit without permission;    from Uri Wilensky.; Contact Uri Wilensky for appropriate licenses for redistribution for; profit.;; To refer to this model in academic publications, please use:; Wilensky, U. (2001).  NetLogo L-SystemFractals model.; http://ccl.northwestern.edu/netlogo/models/L-SystemFractals.; Center for Connected Learning and Computer-Based Modeling,; Northwestern University, Evanston, IL.;; In other publications, please use:; Copyright 1998 by Uri Wilensky.  All rights reserved.  See; http://ccl.northwestern.edu/netlogo/models/L-SystemFractals; for terms of use.;; *** End of NetLogo Model Copyright Notice ***@#$#@#$#@GRAPHICS-WINDOW31312757477151514.0110111CC-WINDOW3373274524Command CenterBUTTON3409573prepararprepararNIL1TOBSERVERTBUTTON984018773executarexecutarT1TOBSERVERTSLIDER2108150141crescimento-ervacrescimento-erva0.020.07.01.01NILSLIDER2141150174crescimento-daninhascrescimento-daninhas0.020.00.01.01NILSLIDER152108310141energia-ervaenergia-erva0.010.03.00.51NILSLIDER152141310174energia-daninhasenergia-daninhas0.010.00.00.51NILSLIDER275150108numero-inicialnumero-inicial0.0500.050.01.01NILSLIDER15275310108limite-reproducaolimite-reproducao0.020.017.01.01NILPLOT3176310372PopulacoesGeracaoPop0.0100.00.0111.0truetruePENS"erva" 1.0 0 -11352576 true"coelhos" 1.0 0 -65536 true"daninhas" 1.0 0 -8716033 trueMONITOR380487469536coelhoscount coelhos01SWITCH1904031173reproducao?reproducao?01-1000MONITOR284487374536NILgeracao01MONITOR476487552536ervacount patches with [ pcolor = green ]01MONITOR560487642536daninhascount patches with [ pcolor = violet ]01MONITOR648487758536NILenergia-total31@#$#@#$#@INTRODU敲O----------Este modelo explora um ecosistema simples composto por coelhos, erva, e daninhas. Os coelhos deslocam-se aleatoriamente, e as ervas e daninhas crescem aleatoriamente. Quando um coelho encontra alguma erva ou daninhas, come-a e ganha energia. Se o coelho ganhar energia suficiente, reproduz-se. Caso contr醨io, acaba por morrer.A erva e as daninhas podem ser ajustadas para crescerem a ritmos diferentes e para darem aos coelhos quantidades de energia diferentes. O modelo pode ser usado para investigar as vantagens competitivas destas vari醰eis.UTILIZA敲O----------Observe o mostrador COELHOS, que conta o n鷐ero de coelhos em exist阯cia, e o gr醘ico para ver como a popula玢o de coelhos evolui com o tempo.No in韈io, n鉶 existe erva suficiente para todos os coelhos, e muitos morrem. Mas isso permite que a erva cres鏰 livremente, fornecendo comida abundante para os coelhos que ficam. Esses coelhos ganham energia suficiente e reproduzem-se. O maior n鷐ero de coelhos leva de novo 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -