{"action":"closed","issue":{"url":"https://api.github.com/repos/pywr/pywr/issues/254","repository_url":"https://api.github.com/repos/pywr/pywr","labels_url":"https://api.github.com/repos/pywr/pywr/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/pywr/pywr/issues/254/comments","events_url":"https://api.github.com/repos/pywr/pywr/issues/254/events","html_url":"https://github.com/pywr/pywr/issues/254","id":177383730,"number":254,"title":"Initial timestep index","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},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pywr/pywr/milestones/2","html_url":"https://github.com/pywr/pywr/milestones/0.2","labels_url":"https://api.github.com/repos/pywr/pywr/milestones/2/labels","id":2032145,"number":2,"title":"0.2","description":"","creator":{"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},"open_issues":3,"closed_issues":13,"state":"open","created_at":"2016-09-27T15:23:16Z","updated_at":"2016-10-10T12:04:40Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-09-16T09:42:27Z","updated_at":"2016-10-10T12:04:40Z","closed_at":"2016-10-10T12:04:40Z","body":"Consider the following:\r\n```\r\n>>> from pywr.core import Model, Input, Output\r\n>>> model = Model()\r\n>>> inpt = Input(model, \"input\")\r\n>>> otpt = Output(model, \"output\")\r\n>>> inpt.connect(otpt)\r\n>>> model.timestepper.current.index\r\n0\r\n>>> model.step()\r\n>>> model.timestepper.current.index\r\n0\r\n>>> model.step()\r\n>>> model.timestepper.current.index\r\n1\r\n```\r\nBefore the model is run, the current timestep index is 0. After one step, it's still at 0 (but the end of the day). After another step it's at 1 (at the end of the day).\r\n\r\nShould the initial timestep report -1 for it's index? I came across this in #253, when calculating a parameter dependent on the reservoir state outside of the call to step."}}
{"actor":{"display_login":"jetuk"}}