NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

globals [loTemps hiTemps] ; Create global variables loTemps, and hiTemps.
extensions [csv] ; Access CSV extension.
patches-own [rockTemp probRise] ; Create variable 'rockTemp' for each patch.

to setup ; To setup the simulation,
ca ; clear workspace,

file-close-all ; close any open files,

init-globals ; run init-globals script,

ask patches [setup-environment] ; patches run setup-environment script,

reset-ticks ; Resets ticks (day) to 0.
end ; End script.



to go ; To begin simulation,
set loTemps remove-item 0 loTemps ; list of vectors object loTemps will remove the first item on the list,
set hiTemps remove-item 0 hiTemps ; list of vectors object hiTemps will remove the first item on the list,

ask patches
[set probRise random-float 1
setup-environment] ; patches run setup-environment script,

tick ; tick counter advances by 1, plots are reset,

if ticks = 295 [stop]
end ; End script.



to init-globals ; To initiate global environment variables:
;;;ADD CODE ONE FILE
set loTemps (list) ; Create list object loTemps,
file-open "loZone.csv" ; open the file 'lozonew_90_455.csv' from the file directory,
while [not file-at-end?][set loTemps lput file-read loTemps] ; while file is not at the end, add following vector to list loTemps from read file.
file-close ; Close this file.

set hiTemps (list); create list object hiTemps,
file-open "hiZone.csv" ; open the file 'hizonew_90_455.csv' from the file directory,
while [not file-at-end?][set hiTemps lput file-read hiTemps] ; while file is not at the end, add following vector to list hiTemps from read file.
file-close ; Close this file.
end ; End script.


to setup-environment ; To setup environment:
ifelse (pycor <= 9) ; If patch coordinate is less than or equal to 10,
[set rockTemp one-of (one-of (sublist loTemps 0 3))] ; set rockTemp to a random value from the first vector in the list loTemps, plus the slide adjusted rise-in-temperature value on the interface.
[set rockTemp one-of (one-of (sublist hiTemps 0 3))] ; Else, set rockTemp to a random value from the first vector in the list loTemps, plus the slide adjusted rise-in-temperature value on the interface.

if (probRise < probability-of-temperature)
[set rockTemp rockTemp + rise-in-temperature]

ifelse (rockTemp <= 16)
[set pcolor sky]
[ifelse (rockTemp <= 29)
[set pcolor 47]
[set pcolor pink]]
end
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.