{"action":"opened","number":148,"pull_request":{"url":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls/148","id":190028559,"html_url":"https://github.com/ChriGau/caplanpourmoi/pull/148","diff_url":"https://github.com/ChriGau/caplanpourmoi/pull/148.diff","patch_url":"https://github.com/ChriGau/caplanpourmoi/pull/148.patch","issue_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues/148","number":148,"state":"open","locked":false,"title":"145 store nb iterations","user":{"login":"ChriGau","id":29304869,"avatar_url":"https://avatars0.githubusercontent.com/u/29304869?v=4","gravatar_id":"","url":"https://api.github.com/users/ChriGau","html_url":"https://github.com/ChriGau","followers_url":"https://api.github.com/users/ChriGau/followers","following_url":"https://api.github.com/users/ChriGau/following{/other_user}","gists_url":"https://api.github.com/users/ChriGau/gists{/gist_id}","starred_url":"https://api.github.com/users/ChriGau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChriGau/subscriptions","organizations_url":"https://api.github.com/users/ChriGau/orgs","repos_url":"https://api.github.com/users/ChriGau/repos","events_url":"https://api.github.com/users/ChriGau/events{/privacy}","received_events_url":"https://api.github.com/users/ChriGau/received_events","type":"User","site_admin":false},"body":"# 1) pour comprendre le problème, j'ai stocké la liste des solutions en CSV\r\n--> cf go_find_solutions_service.rb --> method `store_planning_possibilities_to_csv`\r\n**Pour activer le stockage, décommenter l'actuelle ligne 112** telle que:\r\n`store_planning_possibilities_to_csv(solutions_array)`\r\n**Le fichier CSV se crée à la racine du projet, ne pas oublier de supprimer ces fichiers après les tests.**\r\n\r\n\r\n# 2) Résolution du problème\r\nLorsque pour une planning_possibility, on a nb_conflicts > au best du moment, on retourne le sg_ranking du slotgroup à partir duquel on est > au best.\r\nProblème : dans la boucle qui vérifie cela, je ne sortais pas de la boucle lorsque cette condition est vérifiée, donc par défaut le slotgroup_id était toujours le dernier, donc on va forcément au noeud suivant.\r\n\r\n![screenshot from 2018-05-23 17-58-58](https://user-images.githubusercontent.com/29304869/40436699-dabad714-5eb3-11e8-872e-da60d57e745e.png)\r\n\r\n","created_at":"2018-05-23T16:05:50Z","updated_at":"2018-05-23T16:05:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls/148/commits","review_comments_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls/148/comments","review_comment_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues/148/comments","statuses_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/statuses/4a0dbce6fe9f15b01b8810f808552820a347f467","head":{"label":"ChriGau:145-store-nb-iterations","ref":"145-store-nb-iterations","sha":"4a0dbce6fe9f15b01b8810f808552820a347f467","user":{"login":"ChriGau","id":29304869,"avatar_url":"https://avatars0.githubusercontent.com/u/29304869?v=4","gravatar_id":"","url":"https://api.github.com/users/ChriGau","html_url":"https://github.com/ChriGau","followers_url":"https://api.github.com/users/ChriGau/followers","following_url":"https://api.github.com/users/ChriGau/following{/other_user}","gists_url":"https://api.github.com/users/ChriGau/gists{/gist_id}","starred_url":"https://api.github.com/users/ChriGau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChriGau/subscriptions","organizations_url":"https://api.github.com/users/ChriGau/orgs","repos_url":"https://api.github.com/users/ChriGau/repos","events_url":"https://api.github.com/users/ChriGau/events{/privacy}","received_events_url":"https://api.github.com/users/ChriGau/received_events","type":"User","site_admin":false},"repo":{"id":101344105,"name":"caplanpourmoi","full_name":"ChriGau/caplanpourmoi","owner":{"login":"ChriGau","id":29304869,"avatar_url":"https://avatars0.githubusercontent.com/u/29304869?v=4","gravatar_id":"","url":"https://api.github.com/users/ChriGau","html_url":"https://github.com/ChriGau","followers_url":"https://api.github.com/users/ChriGau/followers","following_url":"https://api.github.com/users/ChriGau/following{/other_user}","gists_url":"https://api.github.com/users/ChriGau/gists{/gist_id}","starred_url":"https://api.github.com/users/ChriGau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChriGau/subscriptions","organizations_url":"https://api.github.com/users/ChriGau/orgs","repos_url":"https://api.github.com/users/ChriGau/repos","events_url":"https://api.github.com/users/ChriGau/events{/privacy}","received_events_url":"https://api.github.com/users/ChriGau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChriGau/caplanpourmoi","description":null,"fork":false,"url":"https://api.github.com/repos/ChriGau/caplanpourmoi","forks_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/forks","keys_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/teams","hooks_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/hooks","issue_events_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues/events{/number}","events_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/events","assignees_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/assignees{/user}","branches_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/branches{/branch}","tags_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/tags","blobs_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/statuses/{sha}","languages_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/languages","stargazers_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/stargazers","contributors_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/contributors","subscribers_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/subscribers","subscription_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/subscription","commits_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/contents/{+path}","compare_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/merges","archive_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/downloads","issues_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues{/number}","pulls_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls{/number}","milestones_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/milestones{/number}","notifications_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/labels{/name}","releases_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/releases{/id}","deployments_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/deployments","created_at":"2017-08-24T22:53:33Z","updated_at":"2017-12-04T15:33:14Z","pushed_at":"2018-05-23T15:57:39Z","git_url":"git://github.com/ChriGau/caplanpourmoi.git","ssh_url":"git@github.com:ChriGau/caplanpourmoi.git","clone_url":"https://github.com/ChriGau/caplanpourmoi.git","svn_url":"https://github.com/ChriGau/caplanpourmoi","homepage":null,"size":8680,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":27,"license":null,"forks":1,"open_issues":27,"watchers":3,"default_branch":"master"}},"base":{"label":"ChriGau:algo","ref":"algo","sha":"1a8e13f0cd60d46381b4d42d01710ef47b53ee74","user":{"login":"ChriGau","id":29304869,"avatar_url":"https://avatars0.githubusercontent.com/u/29304869?v=4","gravatar_id":"","url":"https://api.github.com/users/ChriGau","html_url":"https://github.com/ChriGau","followers_url":"https://api.github.com/users/ChriGau/followers","following_url":"https://api.github.com/users/ChriGau/following{/other_user}","gists_url":"https://api.github.com/users/ChriGau/gists{/gist_id}","starred_url":"https://api.github.com/users/ChriGau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChriGau/subscriptions","organizations_url":"https://api.github.com/users/ChriGau/orgs","repos_url":"https://api.github.com/users/ChriGau/repos","events_url":"https://api.github.com/users/ChriGau/events{/privacy}","received_events_url":"https://api.github.com/users/ChriGau/received_events","type":"User","site_admin":false},"repo":{"id":101344105,"name":"caplanpourmoi","full_name":"ChriGau/caplanpourmoi","owner":{"login":"ChriGau","id":29304869,"avatar_url":"https://avatars0.githubusercontent.com/u/29304869?v=4","gravatar_id":"","url":"https://api.github.com/users/ChriGau","html_url":"https://github.com/ChriGau","followers_url":"https://api.github.com/users/ChriGau/followers","following_url":"https://api.github.com/users/ChriGau/following{/other_user}","gists_url":"https://api.github.com/users/ChriGau/gists{/gist_id}","starred_url":"https://api.github.com/users/ChriGau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChriGau/subscriptions","organizations_url":"https://api.github.com/users/ChriGau/orgs","repos_url":"https://api.github.com/users/ChriGau/repos","events_url":"https://api.github.com/users/ChriGau/events{/privacy}","received_events_url":"https://api.github.com/users/ChriGau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChriGau/caplanpourmoi","description":null,"fork":false,"url":"https://api.github.com/repos/ChriGau/caplanpourmoi","forks_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/forks","keys_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/teams","hooks_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/hooks","issue_events_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues/events{/number}","events_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/events","assignees_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/assignees{/user}","branches_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/branches{/branch}","tags_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/tags","blobs_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/statuses/{sha}","languages_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/languages","stargazers_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/stargazers","contributors_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/contributors","subscribers_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/subscribers","subscription_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/subscription","commits_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/contents/{+path}","compare_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/merges","archive_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/downloads","issues_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues{/number}","pulls_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls{/number}","milestones_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/milestones{/number}","notifications_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/labels{/name}","releases_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/releases{/id}","deployments_url":"https://api.github.com/repos/ChriGau/caplanpourmoi/deployments","created_at":"2017-08-24T22:53:33Z","updated_at":"2017-12-04T15:33:14Z","pushed_at":"2018-05-23T15:57:39Z","git_url":"git://github.com/ChriGau/caplanpourmoi.git","ssh_url":"git@github.com:ChriGau/caplanpourmoi.git","clone_url":"https://github.com/ChriGau/caplanpourmoi.git","svn_url":"https://github.com/ChriGau/caplanpourmoi","homepage":null,"size":8680,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":27,"license":null,"forks":1,"open_issues":27,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls/148"},"html":{"href":"https://github.com/ChriGau/caplanpourmoi/pull/148"},"issue":{"href":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues/148"},"comments":{"href":"https://api.github.com/repos/ChriGau/caplanpourmoi/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ChriGau/caplanpourmoi/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/ChriGau/caplanpourmoi/statuses/4a0dbce6fe9f15b01b8810f808552820a347f467"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":31,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"ChriGau"}}