spopt icon indicating copy to clipboard operation
spopt copied to clipboard

maximum-coverage-location package

Open jGaboardi opened this issue 3 years ago • 13 comments

I just came across this repo for solving the MCLP. We may (or may not) want to add it to README as a related project (if we include a Related Projects section as some point).

jGaboardi avatar Feb 10 '22 01:02 jGaboardi

Requirements

Python 2.7 Scipy, Numpy (available as part of Anaconda) Shapely Gurobi, commercial software (free for academic usage)

That doesn't sound very friendly and open.

martinfleis avatar Feb 10 '22 09:02 martinfleis

Very true, but it is a related project. My only motivation here was make a record of it; not suggest that we use it.

jGaboardi avatar Feb 10 '22 13:02 jGaboardi

Agreed with Martin. But I think we can point it as a related project.

gegen07 avatar Feb 10 '22 14:02 gegen07

Greetings @jGaboardi @martinfleis @gegen07 - I thought I would hijack this thread. We didn't know about spopt until a a few days ago. We built a separate open source library to solve location allocation problems which you can find here. With pysal-spopt however around, we don't think it is the best idea to maintain it (I just made it public for you to be able to view it). We built logic for few different problems which we derived from ESRI's location allocation suite. The first one being basically the same as you found above, however rewritten to be able to use python-mip (which they actually all do). The "Maximize Capacitated Coverage" problem may be interesting for spopt as it considers the capacity of a facility. "Maximize Coverage and Minimize Cost" is probably very similar to P-Median and "Maximize Coverage and Minimize Facilities" similar to LCSP. They are however less intuitive to use as there are not very transparent weights which have to be passed in. I'd love to hear your thoughts on this.

  • Maximize Coverage: This problem is used to site facilities from candidate facilites covering the largest amount of demand points within a cost cutoff value.
  • Maximize Capacitated Coverage: This problem is used to site facilities from candidate capacity bound facilites covering the largest amount of demand points within a cost cutoff value.
  • Maximize Coverage and Minimize Cost: This problem is used to site facilities from candidate facilites covering the largest amount of demand points and minimizing the overall cost within a cost cutoff value.
  • Maximize Coverage and Minimize Facilities: This problem is used to site facilities from candidate facilites covering the largest amount of demand points within a cost cutoff value. The difference to maximize coverage is that the number of facilities to be sited does not have to be specified.

TimMcCauley avatar Feb 24 '22 13:02 TimMcCauley

Very true, but it is a related project. My only motivation here was make a record of it; not suggest that we use it.

Agree here with James and Germano. Good to have a record of related projects. The content itself is quite simple as well.

qszhao avatar Mar 01 '22 12:03 qszhao

Greetings @jGaboardi @martinfleis @gegen07 - I thought I would hijack this thread. We didn't know about spopt until a a few days ago. We built a separate open source library to solve location allocation problems which you can find here. With pysal-spopt however around, we don't think it is the best idea to maintain it (I just made it public for you to be able to view it). We built logic for few different problems which we derived from ESRI's location allocation suite. The first one being basically the same as you found above, however rewritten to be able to use python-mip (which they actually all do). The "Maximize Capacitated Coverage" problem may be interesting for spopt as it considers the capacity of a facility. "Maximize Coverage and Minimize Cost" is probably very similar to P-Median and "Maximize Coverage and Minimize Facilities" similar to LCSP. They are however less intuitive to use as there are not very transparent weights which have to be passed in. I'd love to hear your thoughts on this.

  • Maximize Coverage: This problem is used to site facilities from candidate facilites covering the largest amount of demand points within a cost cutoff value.
  • Maximize Capacitated Coverage: This problem is used to site facilities from candidate capacity bound facilites covering the largest amount of demand points within a cost cutoff value.
  • Maximize Coverage and Minimize Cost: This problem is used to site facilities from candidate facilites covering the largest amount of demand points and minimizing the overall cost within a cost cutoff value.
  • Maximize Coverage and Minimize Facilities: This problem is used to site facilities from candidate facilites covering the largest amount of demand points within a cost cutoff value. The difference to maximize coverage is that the number of facilities to be sited does not have to be specified.

Hi Tim,

Thanks for hijack us! I would say thanks for sharing your repo and we are certainly keen to further improve our package. The next step of the development will certainly focus on adding the capacity measures in the model and also increasing the availability of other location modelling methods, such as the dispersion models.

Best, Qunshan

qszhao avatar Mar 01 '22 13:03 qszhao

Thanks @qszhao - appreciated. Would you generally be interested in some additional jupyter notebooks making it easier for GIS users to understand who are not savvy with matplotlib? Here is one example I wrote the other day - https://nbviewer.org/github/gis-ops/tutorials/blob/master/location-allocation/mclp/fossgiss22-marburg-spopt-demo.ipynb I would be happy to contribute some of these to this repository.

TimMcCauley avatar Mar 05 '22 14:03 TimMcCauley

@TimMcCauley, very cool example notebook!

@gegen07 @qszhao @ljwolf @martinfleis @xf37, maybe we should think about adding something like an External Examples section to the docs?

jGaboardi avatar Mar 06 '22 17:03 jGaboardi

@TimMcCauley Would you be willing to give that notebook a bit of comments, translate variables into English and contribute it to spopt/notebooks?

@jGaboardi I guess we could have a section on external resources but if it is a single notebook, I'd be more keen to have it as a contribution to our docs.

martinfleis avatar Mar 06 '22 19:03 martinfleis

I think either option would be nice, so I suppose it may come down to whether @TimMcCauley wants to contribute the example to become part of spopt or simply provide a link to where the notebook/gist is located. In a similar vein, the facility location tutorial in spaghetti was (is) featured as an external example in the docs for python-mip prior to our creation of spopt.

jGaboardi avatar Mar 06 '22 20:03 jGaboardi

Thanks - I am happy to contribute. I will update the notebook with comments and also add 3 more for the remaining models LSCP, P-Median and P-Center over the next few weeks.

TimMcCauley avatar Mar 06 '22 20:03 TimMcCauley

Very nice to have your contribution @TimMcCauley!

qszhao avatar Mar 06 '22 22:03 qszhao

xref #221

jGaboardi avatar Mar 11 '22 01:03 jGaboardi

I think we start either a bullet list or table in the README as was to address this for now. I'll get to that soon.

jGaboardi avatar Oct 22 '22 01:10 jGaboardi

Resolve in #288

jGaboardi avatar Oct 26 '22 19:10 jGaboardi