{"action":"created","issue":{"url":"https://api.github.com/repos/czlee/tabbycat/issues/318","repository_url":"https://api.github.com/repos/czlee/tabbycat","labels_url":"https://api.github.com/repos/czlee/tabbycat/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/czlee/tabbycat/issues/318/comments","events_url":"https://api.github.com/repos/czlee/tabbycat/issues/318/events","html_url":"https://github.com/czlee/tabbycat/issues/318","id":154953510,"number":318,"title":"Improve flexibility with constraining how venues are allocated","user":{"login":"czlee","id":1725499,"avatar_url":"https://avatars.githubusercontent.com/u/1725499?v=3","gravatar_id":"","url":"https://api.github.com/users/czlee","html_url":"https://github.com/czlee","followers_url":"https://api.github.com/users/czlee/followers","following_url":"https://api.github.com/users/czlee/following{/other_user}","gists_url":"https://api.github.com/users/czlee/gists{/gist_id}","starred_url":"https://api.github.com/users/czlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czlee/subscriptions","organizations_url":"https://api.github.com/users/czlee/orgs","repos_url":"https://api.github.com/users/czlee/repos","events_url":"https://api.github.com/users/czlee/events{/privacy}","received_events_url":"https://api.github.com/users/czlee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/czlee/tabbycat/labels/feature","name":"feature","color":"fbca04"},{"url":"https://api.github.com/repos/czlee/tabbycat/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"czlee","id":1725499,"avatar_url":"https://avatars.githubusercontent.com/u/1725499?v=3","gravatar_id":"","url":"https://api.github.com/users/czlee","html_url":"https://github.com/czlee","followers_url":"https://api.github.com/users/czlee/followers","following_url":"https://api.github.com/users/czlee/following{/other_user}","gists_url":"https://api.github.com/users/czlee/gists{/gist_id}","starred_url":"https://api.github.com/users/czlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czlee/subscriptions","organizations_url":"https://api.github.com/users/czlee/orgs","repos_url":"https://api.github.com/users/czlee/repos","events_url":"https://api.github.com/users/czlee/events{/privacy}","received_events_url":"https://api.github.com/users/czlee/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/czlee/tabbycat/milestones/15","html_url":"https://github.com/czlee/tabbycat/milestones/Chartreux","labels_url":"https://api.github.com/repos/czlee/tabbycat/milestones/15/labels","id":1510018,"number":15,"title":"Chartreux","description":"","creator":{"login":"philipbelesky","id":495961,"avatar_url":"https://avatars.githubusercontent.com/u/495961?v=3","gravatar_id":"","url":"https://api.github.com/users/philipbelesky","html_url":"https://github.com/philipbelesky","followers_url":"https://api.github.com/users/philipbelesky/followers","following_url":"https://api.github.com/users/philipbelesky/following{/other_user}","gists_url":"https://api.github.com/users/philipbelesky/gists{/gist_id}","starred_url":"https://api.github.com/users/philipbelesky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipbelesky/subscriptions","organizations_url":"https://api.github.com/users/philipbelesky/orgs","repos_url":"https://api.github.com/users/philipbelesky/repos","events_url":"https://api.github.com/users/philipbelesky/events{/privacy}","received_events_url":"https://api.github.com/users/philipbelesky/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":15,"state":"open","created_at":"2016-01-16T04:02:22Z","updated_at":"2016-05-21T19:36:49Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-05-16T03:19:52Z","updated_at":"2016-05-22T07:57:26Z","closed_at":null,"body":"After #289 I've learnt that venue allocation can actually be quite complicated if done properly. Currently, it covers the ability to keep divisions in their assigned venue groups. Here are some other use cases:\r\n\r\n* Constraining certain teams and/or adjudicators to rooms for accessibility reasons\r\n* Having a preference for adjudication core and tab team members to be near the tab room\r\n\r\nNote that the above includes _adjudicators_, which isn't currently possible in the current system, because venues are allocated before adjudicators are. Here's how I suggest that venue allocation should (eventually) work:\r\n\r\n* Venue allocation should take place _after_ adjudicator allocations, _i.e._ it should be the last thing to happen before the draw is set in concrete.\r\n* At the click of a button (or automatically), venues should just be allocated and, if input data is correct, there should ideally be no need to edit venues.\r\n* Database models should include the following, all `ManyToManyField`s in the Venues app:\r\n   * Team venue constraints, linking venue groups to teams, with priority (used for accessibility)\r\n   * Adjudicator venue constraints, linking venue groups to adjudicators, with priority (used for accessibility/adj core)\r\n   * Division venue constraints, linking venues groups to divisions, with priority. This replaces the current `venue_group` attribute of `Division`.\r\n* The allocation procedure should go like this:\r\n    1. For each pairing, determine which venue group it will go in. This would involve some resolution of potentially conflicting venue constraints. Priorities would be used to resolve conflicts, and if I'm really feeling ambitious I might do it so that the \"set of venues\" associated with a pairing doesn't necessarily match a venue group (say, it could be the intersection of two partially-conflicting groups). The user should be warned about any constraint that can't be met.\r\n    2. Run the allocations procedure in [b78ba14](https://github.com/czlee/tabbycat/blob/b78ba1406d63c2698db2a3f996408a71baf2b939/draw/manager.py#L81-L100), which basically tries to satisfy all the pairing venue constraints, but in a way that doesn't just mean unconstrained pairings always get low-priority rooms.\r\n\r\nDownsides:\r\n\r\n* This adds an extra human step to draw generation, which for small tournaments without such complex requirements will be annoying. It might be worth extending our \"round status\" flow so that `CONFIRMED` refers to \"pairings, adjudicators and venues all confirmed\", as opposed to just pairings.\r\n* With the flexibility I'm thinking of, it might be O(n²) or O(n³) or something, but I don't think in practice this will inflate the venue allocation time, since normally there are only a few constraints and they tend to play nicely.\r\n\r\nThoughts? Would this work okay with how division venue groups work in practice?"},"comment":{"url":"https://api.github.com/repos/czlee/tabbycat/issues/comments/220819497","html_url":"https://github.com/czlee/tabbycat/issues/318#issuecomment-220819497","issue_url":"https://api.github.com/repos/czlee/tabbycat/issues/318","id":220819497,"user":{"login":"czlee","id":1725499,"avatar_url":"https://avatars.githubusercontent.com/u/1725499?v=3","gravatar_id":"","url":"https://api.github.com/users/czlee","html_url":"https://github.com/czlee","followers_url":"https://api.github.com/users/czlee/followers","following_url":"https://api.github.com/users/czlee/following{/other_user}","gists_url":"https://api.github.com/users/czlee/gists{/gist_id}","starred_url":"https://api.github.com/users/czlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czlee/subscriptions","organizations_url":"https://api.github.com/users/czlee/orgs","repos_url":"https://api.github.com/users/czlee/repos","events_url":"https://api.github.com/users/czlee/events{/privacy}","received_events_url":"https://api.github.com/users/czlee/received_events","type":"User","site_admin":false},"created_at":"2016-05-22T07:57:26Z","updated_at":"2016-05-22T07:57:26Z","body":"A first implementation is up, but I'm a bit stuck on how to present the warning messages about constraints not being fulfilled. Any ideas?"}}
{"actor":{"display_login":"czlee"}}