Loading ...
Sorry, an error occurred while loading the content.
 

Error Message

Expand Messages
  • Kinjel Shastri
    Hi all, My model is still in the preliminary stages and I haven t fully completed it but its basic function is developed from the slime model in the Netlogo
    Message 1 of 3 , Jun 30, 2010
      Hi all, 
            
            My model is still in the preliminary stages and I haven't fully completed it but its basic function is developed from the slime model in the Netlogo library. I ran across this error message after I turned off the horizontal and vertical "wrap" feature in the world. 

      error while turtle 49 running OF in procedure GO-TOWARDS-CHEMICAL
        called by procedure MOVE-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)

      Please advise if you can. Many thanks!!!

      Sincerely, 
      Kinjel Shastri 

    • James Steiner
      When wrapping is on, and a turtle looks out across the edge of the world, what it sees is the patch on the opposite side. When wrapping is off, the turtles
      Message 2 of 3 , Jul 1, 2010
        When wrapping is on, and a turtle looks out across the edge of the world, what it sees is the patch on the opposite side. When wrapping is off, the turtles sees nothing, and if the code does not expect that and deal with that case, then problems like yours can occur.

        The same is true for many operations that work OK when wrapping in on, but fail when off.

        In most cases, where your code might be grabbing some other agent (like patch-ahead 1) and making it do something using OF on it right away, this problem can occur, because patch-ahead 1 is NOBODY.

        So, you need to spilt these into three steps--first use the code that gets the agent and store it, then test if it is really an agent, and if so, do somethiing:

        ;; get the next patch
        let next-patch patch-ahead 1
        ;; test the patch
        ifelse is-patch? next-patch
        [ ;; act on that information
          if [color] of next-patch.... and so on...
        ]
        [ ;; what happens if there is no patch?
          ....
        ]

        Hope this helps!

        ~~James


        On Wed, Jun 30, 2010 at 5:09 PM, Kinjel Shastri <kinjel.shastri@...> wrote:


        Hi all, 
              
              My model is still in the preliminary stages and I haven't fully completed it but its basic function is developed from the slime model in the Netlogo library. I ran across this error message after I turned off the horizontal and vertical "wrap" feature in the world. 

        error while turtle 49 running OF in procedure GO-TOWARDS-CHEMICAL
          called by procedure MOVE-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)

        Please advise if you can. Many thanks!!!

        Sincerely, 
        Kinjel Shastri 

      • Kinjel Shastri
        Hi all! I am in the middle of completing my model and its basic functions are developed from the slime model and the ants model in the Netlogo library and I
        Message 3 of 3 , Jul 28, 2010
          Hi all! 
                 I am in the middle of completing my model and its basic functions are developed from the slime model and the ants model in the Netlogo library and I keep running across this error message. I understand why I am getting it as I have turned off the horizontal and vertical wrap features in the world but I am a bit lost on ways to fix this. Any suggestions would help as I'm still a beginner. Many thanks!!!
          -Kinjel 

          Copy of Error Message:
          error while hemangio 96 running OF in procedure GO-TOWARDS-CHEMICAL
            called by procedure MOVE-HEMANGIOS
            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)

          Copy of Procedure for GO-TOWARDS-CHEMICAL
          to go-towards-chemical 
            ask hemangios [ ifelse oasis-scent >= 30
            [ set color green  ]
            [ set color red  ] ] 
            let next-patch patch-ahead 1 
            ifelse is-patch? next-patch
            [ let ahead [ chemical ] of patch-ahead 3
              let toright [ chemical ] of patch-right-and-ahead origin-scent 1  
              let toleft [ chemical ] of patch-left-and-ahead origin-scent 1 
            ] 
            [ stop ]  
          end 



        Your message has been successfully submitted and would be delivered to recipients shortly.