Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- to go
- ; agents movement
- move-comiloes
- move-limpadores
- move-medicos
- ; Check turtles energy
- ask turtles
- [
- if energia <= 0 [ die ]
- ]
- ; stop if all turtles are dead
- if count turtles = 0 [
- file
- stop
- ]
- if ticks > 50000 [
- file
- stop
- ]
- ; tick tock
- tick
- end
- to file
- ifelse file-exists? "EXP_A_BASE.csv"
- [
- file-open "EXP_A_BASE.csv"
- file-print (list ";" ticks ";" count limpadores ";" count comiloes ";" residuos-accumulated ";" residuos-accumulated-cells ";")
- file-close
- ]
- [
- file-open "EXP_A_BASE.csv"
- file-print (";Ticks;Limpadores;Comiloes;Residuos Acumulados;Celulas Residuos Acumulados")
- file-print (list ";" ticks ";" count limpadores ";" count comiloes ";" residuos-accumulated ";" residuos-accumulated-cells ";")
- file-close
- ]
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement