[GRASS-SVN] r56337 - grass-addons/grass7/raster/r.agent
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 20 12:43:58 PDT 2013
Author: mic
Date: 2013-05-20 12:43:57 -0700 (Mon, 20 May 2013)
New Revision: 56337
Modified:
grass-addons/grass7/raster/r.agent/r.agent.aco
Log:
workaround for seemingly broken numpy adaption
Modified: grass-addons/grass7/raster/r.agent/r.agent.aco
===================================================================
--- grass-addons/grass7/raster/r.agent/r.agent.aco 2013-05-20 19:42:51 UTC (rev 56336)
+++ grass-addons/grass7/raster/r.agent/r.agent.aco 2013-05-20 19:43:57 UTC (rev 56337)
@@ -258,6 +258,9 @@
inphero = inphero + '@' + grass.gisenv()['MAPSET']
world.playground.setgrasslayer(anthill.Anthill.RESULT, inphero, True)
world.playground.grassmapnames[anthill.Anthill.RESULT] = outphero
+ #TODO hopefully not really needed - workaround for broken(?) garray
+ world.playground.createlayer("copy", outphero, True)
+ world.playground.grassmapnames["copy"] = outphero
world.overwritepheormone = wastephero
def letantsdance(rounds, outrounds):
@@ -277,8 +280,16 @@
# loop and write out the contents at the end
world.letantsdance(nextwrite)
# export the value maps
- world.playground.writelayer(anthill.Anthill.RESULT, False,
+ #TODO hopefully not really needed - workaround for broken(?) garray
+ for i in range(len(world.playground.layers[anthill.Anthill.RESULT])):
+ for j in range(len(
+ world.playground.layers[anthill.Anthill.RESULT][0])):
+ world.playground.layers["copy"][i][j] = \
+ world.playground.layers[anthill.Anthill.RESULT][i][j]
+ world.playground.writelayer("copy", False,
world.overwritepheormone)
+ #TODO world.playground.writelayer(anthill.Anthill.RESULT, False,
+ #TODO world.overwritepheormone)
# print "nrofpaths:", world.nrop
# count down outer
mainloops -= 1
More information about the grass-commit
mailing list