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

unexpected keyword argument 'facility_capacities' in the p-median notebook #400

Closed
qszhao opened this issue Oct 14, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working locate notebooks/binders

Comments

@qszhao
Copy link

qszhao commented Oct 14, 2023

Hi all,

I ran through the P-median notebook. The first part works fine but the capacitated part gives me errors as below:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[35], line 1
----> 1 pmedian_capacity_from_cm = PMedian.from_cost_matrix(
      2     cost_matrix,
      3     ai,
      4     p_facilities = 8,
      5     facility_capacities=cj,
      6     name="capacitated-p-median-network-distance"
      7 )

TypeError: PMedian.from_cost_matrix() got an unexpected keyword argument 'facility_capacities'

I use a new conda environment with python=3.11, spopt=0.5.0, pulp=2.7.0 and the installations are via

conda create --name spatialopt python=3.11
conda install -c conda-forge spopt
conda install -c conda-forge pulp

Best,
Qunshan

@jGaboardi jGaboardi self-assigned this Oct 14, 2023
@jGaboardi jGaboardi added bug Something isn't working notebooks/binders locate labels Oct 14, 2023
@jGaboardi
Copy link
Member

@qszhao I just realized you say you are installing spopt via conda-forge. While we have merged the new functionality into spopt@main (#397, #399), we have not yet cut a release. We want to resolve #386 before another release and it is being especially troublesome to figure out. In the meantime you can install by:

pip install git+https://github.com/pysal/spopt.git

@qszhao
Copy link
Author

qszhao commented Oct 14, 2023

Thanks @jGaboardi. This is very good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working locate notebooks/binders
Projects
None yet
Development

No branches or pull requests

2 participants