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

Section 2 - Modules, Time Levels and Lists

2.6 Time levels


First we are going to look at the time levels that are defined. In SDML time levels should be defined (but not necessarily activated) in the UniversalAgent type*1.

In the Agent: universe browser select the browse type command from the Browse menu. Select the Objects tag on the type browser that appears, click on the button by Instances of type: and select the type TimeLevel. It should look like this.

You will see that week is already defined as an instance of type TimeLevel. The order in which rulebase are done is quite complex. Broadly the initial rulebases are fired first, then the content rulebase is fired, then the final. If there is an active time level (in a suitable agent) then the content rulebase is repeatedly fired until a special clause is asserted to its database. Like so.

Since there is more than one time level (we have eternity and week) It looks like so:

The ordering becomes more complicated if we introduce more time levels and when you have sub-agents each with their own rulebases, but we will deal with these cases when we get to them.

Open a browser for the type of model. I have already put a comment in this, as well as some clause definitions and rule categories. Select the Rulebases tag. The controls for selecting the rulebases are just below the menus at the top. Try selecting different timelevels and types of rulebase from Content, Initial and Final.

Select the Initial eternity rulebase. In the time category enter a rule called activate time levels with the antecedent:

true

and the consequent:

all eternity (timeLevels [week])

This will set the time level week as active (for instances of ModelAgent) for all eternity.

SDML assumes clauses will be temporary unless told otherwise. If we had just put timeLevels [week] this would have only lasted for the shortest possible time period (in this case a week).


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

Generated with CERN WebMaker