org.cougaar.tutorial.booksonline.util
Class BolAllocResAgg

java.lang.Object
  extended byorg.cougaar.tutorial.booksonline.util.BolAllocResAgg
All Implemented Interfaces:
org.cougaar.planning.ldm.plan.AllocationResultAggregator, org.cougaar.planning.ldm.plan.AspectType, java.io.Serializable

public class BolAllocResAgg
extends java.lang.Object
implements org.cougaar.planning.ldm.plan.AllocationResultAggregator

Simple Aggregator for AllocationResults specified with AspectValues. Particularly useful for results with TypedQuantityAspects. Does the right computation for workflows which are made up of equally important tasks with no inter-task constraints. START_TIME is minimized. END_TIME is maximized. DURATION is overall END_TIME - overall START_TIME. COST is summed. DANGER is maximized. RISK is maximized. QUANTITY is summed. INTERVAL is summed. TOTAL_QUANTITY is summed. TOTAL_SHIPMENTS is summed. CUSTOMER_SATISFACTION is averaged. TYPED_QUANTITY is summed for each type(asset). For AuxiliaryQuery information, if all the query values are the same across subtasks or one subtask has query info it will be place in the aggregate result. However, if there are conflicting query values, no information will be put in the aggregated result. returns null when there are no subtasks or any task has no result.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.cougaar.planning.ldm.plan.AllocationResultAggregator
org.cougaar.planning.ldm.plan.AllocationResultAggregator.DefaultARA, org.cougaar.planning.ldm.plan.AllocationResultAggregator.KeyHolder, org.cougaar.planning.ldm.plan.AllocationResultAggregator.Sum
 
Nested classes inherited from class org.cougaar.planning.ldm.plan.AspectType
org.cougaar.planning.ldm.plan.AspectType.Factory, org.cougaar.planning.ldm.plan.AspectType.Registry
 
Field Summary
 
Fields inherited from interface org.cougaar.planning.ldm.plan.AllocationResultAggregator
DEFAULT, hack, K012, K0126, K02, SIGNIFICANT_CONFIDENCE_RATING_DELTA, SUM
 
Fields inherited from interface org.cougaar.planning.ldm.plan.AspectType
_ASPECT_COUNT, _LAST_ASPECT, _STANDARD_ASPECTS, ASPECT_STRINGS, AspectFactories, CommonAspects, Cost, COST, CUSTOMER_SATISFACTION, CustomerSatisfaction, Danger, DANGER, Duration, DURATION, END_TIME, EndTime, Interval, INTERVAL, N_CORE_ASPECTS, Pod, POD, POD_DATE, PodDate, Quantity, QUANTITY, Readiness, READINESS, registry, Risk, RISK, START_TIME, StartTime, TimeAspects, TOTAL_QUANTITY, TOTAL_SHIPMENTS, TotalQuantity, TotalShipments, TYPED_QUANTITY, TypedQuantity, Undefined, UNDEFINED
 
Constructor Summary
BolAllocResAgg()
          Creates a new BolAllocResAgg object.
 
Method Summary
 org.cougaar.planning.ldm.plan.AllocationResult calculate(org.cougaar.planning.ldm.plan.Workflow wf, org.cougaar.planning.ldm.plan.TaskScoreTable tst, org.cougaar.planning.ldm.plan.AllocationResult currentar)
          Calculate allocation result
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BolAllocResAgg

public BolAllocResAgg()
Creates a new BolAllocResAgg object.

Method Detail

calculate

public org.cougaar.planning.ldm.plan.AllocationResult calculate(org.cougaar.planning.ldm.plan.Workflow wf,
                                                                org.cougaar.planning.ldm.plan.TaskScoreTable tst,
                                                                org.cougaar.planning.ldm.plan.AllocationResult currentar)
Calculate allocation result

Specified by:
calculate in interface org.cougaar.planning.ldm.plan.AllocationResultAggregator
Parameters:
wf - Workflow
tst - Task Score Table
currentar - Allocation Result
Returns:
Allocation Result