Java Doc for AllocationResult.java in  » Science » Cougaar12_4 » org » cougaar » planning » ldm » plan » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.planning.ldm.plan 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cougaar.planning.ldm.plan.AllocationResult

AllocationResult
public class AllocationResult implements AspectType,AuxiliaryQueryType,Serializable,Cloneable(Code)
The "result" of allocating a task.



Constructor Summary
public  AllocationResult(double rating, boolean success, AspectValue[] aspectvalues)
     Constructor that takes a result in the form of AspectValues (NON-PHASED). Subclasses of AspectValue, such as TypedQuantityAspectValue are allowed.
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  aspectvalues - The AspectValues(can be aspectvalue subclasses) that represent the results.
public  AllocationResult(double rating, boolean success, int[] keys, double[] values)
    
public  AllocationResult(double rating, boolean success, AspectValue[] rollupavs, Enumeration allresults)
    
public  AllocationResult(double rating, boolean success, int[] keys, double[] values, Enumeration allresults)
    
public  AllocationResult(double rating, boolean success, AspectValue[] rollupavs, Collection phasedresults)
     Constructor that takes a PHASED result in the form of AspectValues. Subclasses of AspectValue, such as TypedQuantityAspectValue are allowed.
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  rollupavs - The Summary (or rolled up) AspectValues that represent the results.
Parameters:
  phasedresults - A Collections of the phased results.
public  AllocationResult(AllocationResult ar1, AllocationResult ar2)
     Construct a merged AllocationResult containing AspectValues from two AllocationResults.

Method Summary
public  voidaddAuxiliaryQueryInfo(int aqtype, String data)
     Set a single AuxiliaryQueryType and its data (String).
public  StringauxiliaryQuery(int aqtype)
     Return the String representing the auxilliary piece of data that matches the query type given in the argument.
public  Objectclone()
    
public static  AspectValue[]convertToAVA(int[] types, double[] values)
    
public  AspectValue[]difference(Preference[] prefs)
    
public  StringgetAspectTypeFromArray(int i)
    
public  int[]getAspectTypes()
     A Collection of AspectTypes representative of the type and order of the aspects in each the result.
public  String[]getAspectTypesAsArray()
    
public  AspectValuegetAspectValue(int aspectType)
    
public  AspectValue[]getAspectValueResults()
     A collection of AspectValues that represent the result for each preference.
public  doublegetConfidenceRating()
     double The confidence rating of this result.
public  ListgetPhasedAspectValueResults()
     A List of Lists that represent each phased result in the form of AspectValues. If the result is not phased, use getAspectValueResults() A List.
public  EnumerationgetPhasedResults()
     A collection of arrays that represents each phased result. If the result is not phased, use AllocationResult.getResult()

Warning!!! Not all AspectValues can be simply represented as a double.

public  double[][]getPhasedResultsAsArray()
     Return phased results.

Warning!!! Not all AspectValues can be simply represented as a double.

public  double[]getPhasedResultsFromArray(int i)
     Return a particular phase of a phased result as an array of doubles.

Warning!!! Not all AspectValues can be simply represented as a double.

public  double[]getResult()
     A collection of doubles that represent the result for each AspectType.
public  StringgetResultFromArray(int i)
    
public  String[]getResultsAsArray()
    
public  doublegetValue(int aspectType)
     Get the result with respect to a given AspectType.
public  booleanisDefined(int aspectType)
     Quick check to see if one aspect is defined as opposed to looking through the AspectType array.
public  booleanisEqual(AllocationResult that)
     checks to see if the AllocationResult is equal to this one.
public  booleanisPhased()
    
public  booleanisSuccess()
     boolean Represents whether or not the allocation was a success.
public static  AllocationResultnewAllocationResult(double rating, boolean success, AspectValue[] avs)
     Factory that takes a result in the form of AspectValues (NON-PHASED). Subclasses of AspectValue, such as TypedQuantityAspectValue are allowed.
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  avs - The AspectValues(can be aspectvalue subclasses) that represent the results.
public static  AllocationResultnewAllocationResult(double rating, boolean success, AspectValue[] rollupavs, Collection phasedresults)
     AllocationResult factory that takes a PHASED result in the form of AspectValues. Subclasses of AspectValue, such as TypedQuantityAspectValue are allowed.
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  rollupavs - The Summary (or rolled up) AspectValues that represent the results.
Parameters:
  phasedresults - A Collections of the phased results.
