{"action":"created","comment":{"url":"https://api.github.com/repos/pywr/pywr/pulls/comments/102921754","pull_request_review_id":23693213,"id":102921754,"diff_hunk":"@@ -530,57 +530,21 @@ cdef class Node(AbstractNode):\n             self._cost = self._cost_param.value(ts, scenario_index)\n \n     cpdef setup(self, model):","path":"pywr/_core.pyx","position":3,"original_position":3,"commit_id":"9ec65b2db0c9a6e348a4313622a0d934135a5f18","original_commit_id":"9ec65b2db0c9a6e348a4313622a0d934135a5f18","user":{"login":"snorfalorpagus","id":3883947,"avatar_url":"https://avatars.githubusercontent.com/u/3883947?v=3","gravatar_id":"","url":"https://api.github.com/users/snorfalorpagus","html_url":"https://github.com/snorfalorpagus","followers_url":"https://api.github.com/users/snorfalorpagus/followers","following_url":"https://api.github.com/users/snorfalorpagus/following{/other_user}","gists_url":"https://api.github.com/users/snorfalorpagus/gists{/gist_id}","starred_url":"https://api.github.com/users/snorfalorpagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snorfalorpagus/subscriptions","organizations_url":"https://api.github.com/users/snorfalorpagus/orgs","repos_url":"https://api.github.com/users/snorfalorpagus/repos","events_url":"https://api.github.com/users/snorfalorpagus/events{/privacy}","received_events_url":"https://api.github.com/users/snorfalorpagus/received_events","type":"User","site_admin":false},"body":"These implementations aren't doing anything other than calling their parent method. Do we still need them?","created_at":"2017-02-24T11:06:53Z","updated_at":"2017-02-24T11:06:53Z","html_url":"https://github.com/pywr/pywr/pull/323#discussion_r102921754","pull_request_url":"https://api.github.com/repos/pywr/pywr/pulls/323","_links":{"self":{"href":"https://api.github.com/repos/pywr/pywr/pulls/comments/102921754"},"html":{"href":"https://github.com/pywr/pywr/pull/323#discussion_r102921754"},"pull_request":{"href":"https://api.github.com/repos/pywr/pywr/pulls/323"}}},"pull_request":{"url":"https://api.github.com/repos/pywr/pywr/pulls/323","id":93655006,"html_url":"https://github.com/pywr/pywr/pull/323","diff_url":"https://github.com/pywr/pywr/pull/323.diff","patch_url":"https://github.com/pywr/pywr/pull/323.patch","issue_url":"https://api.github.com/repos/pywr/pywr/issues/323","number":323,"state":"open","locked":false,"title":"WIP: Initial commit of parameter dependency tree","user":{"login":"snorfalorpagus","id":3883947,"avatar_url":"https://avatars.githubusercontent.com/u/3883947?v=3","gravatar_id":"","url":"https://api.github.com/users/snorfalorpagus","html_url":"https://github.com/snorfalorpagus","followers_url":"https://api.github.com/users/snorfalorpagus/followers","following_url":"https://api.github.com/users/snorfalorpagus/following{/other_user}","gists_url":"https://api.github.com/users/snorfalorpagus/gists{/gist_id}","starred_url":"https://api.github.com/users/snorfalorpagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snorfalorpagus/subscriptions","organizations_url":"https://api.github.com/users/snorfalorpagus/orgs","repos_url":"https://api.github.com/users/snorfalorpagus/repos","events_url":"https://api.github.com/users/snorfalorpagus/events{/privacy}","received_events_url":"https://api.github.com/users/snorfalorpagus/received_events","type":"User","site_admin":false},"body":"This is an initial implementation of the parameter tree we've been talking about, which could potentially solve a number of issues we've been having. The tree is generated by first getting the \"top level\" parameters (i.e. \"max_flow\", \"min_flow\", etc.) from all the nodes in the model, then traversing the children (`Parameter.children`) of those parameters recursively. The tree is then used to call the `setup` and `reset` methods for the parameters.\r\n\r\nThe next step is to implement the same for recorders, which don't currently use the parents/children structure. As is, this probably doesn't work correctly for any parameters that are only referenced by a recorder (which is possible!).\r\n\r\nAfter that, we could extend this for use as the primary refresh method for parameters. This would allow all parameter values to be cached. This would remove the need for `CachedParameter` (and the assoicated issues with detecting parameter type.\r\n\r\nI expect the result of this should generally be an small increase in performance as parameters are only ever evaluated once (with exception to the issue raised in #205).\r\n\r\nSee the `build_parameter_tree` and `flatten_parameter_tree` methods. The flattened tree is generated in such a way that any dependencies should be handled correctly. There is currently no handling of cyclic dependencies - this should be identified and raised as an exception.","created_at":"2016-11-14T21:47:45Z","updated_at":"2017-02-24T11:06:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"803798435438028c459cdcb36876a6cf55890ce0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pywr/pywr/pulls/323/commits","review_comments_url":"https://api.github.com/repos/pywr/pywr/pulls/323/comments","review_comment_url":"https://api.github.com/repos/pywr/pywr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pywr/pywr/issues/323/comments","statuses_url":"https://api.github.com/repos/pywr/pywr/statuses/9ec65b2db0c9a6e348a4313622a0d934135a5f18","head":{"label":"pywr:tree","ref":"tree","sha":"9ec65b2db0c9a6e348a4313622a0d934135a5f18","user":{"login":"pywr","id":15239563,"avatar_url":"https://avatars.githubusercontent.com/u/15239563?v=3","gravatar_id":"","url":"https://api.github.com/users/pywr","html_url":"https://github.com/pywr","followers_url":"https://api.github.com/users/pywr/followers","following_url":"https://api.github.com/users/pywr/following{/other_user}","gists_url":"https://api.github.com/users/pywr/gists{/gist_id}","starred_url":"https://api.github.com/users/pywr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pywr/subscriptions","organizations_url":"https://api.github.com/users/pywr/orgs","repos_url":"https://api.github.com/users/pywr/repos","events_url":"https://api.github.com/users/pywr/events{/privacy}","received_events_url":"https://api.github.com/users/pywr/received_events","type":"Organization","site_admin":false},"repo":{"id":29560246,"name":"pywr","full_name":"pywr/pywr","owner":{"login":"pywr","id":15239563,"avatar_url":"https://avatars.githubusercontent.com/u/15239563?v=3","gravatar_id":"","url":"https://api.github.com/users/pywr","html_url":"https://github.com/pywr","followers_url":"https://api.github.com/users/pywr/followers","following_url":"https://api.github.com/users/pywr/following{/other_user}","gists_url":"https://api.github.com/users/pywr/gists{/gist_id}","starred_url":"https://api.github.com/users/pywr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pywr/subscriptions","organizations_url":"https://api.github.com/users/pywr/orgs","repos_url":"https://api.github.com/users/pywr/repos","events_url":"https://api.github.com/users/pywr/events{/privacy}","received_events_url":"https://api.github.com/users/pywr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pywr/pywr","description":"Pywr is a generalised network resource allocation model written in Python.","fork":false,"url":"https://api.github.com/repos/pywr/pywr","forks_url":"https://api.github.com/repos/pywr/pywr/forks","keys_url":"https://api.github.com/repos/pywr/pywr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pywr/pywr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pywr/pywr/teams","hooks_url":"https://api.github.com/repos/pywr/pywr/hooks","issue_events_url":"https://api.github.com/repos/pywr/pywr/issues/events{/number}","events_url":"https://api.github.com/repos/pywr/pywr/events","assignees_url":"https://api.github.com/repos/pywr/pywr/assignees{/user}","branches_url":"https://api.github.com/repos/pywr/pywr/branches{/branch}","tags_url":"https://api.github.com/repos/pywr/pywr/tags","blobs_url":"https://api.github.com/repos/pywr/pywr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pywr/pywr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pywr/pywr/git/refs{/sha}","trees_url":"https://api.github.com/repos/pywr/pywr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pywr/pywr/statuses/{sha}","languages_url":"https://api.github.com/repos/pywr/pywr/languages","stargazers_url":"https://api.github.com/repos/pywr/pywr/stargazers","contributors_url":"https://api.github.com/repos/pywr/pywr/contributors","subscribers_url":"https://api.github.com/repos/pywr/pywr/subscribers","subscription_url":"https://api.github.com/repos/pywr/pywr/subscription","commits_url":"https://api.github.com/repos/pywr/pywr/commits{/sha}","git_commits_url":"https://api.github.com/repos/pywr/pywr/git/commits{/sha}","comments_url":"https://api.github.com/repos/pywr/pywr/comments{/number}","issue_comment_url":"https://api.github.com/repos/pywr/pywr/issues/comments{/number}","contents_url":"https://api.github.com/repos/pywr/pywr/contents/{+path}","compare_url":"https://api.github.com/repos/pywr/pywr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pywr/pywr/merges","archive_url":"https://api.github.com/repos/pywr/pywr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pywr/pywr/downloads","issues_url":"https://api.github.com/repos/pywr/pywr/issues{/number}","pulls_url":"https://api.github.com/repos/pywr/pywr/pulls{/number}","milestones_url":"https://api.github.com/repos/pywr/pywr/milestones{/number}","notifications_url":"https://api.github.com/repos/pywr/pywr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pywr/pywr/labels{/name}","releases_url":"https://api.github.com/repos/pywr/pywr/releases{/id}","deployments_url":"https://api.github.com/repos/pywr/pywr/deployments","created_at":"2015-01-20T23:13:55Z","updated_at":"2016-11-03T15:43:00Z","pushed_at":"2017-02-24T01:38:03Z","git_url":"git://github.com/pywr/pywr.git","ssh_url":"git@github.com:pywr/pywr.git","clone_url":"https://github.com/pywr/pywr.git","svn_url":"https://github.com/pywr/pywr","homepage":"","size":2855,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":66,"forks":5,"open_issues":66,"watchers":4,"default_branch":"master"}},"base":{"label":"pywr:master","ref":"master","sha":"a00fa115f38787c2ab7b53d65825cea45e22775d","user":{"login":"pywr","id":15239563,"avatar_url":"https://avatars.githubusercontent.com/u/15239563?v=3","gravatar_id":"","url":"https://api.github.com/users/pywr","html_url":"https://github.com/pywr","followers_url":"https://api.github.com/users/pywr/followers","following_url":"https://api.github.com/users/pywr/following{/other_user}","gists_url":"https://api.github.com/users/pywr/gists{/gist_id}","starred_url":"https://api.github.com/users/pywr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pywr/subscriptions","organizations_url":"https://api.github.com/users/pywr/orgs","repos_url":"https://api.github.com/users/pywr/repos","events_url":"https://api.github.com/users/pywr/events{/privacy}","received_events_url":"https://api.github.com/users/pywr/received_events","type":"Organization","site_admin":false},"repo":{"id":29560246,"name":"pywr","full_name":"pywr/pywr","owner":{"login":"pywr","id":15239563,"avatar_url":"https://avatars.githubusercontent.com/u/15239563?v=3","gravatar_id":"","url":"https://api.github.com/users/pywr","html_url":"https://github.com/pywr","followers_url":"https://api.github.com/users/pywr/followers","following_url":"https://api.github.com/users/pywr/following{/other_user}","gists_url":"https://api.github.com/users/pywr/gists{/gist_id}","starred_url":"https://api.github.com/users/pywr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pywr/subscriptions","organizations_url":"https://api.github.com/users/pywr/orgs","repos_url":"https://api.github.com/users/pywr/repos","events_url":"https://api.github.com/users/pywr/events{/privacy}","received_events_url":"https://api.github.com/users/pywr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pywr/pywr","description":"Pywr is a generalised network resource allocation model written in Python.","fork":false,"url":"https://api.github.com/repos/pywr/pywr","forks_url":"https://api.github.com/repos/pywr/pywr/forks","keys_url":"https://api.github.com/repos/pywr/pywr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pywr/pywr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pywr/pywr/teams","hooks_url":"https://api.github.com/repos/pywr/pywr/hooks","issue_events_url":"https://api.github.com/repos/pywr/pywr/issues/events{/number}","events_url":"https://api.github.com/repos/pywr/pywr/events","assignees_url":"https://api.github.com/repos/pywr/pywr/assignees{/user}","branches_url":"https://api.github.com/repos/pywr/pywr/branches{/branch}","tags_url":"https://api.github.com/repos/pywr/pywr/tags","blobs_url":"https://api.github.com/repos/pywr/pywr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pywr/pywr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pywr/pywr/git/refs{/sha}","trees_url":"https://api.github.com/repos/pywr/pywr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pywr/pywr/statuses/{sha}","languages_url":"https://api.github.com/repos/pywr/pywr/languages","stargazers_url":"https://api.github.com/repos/pywr/pywr/stargazers","contributors_url":"https://api.github.com/repos/pywr/pywr/contributors","subscribers_url":"https://api.github.com/repos/pywr/pywr/subscribers","subscription_url":"https://api.github.com/repos/pywr/pywr/subscription","commits_url":"https://api.github.com/repos/pywr/pywr/commits{/sha}","git_commits_url":"https://api.github.com/repos/pywr/pywr/git/commits{/sha}","comments_url":"https://api.github.com/repos/pywr/pywr/comments{/number}","issue_comment_url":"https://api.github.com/repos/pywr/pywr/issues/comments{/number}","contents_url":"https://api.github.com/repos/pywr/pywr/contents/{+path}","compare_url":"https://api.github.com/repos/pywr/pywr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pywr/pywr/merges","archive_url":"https://api.github.com/repos/pywr/pywr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pywr/pywr/downloads","issues_url":"https://api.github.com/repos/pywr/pywr/issues{/number}","pulls_url":"https://api.github.com/repos/pywr/pywr/pulls{/number}","milestones_url":"https://api.github.com/repos/pywr/pywr/milestones{/number}","notifications_url":"https://api.github.com/repos/pywr/pywr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pywr/pywr/labels{/name}","releases_url":"https://api.github.com/repos/pywr/pywr/releases{/id}","deployments_url":"https://api.github.com/repos/pywr/pywr/deployments","created_at":"2015-01-20T23:13:55Z","updated_at":"2016-11-03T15:43:00Z","pushed_at":"2017-02-24T01:38:03Z","git_url":"git://github.com/pywr/pywr.git","ssh_url":"git@github.com:pywr/pywr.git","clone_url":"https://github.com/pywr/pywr.git","svn_url":"https://github.com/pywr/pywr","homepage":"","size":2855,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":66,"forks":5,"open_issues":66,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pywr/pywr/pulls/323"},"html":{"href":"https://github.com/pywr/pywr/pull/323"},"issue":{"href":"https://api.github.com/repos/pywr/pywr/issues/323"},"comments":{"href":"https://api.github.com/repos/pywr/pywr/issues/323/comments"},"review_comments":{"href":"https://api.github.com/repos/pywr/pywr/pulls/323/comments"},"review_comment":{"href":"https://api.github.com/repos/pywr/pywr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pywr/pywr/pulls/323/commits"},"statuses":{"href":"https://api.github.com/repos/pywr/pywr/statuses/9ec65b2db0c9a6e348a4313622a0d934135a5f18"}}}}
{"actor":{"display_login":"snorfalorpagus"}}