1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package zeus.actors.rtn.util;
25
26 import java.util.*;
27 import zeus.util.*;
28
29 /***
30 * This class holds information about the contract status of individual goals of
31 * a collection of goals. For example, an agent might want to contract out the
32 * following three goals {g1,g2,g3} which might be held in the external slot of
33 * the {@link GraphStruct} structure (i.e. gs.external = {g1,g2,g3}).<p>
34 * During contracting, a {@link DStruct} will be created for each subgoal g1, ... g3,
35 * and the subgoals contracted out in parallel.
36 */
37
38 public class DStruct {
39 /***
40 * A vector containing a single goal being contracted out
41 */
42 public Vector goal = null;
43
44 /***
45 * The list of agents that our agent will send a call for proposals to.
46 */
47 public Vector agents = null;
48
49 /***
50 * A reference to the original coordination structure containing the root goal
51 */
52 public GraphStruct gs = null;
53
54 /***
55 * The list of agent to avoid sending call for proposals to. For example,
56 * during replanning, this list will contain agents that have already failed
57 * to achieve the goal.
58 */
59 public Vector ignore = null;
60
61 /***
62 * The results of the delegation process. This vector will typically
63 * comprise {@link DelegationStruct} objects.
64 */
65 public Vector results = new Vector();
66
67 public String toString() {
68 return "(goal " + goal + "\n " +
69 " agents " + agents + "\n " +
70 " gs <gs>\n " +
71 " results " + results + "\n " +
72 " ignore " + ignore + "\n " + ")";
73 }
74 }