I am working on the Coin Toss and I am wondering what the idea behind asking patch to flip the coin verses asking the observer? When is it better to ask different agents to perform the task over the observer?
With regards to the coin-toss exercise, I ran into a few challenges during the exercise:Firstly, when adding sliders in Part II, I wasn't really sure how to add n-flips and n-trials to my go procedure. Instead I added new procedures that seemed to work fine--but they were not under go procedure.
Secondly, I'm having trouble implementing #6 on Part III. As in tutorial #3, I asked patches to count patches with pcolor green, but Netlogo is giving me an error with "count" highlighted (error: expected command). Does this have to do with the fact that I am asking patches to count green patches rather than the observer?
Lastly, I'm not sure if I'm just tired from a long week, but I am just not understanding what is meant by "append that number to the n-heads list."
let x 50 if (x != 51) [error "oops"]
This course will have a TA, Dongping Xie. Please use this thread to discuss NetLogo programming with Dongping. This can include questions about the assignments. Naturally Dongping cannot simply provide answers for the assignments, but he can provide hints and guidance.
I will not follow this thread; it is not part of the graded discussions. Additionally, you should feel free to take "off list" any discussions that you believe are of interest only to you and not to the rest of the class. However, please realize that most questions about NetLogo programming will interest other members of the class.
Thank you,
Alan Isaac
Dongping can we set up a skype session? I am having some troubles making sure I am understanding how to use the coding for my main project which is based on the financial Bubbles model that already exists.
Agents are all endowed with some initial wealth bit−1 on which they can earn the international return r at the end of the period should they choose to invest it in capital markets. Initially, we assume that bit−1 = bt−1 for all i.
;;ai: (where will they be used?)
;;ai: for now it is not clear you need YDOM and YFDI to be global
let fnctn task [function7 ?]
let intgrl numanal:romberg-integrate 0.0 3.0 fnctn
to-report function7 [ x ]
report e ^ (-3 * x)
end
numanal:romberg-inegrate takes three arguments, the lower and upper bounds of the definite integral (here 0.0 and 3.0), and a task that evaluates the function at any given value of the integrating variable. In the example above, the function to be integrated is e^(-3x) and is evaluated in the reporter, function7, which is then assigned to the task variable, fnctn. romberg-integrate returns the value of the definite integral.
One thing that was not clear in the paper is whether they are actually evolving wealth over time, so that "initially" just means "at time 0".
Sorry we have an additional question. We are getting into the nitty-gritty of the equations now so we are discovering some gaps in our knowledge about the variables and the equations. The wage equation, right under equation 2, is comprised on all constants but we think that wage should vary in order for flow between the sectors. Doesn't it make sense for the wage to change after each period?
to-report labor-supply
report sum [ability] of patches with [ability < break-even]
end
When using the create-turtles command, are the steps taken within this block limited only to the turtles created in this block?
This course will have a TA, Dongping Xie. Please use this thread to discuss NetLogo programming with Dongping. This can include questions about the assignments. Naturally Dongping cannot simply provide answers for the assignments, but he can provide hints and guidance.
I will not follow this thread; it is not part of the graded discussions. Additionally, you should feel free to take "off list" any discussions that you believe are of interest only to you and not to the rest of the class. However, please realize that most questions about NetLogo programming will interest other members of the class.
Thank you,
Alan Isaac
let %n min (list mynumber count myagents)
ask n-of %n myagents [...]