edu.udo.cs.ie.cowbots.planer
Class PlanGenerator
java.lang.Object
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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dlv
DLV dlv
myself
java.lang.String myself
xAct
int xAct
yAct
int yAct
xGoal
int xGoal
yGoal
int yGoal
PlanGenerator
public PlanGenerator()
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 betask
- 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 agentwho
- 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)