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

Is it possible to determine slots (in College Admissions Problem) as a vector? #30

Closed
p2004r opened this issue Nov 28, 2015 · 5 comments
Closed
Labels

Comments

@p2004r
Copy link

@p2004r p2004r commented Nov 28, 2015

Currently, "slots" is the number of slots that each college has available. But is possible each college may a different number of slots.

Is it possible to change this input parameter of the algorithm?

@jtilly
Copy link
Owner

@jtilly jtilly commented Nov 28, 2015

That's not possible in the current version of the package. However, it's an easy fix. We would need to change what's happening in lines 293-294 and 339-340 in R/galeShapley.R. There, we're expanding the preference matrices of students and colleges to account for the number of slots. I'll take a look at it. Seems like something we can easily implement.

@p2004r
Copy link
Author

@p2004r p2004r commented Nov 28, 2015

Thank you very much for your attention!

I think to corresponding change a "matrix" to a "list" in this place? https://github.com/jtilly/matchingR/blob/master/R/galeshapley.R#L315

PS Or (without changing the type), only replace the missing value in the res$matched.colleges (at the college with smaller "slots") on Na?

@jtilly
Copy link
Owner

@jtilly jtilly commented Nov 28, 2015

Yes, we need to change the output type. I'm thinking a list is the way to go, because I'd like to reserve 'NA' for colleges with slots that remain unmatched.

jtilly added a commit that referenced this issue Nov 28, 2015
…nd documented. Also needs some checking that slots has the correct size.
@jtilly jtilly added the feature label Nov 28, 2015
@jtilly
Copy link
Owner

@jtilly jtilly commented Nov 28, 2015

I think I have a basic version of this working. The code is on a separate branch. Still needs further testing.

@jtilly
Copy link
Owner

@jtilly jtilly commented Nov 29, 2015

Done and merged into master.

@jtilly jtilly closed this Nov 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.