The precise use here is for an oudside visualization method configured by the netlogo model. The visualization lives on its own thread and responds to outside events that may or may not come from the NetLogo engine. However, part of the configuration is a reporter block that when applied to any given turtle, will report an integer of some sort. It might look something like the following:
turtles-own [ important-info ] to setup frank-vis:boot-turtle-vis [ important-info ] end The reporter block there needs some context in which to run, and it should not be the context with which boot-turtle-vis was called (Or should it?). Assumedly there are a plethora of errors that could happen if the reporter block has local information, or something else, but I'm concerned with the happy path. >From here, I can then extrapolate how to have a culling mechanism as well, so that we can generate new agentsets, imagining something like this: to setup frank-vis:boot-turtle-vis [ important-info ] [ pxcor > 5 ] end Otherwise we're stuck with the agentset as it existed at the time boot was called which would probably be empty. Ideally, we want to not use strings so that we can reuse the parser, namer, etc. Also, so that we don't have to re run the full compiler each time (a la runreseult). Frank On Wed, Sep 03, 2014 at 10:44:49AM -0700, Seth Tisue wrote: > Contexts aren't free-standing objects; every context is part of a job. Each > agent participating in a job gets a context within that job. There is some > documentation on this stuff > at https://github.com/NetLogo/NetLogo/wiki/Engine-architecture . (And if > anything is unclear or too briefly described, I'm happy to expand it on > request, if you can identify what part needs work.) > > There are different answers to "how do I run an arbitrary reporter block" > depending on where you're trying to do it from. Are you already on the job > thread? If so, are you already inside one primitive's `report` or `perform` > method, or are you in some other place? Or are you on a different thread? > All of these distinctions matter. If you're on a different thread, then you > need to submit a job through the job manager. If you're already inside a > `report` or `perform` method, then see e.g. how `_with.report` does it. > (And if you're on the job thread but you're not inside a `report` or > `perform`, where are you?) > > Can you be more precise about *exactly* what you are trying to do and > *exactly* where you want to do it from? Fine distinctions on this are > crucial. > > Seth > > -- > You received this message because you are subscribed to the Google Groups > "netlogo-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "netlogo-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
