Data processing and analytics code for project "SP2: Comparing spatial prioritization methods for biodiversity conservation and ecosystem service supply in Europe"
MIT License
1
stars
2
forks
source link
Dealing with NoData when optimizing with Gurobi #4
Currently Gurobi (R-interface) will give the following error if layers in the rasterstack provided contain NAs:
Error in grb_solve(filename, rows, cols, obj, modelsense, modelname, objcon, : Error 10003: Element 0 of a double array is Nan.
The current R implementation of the priocomp optimization for 771 input rasters (4526 rows, 4410 cols) replaces all NAs with zeros, but this takes a lot of time for the full feature stack.
Currently Gurobi (R-interface) will give the following error if layers in the rasterstack provided contain
NA
s:The current R implementation of the priocomp optimization for 771 input rasters (4526 rows, 4410 cols) replaces all
NA
s with zeros, but this takes a lot of time for the full feature stack.Must
NA
s always to be converted to zeros?