public static  AllocationResultnewAllocationResult(AllocationResult ar1, AllocationResult ar2)
     Construct a merged AllocationResult containing AspectValues from two AllocationResults.
public  StringtoString()
    


Constructor Detail
AllocationResult
public AllocationResult(double rating, boolean success, AspectValue[] aspectvalues)(Code)
Constructor that takes a result in the form of AspectValues (NON-PHASED). Subclasses of AspectValue, such as TypedQuantityAspectValue are allowed.
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  aspectvalues - The AspectValues(can be aspectvalue subclasses) that represent the results.



AllocationResult
public AllocationResult(double rating, boolean success, int[] keys, double[] values)(Code)



AllocationResult
public AllocationResult(double rating, boolean success, AspectValue[] rollupavs, Enumeration allresults)(Code)
Simple Constructor for a PHASED result
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  rollupavs - The Summary (or rolled up) AspectValues that represent the results.
Parameters:
  allresults - An Enumeration of either AspectValue[]s or Collections.



AllocationResult
public AllocationResult(double rating, boolean success, int[] keys, double[] values, Enumeration allresults)(Code)



AllocationResult
public AllocationResult(double rating, boolean success, AspectValue[] rollupavs, Collection phasedresults)(Code)
Constructor that takes a PHASED result in the form of AspectValues. Subclasses of AspectValue, such as TypedQuantityAspectValue are allowed.
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  rollupavs - The Summary (or rolled up) AspectValues that represent the results.
Parameters:
  phasedresults - A Collections of the phased results. The Collection should containone Collection or AspectValue[] of AspectValues for each phase of the results.



AllocationResult
public AllocationResult(AllocationResult ar1, AllocationResult ar2)(Code)
Construct a merged AllocationResult containing AspectValues from two AllocationResults. If both arguments have the same aspects, the values from the first (dominant) result are used. The result is never phased.




Method Detail
addAuxiliaryQueryInfo
public void addAuxiliaryQueryInfo(int aqtype, String data)(Code)
Set a single AuxiliaryQueryType and its data (String).
Parameters:
  aqtype - The AuxiliaryQueryType
Parameters:
  data - The string associated with the AuxiliaryQueryType
See Also:   org.cougaar.planning.ldm.plan.AuxiliaryQueryType



auxiliaryQuery
public String auxiliaryQuery(int aqtype)(Code)
Return the String representing the auxilliary piece of data that matches the query type given in the argument.
Parameters:
  aqtype - The AuxiliaryQueryType you want the data for. String The string representing the data matching the type requested Note: may return null if nothing was defined
See Also:   org.cougaar.planning.ldm.plan.AuxiliaryQueryType
throws:
  IllegalArgumentException - if the int passed in as an argument is not a definedAuxiliaryQueryType



clone
public Object clone()(Code)



convertToAVA
public static AspectValue[] convertToAVA(int[] types, double[] values)(Code)
Utility method to help conversion of old code to new usage



difference
public AspectValue[] difference(Preference[] prefs)(Code)



getAspectTypeFromArray
public String getAspectTypeFromArray(int i)(Code)



getAspectTypes
public int[] getAspectTypes()(Code)
A Collection of AspectTypes representative of the type and order of the aspects in each the result. int[] The array of AspectTypes
See Also:   org.cougaar.planning.ldm.plan.AspectType
See Also:   



getAspectTypesAsArray
public String[] getAspectTypesAsArray()(Code)



getAspectValue
public AspectValue getAspectValue(int aspectType)(Code)
Get the AspectValue of the result with the specified type *



getAspectValueResults
public AspectValue[] getAspectValueResults()(Code)
A collection of AspectValues that represent the result for each preference. Note that subclasses of AspectValue such as TypedQuantityAspectValue may be used. If this was not defined through a constructor, one will be built from the result and aspecttype arrays. In this case only true AspectValue objects will be build (no subclasses of AspectValues). The AspectValues of a failed allocation may be set by the Allocator with values that would be more likely to be successful. The Expander can use these new values as suggestions when resetting the Preferences.



getConfidenceRating
public double getConfidenceRating()(Code)
double The confidence rating of this result.



