netlogo programming question - catalyst implementation part 2

Posted by user286190 on Stack Overflow See other posts from Stack Overflow or by user286190
Published on 2010-03-07T17:27:00Z Indexed on 2010/04/01 15:23 UTC
Read the original article Hit count: 542

hi

the catalyst speeds up the reaction but remains unchanged after the reaction has taken place

i tried the following code

breed [catalysts catalyst]

breed [chemical-x chemical-x]

;then the forward reaction is sped up by the existence of catalysts

to react-forward

let num-catalysts count catalysts ;speed up by num-catalysts

;...

end

and it works fine but I want to make it so that the catalyst can be switched on and off with the 'switch' button ..so one can see the effects with and without the catalyst..i tried putting a switch in but catalyst has already been defined

Also i want to make the catalyst visible so one can see it in the actual implementation (in the world) like making it a turtle is there are another way to implement this apart from using breeds

i tried making the catalyst a turtle but it doesnt work

; Make catalyst visible in implementation

clear-all

crt catalysts 100

ask catalysts [ set color white ]

show [breed] of one-of catalysts ; prints catalysts

any help will be greatly appreciated thank you

© Stack Overflow or respective owner

Related posts about netlogo

Related posts about computer-science