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

Check feasibility following solution attempt #239

Merged
merged 5 commits into from
Jun 2, 2022

Conversation

jGaboardi
Copy link
Member

This PR addresses #238 by adding a check_status() method within LocateSolver the is collected directly after a solution attempt in each model's respective solve() methods. It raises a RuntimeError if the status is anything but optimal. Tests for infeasibility are also updated.

xref #238, #237

cc @qszhao

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #239 (f11a334) into main (18366f7) will increase coverage by 0.3%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #239     +/-   ##
=======================================
+ Coverage   65.9%   66.3%   +0.3%     
=======================================
  Files         23      23             
  Lines       2554    2564     +10     
  Branches     559     560      +1     
=======================================
+ Hits        1684    1699     +15     
+ Misses       788     779      -9     
- Partials      82      86      +4     
Impacted Files Coverage Δ
spopt/locate/base.py 96.3% <100.0%> (+0.2%) ⬆️
spopt/locate/coverage.py 100.0% <100.0%> (ø)
spopt/locate/p_center.py 100.0% <100.0%> (ø)
spopt/locate/p_median.py 100.0% <100.0%> (ø)
spopt/_version.py 33.8% <0.0%> (+1.5%) ⬆️

@gegen07
Copy link
Member

gegen07 commented Jun 2, 2022

@jGaboardi Sorry for adding commits to your pull request. I just changed the parameter name max_coverage to service_radius and reran all locate notebooks.

gegen07
gegen07 approved these changes Jun 2, 2022
@jGaboardi
Copy link
Member Author

@jGaboardi Sorry for adding commits to your pull request. I just changed the parameter name max_coverage to service_radius and reran all locate notebooks.

No problem! All looks good!

@jGaboardi jGaboardi merged commit 360ea6c into pysal:main Jun 2, 2022
@jGaboardi jGaboardi deleted the check_fease branch June 2, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants