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

unlock buddy #13

Open
christophfroehlich opened this issue Dec 3, 2014 · 1 comment
Open

unlock buddy #13

christophfroehlich opened this issue Dec 3, 2014 · 1 comment

Comments

@christophfroehlich
Copy link
Owner

possibility that every buddy has to come to an office hour and get unlocked for the system

@Zanz21
Copy link

Zanz21 commented Jan 8, 2015

Can be done easily. In response for Locals we need an additional field buddyBefore or Unlock with Yes and No. This new field need to be added to the variable sheet e.g. variable called buddy. Then you can add at calcAffinities() at

for (var i = 0; i < locals.length; i++) {
// Logger.log(locals[i]);
// local buddy is willing to take more buddies
// local buddy won't be assigned to more than maxAssignents number of assignments
if (locals[i].assignments < maxAssignments && locals[i].capacity > 0 && locals[i].buddy=="Ja") {
as.push(i);
}
}

the following && locals[i].buddy=="Ja"
Now if there is no Ja at the field buddy the local wont be assigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants