Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maximum-coverage-location package #215

Closed
jGaboardi opened this issue Feb 10, 2022 · 15 comments
Closed

maximum-coverage-location package #215

jGaboardi opened this issue Feb 10, 2022 · 15 comments
Labels

Comments

@jGaboardi
Copy link
Member

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).

@martinfleis
Copy link
Member

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.

@jGaboardi
Copy link
Member Author

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

@gegen07
Copy link
Member

gegen07 commented Feb 10, 2022

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

@TimMcCauley
Copy link
Contributor

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.

@qszhao
Copy link

qszhao commented Mar 1, 2022

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
Copy link

qszhao commented Mar 1, 2022

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

@TimMcCauley
Copy link
Contributor

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.

@jGaboardi
Copy link
Member Author

@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?

@martinfleis
Copy link
Member

@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.

@jGaboardi
Copy link
Member Author

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.

@TimMcCauley
Copy link
Contributor

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.

@qszhao
Copy link

qszhao commented Mar 6, 2022

Very nice to have your contribution @TimMcCauley!

@jGaboardi
Copy link
Member Author

xref #221

@jGaboardi
Copy link
Member Author

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 jGaboardi added the docs label Oct 22, 2022
@jGaboardi
Copy link
Member Author

Resolve in #288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants