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

Section 3 - Agents and some user facilities

3.6 The self symbol


Browse the Producer type, create a prices category in the Initial iteration and a rule to set the initial price with antecedent:

and

notInferred

last week (producer self)\

profitTarget ?pt\

marginalCost ?margCost\

is ?initPrice (1 + ?pt / 100) * ?margCost

and consequent:

all week (price ?initPrice)

Notice the use of the symbol self in the first clause of the rule. This stands for the agents own name in the rule. self can also be used in the consequent. Of course, we do not have to check for the existence of the agent this week (as we did in yesterday's session) for it must exist in order to fire this rule!


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

Generated with CERN WebMaker