View Javadoc

1   /*
2   * The contents of this file are subject to the BT "ZEUS" Open Source 
3   * Licence (L77741), Version 1.0 (the "Licence"); you may not use this file 
4   * except in compliance with the Licence. You may obtain a copy of the Licence
5   * from $ZEUS_INSTALL/licence.html or alternatively from
6   * http://www.labs.bt.com/projects/agents/zeus/licence.htm
7   * 
8   * Except as stated in Clause 7 of the Licence, software distributed under the
9   * Licence is distributed WITHOUT WARRANTY OF ANY KIND, either express or 
10  * implied. See the Licence for the specific language governing rights and 
11  * limitations under the Licence.
12  * 
13  * The Original Code is within the package zeus.*.
14  * The Initial Developer of the Original Code is British Telecommunications
15  * public limited company, whose registered office is at 81 Newgate Street, 
16  * London, EC1A 7AJ, England. Portions created by British Telecommunications 
17  * public limited company are Copyright 1996-9. All Rights Reserved.
18  * 
19  * THIS NOTICE MUST BE INCLUDED ON ANY COPY OF THIS FILE
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  }