|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlogist.plan.PlanVerifier
public class PlanVerifier
A verifier that can check various constraints on Plans.
The set of constraints that are actually checked depends on the exercise (i.e. type of agent).
| Constructor Summary | |
|---|---|
PlanVerifier(Topology topology,
TaskSet availableTasks)
Creates a plan verifier for a given topology and task set. |
|
| Method Summary | |
|---|---|
java.lang.String[] |
deliver(Task task)
A delivery pattern |
java.lang.String[] |
moveTo(Topology.City targetCity)
A move pattern |
java.lang.String[] |
pickup(Task task)
A pickup pattern |
void |
verifyDelivery()
Verifies that the plan delivers all tasks that were picked up. |
void |
verifyPickup()
Verifies that the plan picks up all available tasks. |
void |
verifyPlan(Vehicle vehicle,
Plan plan)
Verifies that a sequence of actions is valid for a vehicle. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlanVerifier(Topology topology,
TaskSet availableTasks)
topology - The topologyavailableTasks - The set of tasks available for pickup| Method Detail |
|---|
public void verifyPlan(Vehicle vehicle,
Plan plan)
vehicle - The vehicle executing the planplan - The planpublic void verifyPickup()
IllegalPlanException - If this constraint is violatedpublic void verifyDelivery()
IllegalPlanException - If this constraint is violatedpublic java.lang.String[] moveTo(Topology.City targetCity)
ActionHandler
moveTo in interface ActionHandler<java.lang.String[]>targetCity - The target citypublic java.lang.String[] pickup(Task task)
ActionHandler
pickup in interface ActionHandler<java.lang.String[]>task - The task being picked uppublic java.lang.String[] deliver(Task task)
ActionHandler
deliver in interface ActionHandler<java.lang.String[]>task - The task being delivered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||