two new arguments to increase processing time are introduced in optimization branch
in.memory - boolean on whether to process raster image in memory or not
mod.error - specifies the model error until which iteration is being continued -> range [0:1] -> 0...100%