In Tutorial #2, you learned how to use the command center and agent monitors to inspect and modify agents and make them do things. Now you're ready to learn about the real heart of a NetLogo model: the Code tab.
You've seen that agents in NetLogo are divided into patches, turtles, links, and the observer. Patches are stationary and arranged in a grid. Turtles move over that grid. Links connect two turtles. The observer oversees everything that's going on and does whatever the turtles, patches and links can't do for themselves.
All four types of agents can run NetLogo commands. All four can also run "procedures". A procedure combines a series of NetLogo commands into a single new command that you define.
You will now learn to write procedures that make turtles move, eat, reproduce, and die. You will also learn how to make monitors, sliders, and plots. The model we'll build is a simple ecosystem model not unlike Wolf Sheep Predation from Tutorial #1
ใน # กวดวิชา 2 , คุณได้เรียนรู้วิธีที่จะใช้เป็นศูนย์บัญชาการและตัวแทนการตรวจสอบเพื่อตรวจสอบและแก้ไขตัวแทนและทำให้พวกเขาทำสิ่งต่าง ๆ ตอนนี้คุณพร้อมที่จะเรียนรู้เรื่องหัวใจที่แท้จริงของ netlogo แบบแท็บรหัสคุณเคยเห็นที่ตัวแทนใน netlogo แบ่งเป็นแพทช์ , เต่า , การเชื่อมโยงและผู้สังเกตการณ์ แพทช์เป็นเครื่องเขียน และจัดเป็นตาราง เต่าย้ายไปที่ตาราง การเชื่อมโยงเชื่อมต่อเต่า 2 สังเกตการณ์เฝ้าดูทุกอย่างและทำทุกอย่างที่เต่า , แพทช์และการเชื่อมโยงที่ไม่สามารถทำเองได้ทั้งหมดสี่ประเภทของตัวแทนสามารถเรียกใช้คำสั่ง netlogo . ทั้งยังสามารถเรียกใช้ " กระบวนการ " ขั้นตอนรวมเป็นชุดของคำสั่ง netlogo เป็นเดียวใหม่สั่งที่คุณกำหนดตอนนี้คุณจะได้เรียนรู้ที่จะเขียนขั้นตอนที่ให้เต่าเคลื่อนที่กิน สืบพันธุ์ แล้วก็ตาย นอกจากนี้คุณยังจะได้เรียนรู้วิธีที่จะทำให้การตรวจสอบ , เลื่อน , และแปลง นางแบบที่เราจะสร้างเป็นแบบจำลองระบบนิเวศง่ายไม่แตกต่างจากการแกะหมาป่าจาก # กวดวิชา 1
การแปล กรุณารอสักครู่..