getPhasedAspectValueResults
public List getPhasedAspectValueResults()(Code)
A List of Lists that represent each phased result in the form of AspectValues. If the result is not phased, use getAspectValueResults() A List. If the AllocationResult is not phased, will return null.



getPhasedResults
public Enumeration getPhasedResults()(Code)
A collection of arrays that represents each phased result. If the result is not phased, use AllocationResult.getResult()

Warning!!! Not all AspectValues can be simply represented as a double. Use of this method with such AspectValues is undefined. Enumeration




getPhasedResultsAsArray
public double[][] getPhasedResultsAsArray()(Code)
Return phased results.

Warning!!! Not all AspectValues can be simply represented as a double. Use of this method with such AspectValues is undefined. an array of an array of doubles




getPhasedResultsFromArray
public double[] getPhasedResultsFromArray(int i)(Code)
Return a particular phase of a phased result as an array of doubles.

Warning!!! Not all AspectValues can be simply represented as a double. Use of this method with such AspectValues is undefined. the i-th phase as double[]




getResult
public double[] getResult()(Code)
A collection of doubles that represent the result for each AspectType. If the result is phased, the results are summarized.

Warning!!! Not all AspectValues can be simply represented as a double. Use of this method with such AspectValues is undefined. double[]




getResultFromArray
public String getResultFromArray(int i)(Code)



getResultsAsArray
public String[] getResultsAsArray()(Code)



getValue
public double getValue(int aspectType)(Code)
Get the result with respect to a given AspectType. If the AllocationResult is phased, this method will return the summary value of the given AspectType.

Warning!!! Not all AspectValues can be simply represented as a double. Use of this method with such AspectValues is undefined.
Parameters:
  aspectType - double The result of a given dimension. For example, getValue(AspectType.START_TIME) returns the Task start time.Note : results are not required to contain data in each dimension - check the array of defined aspecttypes or ask if a specificdimension is defined. If there is a request for a value of anundefined aspect, an IllegalArgumentException will be thrown.
See Also:   org.cougaar.planning.ldm.plan.AspectType




isDefined
public boolean isDefined(int aspectType)(Code)
Quick check to see if one aspect is defined as opposed to looking through the AspectType array.
Parameters:
  aspectType - The aspect you are checking boolean Represents whether this aspect is defined
See Also:   org.cougaar.planning.ldm.plan.AspectType



isEqual
public boolean isEqual(AllocationResult that)(Code)
checks to see if the AllocationResult is equal to this one.



isPhased
public boolean isPhased()(Code)
boolean Represents whether or not the allocationresult is phased.



isSuccess
public boolean isSuccess()(Code)
boolean Represents whether or not the allocation was a success. If any Constraints were violated by the allocation, then the isSuccess() method returns false and the Plugin that created the subtask shouldrecognize this event. The Expander may re-expand, change the Constraints or Preferences, or indicate failure to its superior. The AspectValues of a failed allocation may be set by the Allocatorwith values that would be more likely to be successful. The Expander can use these new values as suggestions when resetting the Preferences



newAllocationResult
public static AllocationResult newAllocationResult(double rating, boolean success, AspectValue[] avs)(Code)
Factory that takes a result in the form of AspectValues (NON-PHASED). Subclasses of AspectValue, such as TypedQuantityAspectValue are allowed.
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  avs - The AspectValues(can be aspectvalue subclasses) that represent the results.



newAllocationResult
public static AllocationResult newAllocationResult(double rating, boolean success, AspectValue[] rollupavs, Collection phasedresults)(Code)
AllocationResult factory that takes a PHASED result in the form of AspectValues. Subclasses of AspectValue, such as TypedQuantityAspectValue are allowed.
Parameters:
  rating - The confidence rating of this result.
Parameters:
  success - Whether the allocationresult violated any preferences.
Parameters:
  rollupavs - The Summary (or rolled up) AspectValues that represent the results.
Parameters:
  phasedresults - A Collections of the phased results. The Collection should containone Collection or AspectValue[] of AspectValues for each phase of the results.



newAllocationResult
public static AllocationResult newAllocationResult(AllocationResult ar1, AllocationResult ar2)(Code)
Construct a merged AllocationResult containing AspectValues from two AllocationResults. If both arguments have the same aspects, the values from the first (dominant) result are used. The result is never phased.



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.