{"action":"created","issue":{"url":"https://api.github.com/repos/brian-team/brian2/issues/730","repository_url":"https://api.github.com/repos/brian-team/brian2","labels_url":"https://api.github.com/repos/brian-team/brian2/issues/730/labels{/name}","comments_url":"https://api.github.com/repos/brian-team/brian2/issues/730/comments","events_url":"https://api.github.com/repos/brian-team/brian2/issues/730/events","html_url":"https://github.com/brian-team/brian2/issues/730","id":164833445,"number":730,"title":"Clock.epsilon too small?","user":{"login":"thesamovar","id":2903870,"avatar_url":"https://avatars.githubusercontent.com/u/2903870?v=3","gravatar_id":"","url":"https://api.github.com/users/thesamovar","html_url":"https://github.com/thesamovar","followers_url":"https://api.github.com/users/thesamovar/followers","following_url":"https://api.github.com/users/thesamovar/following{/other_user}","gists_url":"https://api.github.com/users/thesamovar/gists{/gist_id}","starred_url":"https://api.github.com/users/thesamovar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesamovar/subscriptions","organizations_url":"https://api.github.com/users/thesamovar/orgs","repos_url":"https://api.github.com/users/thesamovar/repos","events_url":"https://api.github.com/users/thesamovar/events{/privacy}","received_events_url":"https://api.github.com/users/thesamovar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brian-team/brian2/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/brian-team/brian2/milestones/5","html_url":"https://github.com/brian-team/brian2/milestones/2.0","labels_url":"https://api.github.com/repos/brian-team/brian2/milestones/5/labels","id":380500,"number":5,"title":"2.0","description":"First widely announced full release version of Brian 2.","creator":{"login":"thesamovar","id":2903870,"avatar_url":"https://avatars.githubusercontent.com/u/2903870?v=3","gravatar_id":"","url":"https://api.github.com/users/thesamovar","html_url":"https://github.com/thesamovar","followers_url":"https://api.github.com/users/thesamovar/followers","following_url":"https://api.github.com/users/thesamovar/following{/other_user}","gists_url":"https://api.github.com/users/thesamovar/gists{/gist_id}","starred_url":"https://api.github.com/users/thesamovar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesamovar/subscriptions","organizations_url":"https://api.github.com/users/thesamovar/orgs","repos_url":"https://api.github.com/users/thesamovar/repos","events_url":"https://api.github.com/users/thesamovar/events{/privacy}","received_events_url":"https://api.github.com/users/thesamovar/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":69,"state":"open","created_at":"2013-07-17T13:52:20Z","updated_at":"2016-07-11T13:11:22Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-07-11T13:11:22Z","updated_at":"2016-07-26T15:23:09Z","closed_at":null,"body":"The following was reported on the mailing list:\r\n\r\n```\r\nWhen I restore a network model from last run and run the simulation, I encountered such error, ValueError: Cannot set dt from 100. us to 10. us, the time 112. s is not a multiple of 10. Us.\r\n\r\nThis error will not happen if the last simulation time is very short such as 10. S. Don’t know where is the problem.\r\n```\r\n\r\nI just checked and ``(112/10e-6)*10e-6 - 112 = 1.4e-14``, and ``Clock.epsilon=1e-14``. At the moment we have an absolute check for whether a time is a multiple of dt, i.e. ``abs(t_new-t_old)<Clock.epsilon`` and so this would be failing this check.\r\n\r\nTwo options, either we increase ``Clock.epsilon`` or we use a relative measure. Any thoughts?"},"comment":{"url":"https://api.github.com/repos/brian-team/brian2/issues/comments/235303018","html_url":"https://github.com/brian-team/brian2/issues/730#issuecomment-235303018","issue_url":"https://api.github.com/repos/brian-team/brian2/issues/730","id":235303018,"user":{"login":"thesamovar","id":2903870,"avatar_url":"https://avatars.githubusercontent.com/u/2903870?v=3","gravatar_id":"","url":"https://api.github.com/users/thesamovar","html_url":"https://github.com/thesamovar","followers_url":"https://api.github.com/users/thesamovar/followers","following_url":"https://api.github.com/users/thesamovar/following{/other_user}","gists_url":"https://api.github.com/users/thesamovar/gists{/gist_id}","starred_url":"https://api.github.com/users/thesamovar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesamovar/subscriptions","organizations_url":"https://api.github.com/users/thesamovar/orgs","repos_url":"https://api.github.com/users/thesamovar/repos","events_url":"https://api.github.com/users/thesamovar/events{/privacy}","received_events_url":"https://api.github.com/users/thesamovar/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T15:23:09Z","updated_at":"2016-07-26T15:23:09Z","body":"It's not quite so simple, because we could allow a change of dt from 0.5ms to 0.75ms if we can run for t=1.5ms (old i=3, new i=2). We could disallow this but it seems a bit arbitrary to do so. But you're definitely right that we ought to have explicit warnings for the case where t is too big relative to dt (e.g. could warn when i is more than ``2**49`` on the assumption that we want it to be accurate to within 0.01% of a timestep, as I suggested earlier)."}}
{"actor":{"display_login":"thesamovar"}}