Annotation Interface TRADEEffect


Annotation used to specify an effect of an action. Can be repeated. The predicates in the effect array will be added to the StateMachine/Belief. A predicate can be specified as observable, by adding it to the observable array. In this case, it will first be observed that the effect does indeed apply by calling an observer, e.g. Vision. If the predicate cannot be observed, it will not be added to the StateMachine/Belief and the corresponding action will fail. A predicate can be specified as a side-effect by adding it to the sideEffect array. In this case, the predicate will not be a part of the post condition of an action and will not be available to call the action. An effect can retract a predicate by placing it within a not() operator, e.g. not(on(table,mug)) will retract on(table,mug). Examples: - Standard effect. The free variables (?locA, ?locB) will be bound before assertion/retraction. \ @Effect(effects={"at(car,?locB), not(at(car,?locA))"}, type = EffectType.SUCCESS) - Same as above but at(car,?locB) has to be observed before assertion, e.g. through Vision. \ @Effect(effects={"at(car,?locB), not(at(car,?locA))"}, type = EffectType.SUCCESS, observable={"at(car,?locB)"})