CSCI 1006 Lecture Notes - Lecture 2: Netlogo, Boolean Expression

20 views2 pages
To make a monitor
Count {turtles or patches} with [{p}color = {blue}]
- there is no cond in netlogo, so you have to do nested ifelse functions
- ifelse {Boolean expression}
[does this command if BE = true]
[does this command if BE = false or another ifelse]
* Distinguish between contexts and choose the most appropriate for a situation
- setup, crt, set variable are usually in the observer context
- if you are telling a turtle or patch to do something, it should be in those respective
contexts
- remember that ask turtles [] or ask patches [] will ask ALL turtles and patches to do
something, and will not ask turtles with a different breed.
RANDOM FUNCTIONS
to wiggle
lt random #
rt random #
fd #
end
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents