Class CompiledTrigger
java.lang.Object
edu.uky.cs.nil.sabre.Trigger
edu.uky.cs.nil.sabre.comp.CompiledTrigger
- All Implemented Interfaces:
CompiledEvent, Event, Logical, Simplifiable, Signed, Unique, Serializable, Comparable<Logical>
A compiled trigger is a
ground trigger which defines a unique ID number that
corresponds to the trigger's index in its compiled problem's set of events, whose precondition
is in disjunctive normal form, and whose effect is a clause.- Author:
- Stephen G. Ware
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intA unique ID number that corresponds to this trigger's index inits compiled problem's set of eventsfinal Disjunction<Clause<Precondition>> The trigger'spreconditioninin disjunctive normal form -
Constructor Summary
ConstructorsConstructorDescriptionCompiledTrigger(int id, Signature signature, Disjunction<Clause<Precondition>> precondition, Clause<Effect> effect, String comment) Creates a new compiled trigger. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns a logical expression which becomes true as a result of the event occurring.intgetID()Returns the event's unique ID number, which should correspond to this event's index in itscompiled problem's set of events.Returns a logical expression which must evaluate totruebefore the event can occur.inthashCode()booleanisGround()Tests whether this logical formula is ground, which means that it contains novariables.simplify()Returns a logically equivalent but smaller, simpler, or more convenient form of this logical formula.Methods inherited from class Trigger
apply, compareTo, getComment, getSignature, toStringMethods inherited from interface CompiledEvent
getEffectMethods inherited from interface Event
apply, getCommentMethods inherited from interface Logical
collect, collect, collect, distinguish, find, find, find, mustBeGround, occurs, substitute, substituteMethods inherited from interface Signed
compareTo, getSignature
-
Field Details
-
id
public final int idA unique ID number that corresponds to this trigger's index inits compiled problem's set of events -
precondition
The trigger'spreconditioninin disjunctive normal form -
effect
-
-
Constructor Details
-
CompiledTrigger
public CompiledTrigger(int id, Signature signature, Disjunction<Clause<Precondition>> precondition, Clause<Effect> effect, String comment) Creates a new compiled trigger.- Parameters:
id- the trigger's unique ID numbersignature- the signatureprecondition- the precondition, in disjunctive normal formeffect- the effect, as a clausecomment- the comment
-
-
Method Details
-
equals
-
hashCode
-
isGround
-
simplify
Description copied from interface:SimplifiableReturns a logically equivalent but smaller, simpler, or more convenient form of this logical formula.- Specified by:
simplifyin interfaceCompiledEvent- Specified by:
simplifyin interfaceEvent- Specified by:
simplifyin interfaceSimplifiable- Overrides:
simplifyin classTrigger- Returns:
- a smaller, simpler, or more convenient logical formula which is equivalent to this formula
-
getPrecondition
Description copied from interface:EventReturns a logical expression which must evaluate totruebefore the event can occur.- Specified by:
getPreconditionin interfaceCompiledEvent- Specified by:
getPreconditionin interfaceEvent- Overrides:
getPreconditionin classTrigger- Returns:
- a logical expression
-
getEffect
Description copied from interface:EventReturns a logical expression which becomes true as a result of the event occurring. -
getID
public int getID()Description copied from interface:CompiledEventReturns the event's unique ID number, which should correspond to this event's index in itscompiled problem's set of events.- Specified by:
getIDin interfaceCompiledEvent- Returns:
- the event's unique ID number
-