org.jscience.computing.ai.planning
Class Domain

java.lang.Object
  extended by org.jscience.computing.ai.planning.Domain

public abstract class Domain
extends java.lang.Object

Each domain at run time is represented as a class derived from this abstract class.


Field Summary
protected  Axiom[][] axioms
          The axioms in this domain.
protected  java.lang.String[] compoundTasks
          The String names of compound tasks that appear in the domain description.
protected  java.lang.String[] constants
          The String names of constant symbols that appear in the domain description.
protected  Method[][] methods
          The methods in this domain.
protected  Operator[][] ops
          The operators in this domain.
protected  java.lang.String[] primitiveTasks
          The String names of primitive tasks that appear in the domain description.
protected  java.lang.String[] problemConstants
          The String names of constant symbols that appear in the problem description.
 
Constructor Summary
Domain()
           
 
Method Summary
 Axiom[][] getAxioms()
          This function returns the axioms in this domain.
 java.lang.String getConstant(int idx)
          This function returns the String representation of a given constant symbol that appears in the domain description, the problem description, or both.
 java.lang.String[] getPrimitiveTasks()
          This function returns an array of the String representations of all the primitive tasks in the domain description.
 void setProblemConstants(java.lang.String[] inp)
          This function sets the array of String representations of constant symbols that do not appear in the domain description but in the planning problem that is being solved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

axioms

protected Axiom[][] axioms
The axioms in this domain. The array is indexed by first the predicate each axiom can prove, and second the order the axioms that prove the same predicate appear in the domain description.


compoundTasks

protected java.lang.String[] compoundTasks
The String names of compound tasks that appear in the domain description. These Strings are only used to print the task lists, since the compound tasks are mapped to integers at compile time. The same integers are used to index this array.


constants

protected java.lang.String[] constants
The String names of constant symbols that appear in the domain description. These Strings are only used to print the constant symbols, since the constant symbols are mapped to integers at compile time. The same integers are used to index this array.


methods

protected Method[][] methods
The methods in this domain. The array is indexed by first the compound task each method can decompose, and second the order the methods that decompose the same compound task appear in the domain description.


ops

protected Operator[][] ops
The operators in this domain. The array is indexed by first the primitive task each operator can achieve, and second the order the operators that achieve the same primitive task appear in the domain description.


primitiveTasks

protected java.lang.String[] primitiveTasks
The String names of primitive tasks that appear in the domain description. These Strings are only used to print the task lists, since the primitive tasks are mapped to integers at compile time. The same integers are used to index this array.


problemConstants

protected java.lang.String[] problemConstants
The String names of constant symbols that appear in the problem description. These Strings are only used to print the constant symbols, since the constant symbols are mapped to integers at compile time. The same integers are used to index this array.

Constructor Detail

Domain

public Domain()
Method Detail

getAxioms

public Axiom[][] getAxioms()
This function returns the axioms in this domain.

Returns:
the axioms in this domain.

getConstant

public java.lang.String getConstant(int idx)
This function returns the String representation of a given constant symbol that appears in the domain description, the problem description, or both.

Parameters:
idx - the integer equivalent of the constant symbol.
Returns:
the String representation of the constant symbol.

getPrimitiveTasks

public java.lang.String[] getPrimitiveTasks()
This function returns an array of the String representations of all the primitive tasks in the domain description. This list is used to print the plans after they are found.

Returns:
the array of String representations of the primitive tasks in the domain.

setProblemConstants

public void setProblemConstants(java.lang.String[] inp)
This function sets the array of String representations of constant symbols that do not appear in the domain description but in the planning problem that is being solved.

Parameters:
inp - the array of String representations of constant symbols.