edu.udo.cs.ie.cowbots.planer
Class PlanGenerator

Package class diagram package PlanGenerator
java.lang.Object
  extended by edu.udo.cs.ie.cowbots.planer.PlanGenerator

public class PlanGenerator
extends java.lang.Object

generates plans by invoking DLV, A* or createWaypoints


Field Summary
(package private)  DLV dlv
           
(package private)  java.lang.String myself
           
(package private)  int xAct
           
(package private)  int xGoal
           
(package private)  int yAct
           
(package private)  int yGoal
           
 
Constructor Summary
PlanGenerator()
           
 
Method Summary
private  void computeNextPosition(java.lang.String dir)
           
private  ELPLiteral computeStartLocation(ELP elp, java.lang.String who)
          computes the location the agent is at
private  void deleteOldWPs(TransitionSystem ts)
           
 java.lang.String generate(TransitionSystem ts, ELPLiteral goal, java.lang.String[] task)
          Generates a KProgram consisting of the knowledge of the agent and a given goal
private  int getSuccsteps(ELP elp)
           
private  KProgram initHigherPlanning(ELP elp, ELPAtom goal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dlv

DLV dlv

myself

java.lang.String myself

xAct

int xAct

yAct

int yAct

xGoal

int xGoal

yGoal

int yGoal
Constructor Detail

PlanGenerator

public PlanGenerator()
Method Detail

generate

public java.lang.String generate(TransitionSystem ts,
                                 ELPLiteral goal,
                                 java.lang.String[] task)
Generates a KProgram consisting of the knowledge of the agent and a given goal

Parameters:
ts -
goal - Position the agents want to be
task - The task the agents want to fulfill: scouted, drivenCow etc.
args -
Returns:

getSuccsteps

private int getSuccsteps(ELP elp)

deleteOldWPs

private void deleteOldWPs(TransitionSystem ts)
                   throws RevisionFailedException
Throws:
RevisionFailedException

computeStartLocation

private ELPLiteral computeStartLocation(ELP elp,
                                        java.lang.String who)
computes the location the agent is at

Parameters:
elp - knowledge of the agent
who - the agent/cow for which start location is computed
Returns:

computeNextPosition

private void computeNextPosition(java.lang.String dir)

initHigherPlanning

private KProgram initHigherPlanning(ELP elp,
                                    ELPAtom goal)