SMAS 2.0bA Primer |
5. LISP Code for the Examples (Agents)
For our demo, we need to create 5 different agents. This can be done using the defagent macro as follows :
(defagent proxy :redefine t) (defagent factorial :redefine t) (defagent mul-1 :redefine t) (defagent mul-2 :redefine t) (defagent mul-3 :redefine t)
The defagent macro needs to know the name of the agent. the :redefine flag is optionnal and allows to redefine the agent if necessary. I.e., the option allows to reload the file in the environnement, which is a good idea during the design phase of a simulation.
Copyrignt Jean-Paul Barthès@UTC, 1998 Last update, Jan 99