List Info

Thread: worlds end




worlds end
user name
2008-07-09 07:43:32

Hi all,

Having implemented a boundary into my model i am getting the
following error message;

error while turtle 2 running OF in procedure GO-TURTLES called by
procedure GO
OF expected input to be a turtle agentset or patch agentset or turtle
or patch but got NOBODY instead.
(halted running of go)

The highlighted code is;
if [pcolor] of patch-ahead 3 = grey
[rt 180 jump 3]

When running the model it appears fine - watching turtles approach
the boundary and then truning back - but then one little blighter
will blow-up.

Can anyone expalin the problem/help please.

Thahnk, tim

__._,_.___
.

__,_._,___
Re: worlds end
user name
2008-07-09 12:13:39

>>&gt;>> "chunkyorkshireman" == chunkyorkshireman < chunkyorkshireman%40yahoo.co.uk">chunkyorkshiremanyahoo.co.uk> writes:

chunkyorkshireman&gt; When running the model it appears fine - watching
chunkyorkshireman> turtles approach the boundary and then truning back
chunkyorkshireman> - but then one little blighter will blow-up.
chunkyorkshireman> Can anyone expalin the problem/help please.

Offhand, I expect the problem is this: just because there's a boundary
in front of the turtle, doesn't mean there isn't one behind it as well.
If the turtle is near a corner, it could have boundaries both in
front of and behind it, so doing "rt 180 jump 3" could make the turtle
cross the boundary behind it.

--
Seth Tisue / http://tisue.net
lead developer, NetLogo: http://ccl.northwestern.edu/netlogo/

__._,_.___
.

__,_._,___
Re: worlds end
country flaguser name
United States
2008-07-09 14:30:40

That bug... um... that *agent* is in a position where the location
represented by patch-ahead 3 is off the edge of the world, and
edge-wrapping is turned off, so patch-ahead 3 reports the special
value NOBODY.

So, you may want to enhance you edge-detection to include detecting
that situation.

if not is-patch? patch-ahead 3 or [ pcolor ] of patch-ahead 3 = gray
[ ... bounce... ]

On Wed, Jul 9, 2008 at 8:43 AM, chunkyorkshireman
&lt; chunkyorkshireman%40yahoo.co.uk">chunkyorkshiremanyahoo.co.uk> wrote:
&gt; Hi all,
>;
> Having implemented a boundary into my model i am getting the
> following error message;
>
>; error while turtle 2 running OF in procedure GO-TURTLES called by
> procedure GO
> OF expected input to be a turtle agentset or patch agentset or turtle
&gt; or patch but got NOBODY instead.
> (halted running of go)
>
> The highlighted code is;
> if [pcolor] of patch-ahead 3 = grey
>; [rt 180 jump 3]
>
> When running the model it appears fine - watching turtles approach
> the boundary and then truning back - but then one little blighter
> will blow-up.
>
>; Can anyone expalin the problem/help please.
>
> Thahnk, tim

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )