问题
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