[Next] [Previous] [Up] [Top] [Contents]

Section 2 - Modules, Time Levels and Lists

2.5 A sub-agent


We are going to introduce time into our modelling. In particular we are going to have the model be simulated over a number of notional weeks. Due to the special nature of the universe object in SDML this cannot simulate any time levels itself (other than eternity). So we are going to do our modelling in a sub-agent of the universe called model, which we have created specially. This is an instance of ModelAgent. It is generally good practice to do this and not do any substantial programming in the UniveralAgent as you may later want to embed the model you have created inside another simulation (or something).

Select the browse universe command from the Browse menu. On the Agent: universe browser click on the Location tab. It will look like this.

You will see that model is indeed a sub-agent on universe. Because you can have sub-agent of agents and sub-agents of sub-agents of agents etc. in SDML (more on this tomorrow) we need a general method of addressing objects in SDML. We use internet-style addressing for this. To refer to the model agent from anywhere in the simulation we can do so as model@universe (if only all internet addresses were as short). Directly inside the universe we can dispense with the @universe bit and refer to it simply as model (SDML will assume the rest depending on the context). This is analogous to when I e-mail Steve (who is within the MMU) - then the ".ac.uk" bit of his address is assumed and I can simply e-mail him as s.wallis@mmu.

Click on the model@universe sub-agent and use the command button to select browse sub-agent. If you select its Database tag you will find it is empty because no rules have been fired to assert anything.


An introduction to SDML - Bruce Edmonds - 13 JUL 99
[Next] [Previous] [Up] [Top] [Contents]

Generated with CERN WebMaker