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

Insufficient selections for project #1

Closed
Kallie-Riff opened this issue Jul 11, 2019 · 7 comments
Closed

Insufficient selections for project #1

Kallie-Riff opened this issue Jul 11, 2019 · 7 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@Kallie-Riff
Copy link

When selections are made and there are not enough to satisfy the vacancies the script perpetually runs instead of giving the user information about what went wrong. Would like an option to randomly assign to another project of same language or to update the selections myself.

@EgMan
Copy link
Owner

EgMan commented Jul 11, 2019

Hey Kalllie!

I'm having a bit of trouble understanding. The script shouldn't care if there aren't enough people to satisfy the vacancies, it should make sure that each person is assigned not necessarily that all vacancies are filled. Are you referring to the scenario where there are more people than there are vacancies? I just tried this, but could not get it to hang.

Some example data to evoke this defect would be very helpful.

Thank you

@EgMan EgMan self-assigned this Jul 11, 2019
@Kallie-Riff
Copy link
Author

Sure I can clarify!
So the situation was there were 4 spots for a project and only two people had selected that project over all the selections. The script just ran w/o output and w/o crash.
I manually changed the selections of two trainees to get up to that vacancy of 4 and it went ahead and assigned.

@EgMan
Copy link
Owner

EgMan commented Jul 11, 2019

OooOoh I see what happened. Thank you for the clarification. I'll work on fixing that case here soon.

@EgMan EgMan added the bug Something isn't working label Jul 11, 2019
@Kallie-Riff
Copy link
Author

You're awesome!

@EgMan EgMan closed this as completed in a76127e Jul 12, 2019
@EgMan
Copy link
Owner

EgMan commented Jul 12, 2019

So, looking into this more, it seems like the underlying problem is an infinite loop within the implementation of Munkres that I'm consuming. It looks like someone else also found this bug and posted this issue.

I've committed a temporary change a76127e which avoids the usage of their DISALLOWED functionality until they can fix the issue.

The case you described should now work. A related change is that there is now a concept of "forced assignment," which occurs in the rare case when it is impossible to assign someone to any of their choices. It will indicate "forced assignment" as the pick number in the console output if this occurs.

@Kallie-Riff
Copy link
Author

So here is my output.
image
Does it attempt to give those people the forced assignment language as their first language preference?

@EgMan
Copy link
Owner

EgMan commented Jul 12, 2019

Right now, no. There is currently no concept of a person's "language preference" only their "project preferences." This could be a future enhancement, and if you want this, please log it separately.

For now, though, I'd advise you to just avoid forced assignments by telling associates they can list as many picks as they want (not just 3 or 5 or whatever you currently do). The script accepts arbitrary amounts of picks.
Forced assignments only occur when it is absolutely impossible to fit them on all of the projects they want. The simplest example i can think of is:
Project A has 1 spot
Project B has 1 spot
Person A only wants Project A
Person B only wants Project A
Since Project A only has one spot, not both of them can fit, so one of these people have to be forced onto a project which they didn't list. The only real way around this is to ask each of them to do a full listing of projects (list them all from most desirable to least). Or at least ask them to list as many as possible. Not only will this allow the algorithm to place more people as their top picks, but it will make forced assignment unlikely (or impossible if they do a full listing).

P.S. I just added a console warning for when a forced assignment occurs.

@EgMan EgMan added the enhancement New feature or request label Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants