ricschuster/Marxan_vs_ILP_paper

Zonation

Opened this issue · 4 comments

Do we want to add Zonation as an additional solver? My impression is that it can do target based prioritization (i.e. min set cover problems), but isn't really designed for that, so it doesn't seem like a fair comparison to stack it up against Marxan and ILP. However, if we know a lot of folks are using it for solving Marxan-like problems, then perhaps it is valuable.

Also, the Zonation website doesn't appear to exist anymore, is it not being maintained anymore?

I think it would be good to add Zonation into the mix and add a caveat about Zonation not being designed for min set cover problems. The reason is, that its probably the widest used conservation prioritization tool other than Marxan out there.

Strange about the website. I went there about two months ago, and it was still there. The GitHub repo is still there though: https://github.com/cbig/zonation-core

Yeah, I agree that it would be good to include Zonation too. I had the impression that the developers thought that it was general enough such that it was appropriate to use for min set cover problems. Zonation outputs info about when the targets are violated in the ranking process (see below for example log file). Also, just in case this helps, the GitLab repo has the source for Zonation (https://gitlab.com/jeffreyhanson/prioritizr-manuscript/tree/master/code/zonation), the Makefile has commands for compiling it from source (line 135--158: https://gitlab.com/jeffreyhanson/prioritizr-manuscript/blob/master/Makefile), and there's some R code for running Zonation and extracting solution cost for minimum set problems (line 174--235; https://gitlab.com/jeffreyhanson/prioritizr-manuscript/blob/master/code/R/analysis/07-min-set-benchmark.R).

Zonation 4.0.0_compact, build: Nov  3 2017 13:04:18
==========================================================================
The Zonation software is distributed in the  hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
==========================================================================
 For more information and conditions of use of this software, see the
 disclaimer in Help->About Zonation, in the graphical user interface

Starting Zonation run on 'xps13' at 9:46:39 AM (2018/10/25) 
Locale is: en_US.UTF-8
Zonation core process parameters: 
   run mode: normal run (-r)
   settings file: data/intermediate/benchmark/min-set/zonation/2/project/target/target.dat
   biodiversity features list file: data/intermediate/benchmark/min-set/zonation/2/project/target/target.spp
   output file(s): data/intermediate/benchmark/min-set/zonation/2/project/target/target_out/01
   info-gap alpha: 0
   use_smoothing: 0
   smoothing_alpha_multiplier: 1
   autoclose (deprecated): 1

Reading settings file: data/intermediate/benchmark/min-set/zonation/2/project/target/target.dat
   Option overriden in command line, removal rule: 3
   Option overriden in command line, warp factor: 1

Output settings:
   Output weighted range size corrected richness map: yes
   Output proportional loss rank map: no

********** Arbitrary kernels not enabled ********

*************** NOT USING ANALYSIS AREA MASK **************

Loading list of biodiversity features from file: data/intermediate/benchmark/min-set/zonation/2/project/target/target.spp
Row count in the features/species list file: 10
data/intermediate/benchmark/min-set/zonation/2/data/spp_1.tif: 13 rows, 12 columns read. Nodata cells =  46, sum of elements = 53.2998

Matrix columns/x dimension: 12, rows/y dimension: 13

****** REMOVAL RULE: Targeting benefit function (TBF) *******

****** NOT using Info-gap distribution discounting uncertainty analysis ****************


*** Not using "drop 0 occurrence features", all features will be processed even if they do not occur anywhere in the analysis area.

****** NOT using distribution smoothing, interactions or matrix connectivity *******

======------ Allocating memory for input layers... ------======
Using compact structure (lookup version),  sizeof(Occur_Container): 18, sizeof(allocated occurrence): 6
Counting effective occurrencies
Time: 1540424799 = 9:46:39 AM (2018/10/25) 
Feature file #1: data/intermediate/benchmark/min-set/zonation/2/data/spp_1.tif; non-missing cells: 110
Feature file #2: data/intermediate/benchmark/min-set/zonation/2/data/spp_10.tif; non-missing cells: 110
Feature file #3: data/intermediate/benchmark/min-set/zonation/2/data/spp_2.tif; non-missing cells: 110
Feature file #4: data/intermediate/benchmark/min-set/zonation/2/data/spp_3.tif; non-missing cells: 110
Feature file #5: data/intermediate/benchmark/min-set/zonation/2/data/spp_4.tif; non-missing cells: 110
Feature file #6: data/intermediate/benchmark/min-set/zonation/2/data/spp_5.tif; non-missing cells: 110
Feature file #7: data/intermediate/benchmark/min-set/zonation/2/data/spp_6.tif; non-missing cells: 110
Feature file #8: data/intermediate/benchmark/min-set/zonation/2/data/spp_7.tif; non-missing cells: 110
Feature file #9: data/intermediate/benchmark/min-set/zonation/2/data/spp_8.tif; non-missing cells: 110
Feature file #10: data/intermediate/benchmark/min-set/zonation/2/data/spp_9.tif; non-missing cells: 110
Total # of feature layers: 10
Total # of cells in every layer: 156
Effective # of cells (cells with any occurrence, globally): 110
Total # of occurrencies: 1100, counted across 10 layers; average across layers: 110
Percentage of globally effective occurrencies = 100 % (relative to total effective cells) = 70.5128 % (relative to total cells)
Memory required for biodiversity features: 0.009373 MB, of which base memory: 0.003078 MB, and occurrencies require: 0.006294 MB
Time now: 1540424799 = 9:46:39 AM (2018/10/25) 
Finished preload/counting effective occurrencies. Elapsed: 0 seconds.
======------ Allocating memory for input layers: finished successfully ------======

******=====----- Loading feature (e.g., species) data layers -----=====**********
* Loaded biodiversity feature file #1, data/intermediate/benchmark/min-set/zonation/2/data/spp_1.tif, non-missing cells:110, their sum: 53.2998
* Loaded biodiversity feature file #2, data/intermediate/benchmark/min-set/zonation/2/data/spp_10.tif, non-missing cells:110, their sum: 56.4788
* Loaded biodiversity feature file #3, data/intermediate/benchmark/min-set/zonation/2/data/spp_2.tif, non-missing cells:110, their sum: 16.6427
* Loaded biodiversity feature file #4, data/intermediate/benchmark/min-set/zonation/2/data/spp_3.tif, non-missing cells:110, their sum: 43.6618
* Loaded biodiversity feature file #5, data/intermediate/benchmark/min-set/zonation/2/data/spp_4.tif, non-missing cells:110, their sum: 62.4749
* Loaded biodiversity feature file #6, data/intermediate/benchmark/min-set/zonation/2/data/spp_5.tif, non-missing cells:110, their sum: 45.7385
* Loaded biodiversity feature file #7, data/intermediate/benchmark/min-set/zonation/2/data/spp_6.tif, non-missing cells:110, their sum: 87.247
* Loaded biodiversity feature file #8, data/intermediate/benchmark/min-set/zonation/2/data/spp_7.tif, non-missing cells:110, their sum: 26.6085
* Loaded biodiversity feature file #9, data/intermediate/benchmark/min-set/zonation/2/data/spp_8.tif, non-missing cells:110, their sum: 77.6033
* Loaded biodiversity feature file #10, data/intermediate/benchmark/min-set/zonation/2/data/spp_9.tif, non-missing cells:110, their sum: 65.1671
Calculating centers of the distributions of 10 features...

******=====----- Finished loading and transformation of feature data layers -----=====*********

Calculating richness across biodiversity features...
Done in 0 seconds. Time now: 9:46:39 AM (2018/10/25) 
Saving raster map of weighted range size corrected richness
Saving raster: data/intermediate/benchmark/min-set/zonation/2/project/target/target_out/01.wrscr.compressed.tif (GTiff format)

******=====----- Preparing to start the ranking process... -----=====**********
NOT using removal only from edges.

Loaded data and initialized in 0 seconds. Current time: 9:46:39 AM (2018/10/25) 
Cells with data = 110; locations with missing values = 46

---------------------======********** RANKING STARTS HERE ***********======-----------------------
Initially removed cells count = 0
Note: No initial removal was used.

Biodiversity features performance levels check. Proportions remaining:
---------
Feature 1:    1
Feature 2:    1
Feature 3:    1
Feature 4:    1
Feature 5:    1
Feature 6:    1
Feature 7:    1
Feature 8:    1
Feature 9:    1
Feature 10:    1
---------
Minimum proportion remaining:    1, average:    1, weighted average:    1, maximum:    1


The following lines provide information on how the ranking is done by iterative removal of cells, with 6 columns per line:
Cells removed, proportion of landscape remaining, cost of remaining landscape, edge list length, smallest remaining proportion in all biodiversity features (e.g. species), time elapsed (s)
----------------------------------------------------------------------------------------------------------------------------
             0            100%%              0            110              1            0
             4        96.3964%%            107            107       0.978644            0
             8        92.7928%%            103            103       0.936751            0
            12        89.1892%%             99             99       0.893721            0
            16        85.5856%%             95             95       0.847337            0
            20         81.982%%             91             91       0.801406            0
            24        78.3784%%             87             87        0.75884            0
            28        74.7748%%             83             83       0.713944            0
            32        71.1712%%             79             79       0.668365            0
            36        67.5676%%             75             75       0.621234            0
            40         63.964%%             71             71       0.575738            0
            44        60.3604%%             67             67       0.532156            0
            48        56.7568%%             63             63       0.493659            0
            52        53.1532%%             59             59       0.450706            0
            56        49.5495%%             55             55       0.410521            0
            60        45.9459%%             51             51       0.376702            0
            64        42.3423%%             47             47        0.33581            0
            68        38.7387%%             43             43       0.299893            0
            72        35.1351%%             39             39       0.263928            0
            76        31.5315%%             35             35       0.239197            0
            80        27.9279%%             31             31       0.204366            0
            84        24.3243%%             27             27       0.174106            0
            88        20.7207%%             23             23       0.150132            0
            92        17.1171%%             19             19        0.12709            0
            96        13.5135%%             15             15       0.111195            0
           100        9.90991%%             11             11      0.0812123            0
           104        6.30631%%              7              7      0.0484025            0
           108         2.7027%%              3              3       0.024484            0
           110              0%%              0              0              0            0
----------------------------------------------------------------------------------------------------------------------------
Total count of cells removed = 110

Done in 0 seconds.
Found 4 ties.

Biodiversity features performance levels check. Proportions remaining:
---------
Feature 1:    0
Feature 2:    0
Feature 3:    0
Feature 4:    0
Feature 5:    0
Feature 6:    0
Feature 7:    0
Feature 8:    0
Feature 9:    0
Feature 10:    0
---------
Minimum proportion remaining:    0, average:    0, weighted average:    0, maximum:    0

============================================================
* Writing final output files...
Writing file of feature information: data/intermediate/benchmark/min-set/zonation/2/project/target/target_out/01.features_info.txt
Writing file of performance (representation, coverage, etc.) curves: data/intermediate/benchmark/min-set/zonation/2/project/target/target_out/01.curves.txt
First biodiversity feature target violated at fraction of landscape remaining = 0.118182
Writing output ranking as an image...
Saving image: data/intermediate/benchmark/min-set/zonation/2/project/target/target_out/01.png (PNG format)
Writing ranking as a GIS raster map...
Saving raster: data/intermediate/benchmark/min-set/zonation/2/project/target/target_out/01.rank.compressed.tif (GTiff format)
 Note: not writing 'proportional loss map'
No automated post-processing file specified
============================================================
Finished spatial prioritization process. Freeing data structures in memory...
Finished at 9:46:39 AM (2018/10/25) 
Elapsed time: 33 ms == 9.17e-06 hours == 3.82e-07 days

Thanks for the resources, Jeff! I'll work on adding Zonation to the comparison.

Been away the past couple weeks and just getting back to this... Spent much of yesterday trying to compile Zonation on Mac OS X and am stuck in dependency hell. Works if it put it in a Linux Docker container, but my Gurobi license seems to be machine specific and isn't working in the container. Going to put Zonation to the side for the moment.