{"action":"created","issue":{"url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1602","repository_url":"https://api.github.com/repos/NetLogo/NetLogo","labels_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1602/labels{/name}","comments_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1602/comments","events_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1602/events","html_url":"https://github.com/NetLogo/NetLogo/issues/1602","id":311471353,"number":1602,"title":"Allow setting maximum speed programmatically","user":{"login":"mars0i","id":1836941,"avatar_url":"https://avatars0.githubusercontent.com/u/1836941?v=4","gravatar_id":"","url":"https://api.github.com/users/mars0i","html_url":"https://github.com/mars0i","followers_url":"https://api.github.com/users/mars0i/followers","following_url":"https://api.github.com/users/mars0i/following{/other_user}","gists_url":"https://api.github.com/users/mars0i/gists{/gist_id}","starred_url":"https://api.github.com/users/mars0i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mars0i/subscriptions","organizations_url":"https://api.github.com/users/mars0i/orgs","repos_url":"https://api.github.com/users/mars0i/repos","events_url":"https://api.github.com/users/mars0i/events{/privacy}","received_events_url":"https://api.github.com/users/mars0i/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-05T04:47:18Z","updated_at":"2018-04-05T18:57:39Z","closed_at":null,"author_association":"NONE","body":"Example (NetLogo 6.0.2 desktop): I use turtles to draw curves that form the background on which the model runs.  Users don't need to see the process of drawing the curves; the curves just need to be there as soon as possible when `setup` is run.\r\n\r\nThis is fast enough if the speed slider is set on normal speed or higher.  However, if the user sets the speed slider to a slower speed--say, because they intend to watch `go` run at a slower speed--then the curves take a long time to draw, even if I wrap the drawing code with `no-display`, `display`.  So the user has to drag the speed slider to the right during setup to get the curves drawn quickly, but then has to move it back to the left before clicking on the \"go\" button.\r\n\r\nIt would be useful if one could turn off the speed delay from code and just run as fast as possible, and then set it back to whatever speed the user had set it at.  (Perhaps there would be some advantage to being able to set the speed to other values, but I don't yet see a use case for that.)\r\n\r\nInterestingly, I notice no such issue in NetLogo Web (NLW).  Drawing the curves in setup seems to run at the same speed no matter where the speed slider is.  Maybe in NLW the delay that's controlled by the slider is attached to `tick`, while in Desktop the delay is implemented at some deeper spot?  Maybe rather than allowing one to set the delay to zero, the delay could just be attached to `tick` in Desktop, or however it's done in NLW.\r\n\r\n(Note that at present, `no-display` and `display` aren't useful anyway if one wants to run the model in NetLogo Web as well as standard NetLogo, since these commands are not implemented in NLW.)"},"comment":{"url":"https://api.github.com/repos/NetLogo/NetLogo/issues/comments/379041703","html_url":"https://github.com/NetLogo/NetLogo/issues/1602#issuecomment-379041703","issue_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1602","id":379041703,"user":{"login":"mars0i","id":1836941,"avatar_url":"https://avatars0.githubusercontent.com/u/1836941?v=4","gravatar_id":"","url":"https://api.github.com/users/mars0i","html_url":"https://github.com/mars0i","followers_url":"https://api.github.com/users/mars0i/followers","following_url":"https://api.github.com/users/mars0i/following{/other_user}","gists_url":"https://api.github.com/users/mars0i/gists{/gist_id}","starred_url":"https://api.github.com/users/mars0i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mars0i/subscriptions","organizations_url":"https://api.github.com/users/mars0i/orgs","repos_url":"https://api.github.com/users/mars0i/repos","events_url":"https://api.github.com/users/mars0i/events{/privacy}","received_events_url":"https://api.github.com/users/mars0i/received_events","type":"User","site_admin":false},"created_at":"2018-04-05T18:57:39Z","updated_at":"2018-04-05T18:57:39Z","author_association":"NONE","body":"Thanks @SethTisue , @LaCuneta.  My apologies if this didn't belong as a new issue.  I had asked a closely related question in Stackoverflow and got one \"no there doesn't seem to be a way\" answer from someone I consider pretty knowledgeable.  (I can't stand Yahoo Groups--you won't find me asking there.)  \r\n\r\nThanks for the suggestions.  I was using `clear-all`, `reset-ticks`, and `tick`, but didn't realize I needed to change the dropdown from \"continuous\" to \"on ticks\".   This change did cause the display to update immediate. Great.\r\n\r\nHowever, the setup procedure as a whole is still sensitive to the speed slider setting.  If the slider is set low (left), I get my background plots immediately, but it takes a long time to do the rest of the setup, even though it doesn't do much--I create two or three simple turtles with a few calls to short procedure definitions.  So that still seems undesirable."}}
{"actor":{"display_login":"mars0i"}}