Netlogo Programming question - Chemical Equilibrium temperature and pressure implementation

Posted by user286190 on Stack Overflow See other posts from Stack Overflow or by user286190
Published on 2010-03-04T11:28:27Z Indexed on 2010/06/08 21:02 UTC
Read the original article Hit count: 385

Hi I am trying to code something in Netlogo..I am using an existing model Chemical Equilibrium and am trying to implement the following:

turtles-own [speed ]

ask turtles [

;; set velocity ( ambient-temperature = 30 )
;; fd velocity
if temp  > 40 [ "speed" increases of turtles  ]  
ifelse temperature < 30 [ speed of turtles decreases]

]

;; to temp

but it does not seem to work

(it temperature is more than 40 the speed of the turtles increases if the temperature is less than 30 the speed of the turtles decreases) temperature is a slider on the model

the same for pressure ask turtles [

;; if pressure > 50 then speed increases of turtles
;; if pressure < 50 then speed decreases of turtles

]

;; to pressure

thanks

© Stack Overflow or respective owner

Related posts about computer-science

Related posts about simulation