Email lists > NetLogo users > Re: [netlogo-users] worlds end > Re: [netlogo-users] worlds end

Re: [netlogo-users] worlds end




This post if a part of  this thread

2008-07-09 14:30:40
Re: worlds end

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
< chunkyorkshireman%40yahoo.co.uk">chunkyorkshiremanyahoo.co.uk> wrote:
> 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

__._,_.___
.

__,_._,___

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