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

Reduce n_pairs in brsmatch() when too many are specified #18

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

skent259
Copy link
Owner

Fixes #11

This solution will iteratively try the optimization problem with the user-specified n_pairs, and check whether the solution is valid. If no solution, n_pairs is reduced by one and the problem is attempted again. Repeat until convergence.

The solution is untested with the Gurobi solver, since my license has lapsed, but the documentation at https://www.gurobi.com/documentation/current/refman/r_grb.html indicates when the solution is found. Tests are added for this case regardless.

We assume that Gurobi and GLPK can quickly determine if a problem is infeasible. If not, this solution could add a lot of run-time, but this is still better than leaving the user with no solution and no warning.

In an ideal world, the warning would specify which exact match cohort we are working in, but will leave that for future update.

@skent259 skent259 merged commit f17c71e into master Feb 19, 2024
5 checks passed
@skent259 skent259 deleted the fix-npairs branch February 19, 2024 16:23
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.

brsmatch() fails silently when there are too many pairs
1 participant