views:

25

answers:

1

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

A: 

re: "i tried putting a switch in but catalyst has already been defined", you'll need to give the switch a different name besides "catalyst". the same name can't be used to mean two different things, and "catalyst" is already in use as the singular form of the breed.

turtles are always visible by default unless you do something to hide them, so I'm not understand the part of your question that has to do with "how to make the catalyst visible". they are visible. if you do "crt catalysts 100" all the catalysts are on the same spot, so it might not look like there are 100 of them. try spreading them around the world.

Seth Tisue