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

fix bug in greedy_heuristic_prioritization() feasibility calculations #54

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

jeffreyhanson
Copy link
Collaborator

Fix bug in greedy_heuristic_algorithm() function so that it returns a solution if it is not possible to select enough planning units to meet the target for any species. Instead of throwing an error, it will now throw a warning and return a solution containing the cheapest set of planning units within the budget and locked out constraints. Note that this solution will have an objective value of zero, because it has zero probability of meeting any of the species' targets.

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 55.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 92.24%. Comparing base (6fda197) to head (2661a1c).

Files Patch % Lines
R/greedy_heuristic_optimization.R 55.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
- Coverage   92.55%   92.24%   -0.32%     
==========================================
  Files          30       30              
  Lines        2592     2604      +12     
==========================================
+ Hits         2399     2402       +3     
- Misses        193      202       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jeffreyhanson jeffreyhanson merged commit f733008 into master Jul 24, 2024
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant