[GRASS-SVN] r49023 - grass-addons/grass7/raster/r.agent/libagent

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 31 12:03:33 EDT 2011


Author: mic
Date: 2011-10-31 09:03:33 -0700 (Mon, 31 Oct 2011)
New Revision: 49023

Modified:
   grass-addons/grass7/raster/r.agent/libagent/aco.py
Log:
add commented quick test

Modified: grass-addons/grass7/raster/r.agent/libagent/aco.py
===================================================================
--- grass-addons/grass7/raster/r.agent/libagent/aco.py	2011-10-31 16:01:56 UTC (rev 49022)
+++ grass-addons/grass7/raster/r.agent/libagent/aco.py	2011-10-31 16:03:33 UTC (rev 49023)
@@ -44,6 +44,7 @@
         self.outfilename = ""
         self.maxpheromone = 2147483647
         self.minpheromone = 10
+#        self.maxpenalty = 999
         self.volatilizationtime = 1
         self.stepintensity = 10
         self.pathintensity = 10000
@@ -96,6 +97,8 @@
     def addneighbour(self, positions, position):
         position[2] = self.costsurface[position[0]][position[1]]
 # TODO > or >=
+#        if position[2] > self.maxpenalty:
+#            return
         if position[2] >= 0:
             position[3] = self.pherovapour[position[0]][position[1]]
             positions.append(position)



More information about the grass-commit mailing list