|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlogist.task.Task
public final class Task
A task represents the unit of work in the pick up and delivery problem.
Tasks are created in batches at the beginning of each round according to a
TaskDistribution.
| Field Summary | |
|---|---|
Topology.City |
deliveryCity
The delivery location |
int |
id
A unique id of the task in the current round, in the range [0,numTasks). |
Topology.City |
pickupCity
The pickup location |
long |
reward
The reward for this task |
int |
weight
The weight of this task |
| Constructor Summary | |
|---|---|
Task(int id,
Topology.City source,
Topology.City destination,
long reward,
int weight)
For system use only. |
|
| Method Summary | |
|---|---|
java.util.List<Topology.City> |
path()
The cities on the shortest path from the source of this task (excluding) to the destination (including). |
double |
pathLength()
The length of the shortest path from the source of this task to the destination. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final int id
public final Topology.City pickupCity
public final Topology.City deliveryCity
public final long reward
public final int weight
| Constructor Detail |
|---|
public Task(int id,
Topology.City source,
Topology.City destination,
long reward,
int weight)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<Topology.City> path()
public double pathLength()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||