A Knowledge is a class so, user can add special methods that will be used by Context and Rules.
Variables can also be declared here.
From a compound object code, using the getTemperature() method (see picture below) would be done this way: K:getTemperature()
Any public variable is accessible from the logic objects (i.e: K:casualties_count)
Private data/methods shall be reserved for Knowledge storage/process only.
User parameters //&& can be defined in a Knowledge and will generate an interface in the corresponding behavior symbol or the Entity. This can be very useful when defining a general purpose Knowledge that will rely on parameters that will change from one entity to one another.
For example, a Knowledge Protect will be using some parameters like speed, level, duration, etc. and each Entity using this Protect Knowledge will overwrite default values of these parameters.
Put here the code that is needed at every phase of the Knowledge. Used mainly to initialize the internal data and parameters used by the compound objects.
The initialization function is called for each instance of the Knowledge.
INIT: called once at creation time, for each entity that uses this Knowledge.
RESET: called several times, each time the Knowledge is activated.
Refer to the Developer Guide for more details on system phases/events.