Hi,
For the second problem, you are right, there is a bug concerning the loading of non square pgm file.
I just commited the fix. If your are using the GAMA SVN version, you just have to update GAMA and it should work.
if your are using a release version of GAMA 1.6, a trick consists in changing the extension of your pgm file to csv one, then to load the file in a matrix:
const types type: file <- file('../images/sugarscape1.csv');
matrix mat_types <- matrix(types);
...
init {
create animal number: numberOfAgents;
ask sugar_cell {
maxSugar <- int(mat_types at {grid_x,grid_y+3}); //+3 for the three first lines
sugar <- maxSugar;
color <- [white,FFFFAA,FFFF55,yellow,dark_yellow] at sugar;
}
}
Cheers,
Patrick