proucedure of pheromone end its variation 2

穿精又带淫゛_ 提交于 2019-12-11 18:41:17

问题


this is our procedure but we have a problem , the pheromone never be 0 and we need it to be 0 what should 'i do ?

LayPheromone

     if (pheromone < maxPheroPerSite-Forage)

        [set pheromone (pheromone + amtPheroLay-Forage)]

    end    
   to UpdatePatches
  ask patch nestX nestY [ set pcolor pink ]
 ask patches

[

if (pheromone < 0) [set pheromone 0]

if (pheromone > 0)

    [

    set pheromone (pheromone - pheromone * evaporation-rate)

    ifelse showPhero?
      [ set pcolor scale-color yellow pheromone 0 (maxPheroPerSite-Forage)]

      [ set pcolor black ]
    ]
] `

来源:https://stackoverflow.com/questions/23257442/proucedure-of-pheromone-end-its-variation-2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!