| java.lang.Object org.cougaar.logistics.plugin.inventory.InventoryModule org.cougaar.logistics.plugin.inventory.InventoryLevelGenerator org.cougaar.logistics.plugin.inventory.AllocationAssessor
AllocationAssessor | public class AllocationAssessor extends InventoryLevelGenerator (Code) | | AllocationAssessor module is a module of the InventoryPlugin looks at
Refill results and Inventory levels to allocate Withdraws
against the Inventories.
Right now this is implemented with first come first serve, but it
should be changed to allocate withdraws that have the highest score
first where the score is something like quantity * time late or
scoring function scores.
Note that this allocator does NOT allocate split shipments.
|
Inner Class :public class AllocPhase | |
Inner Class :public class TaskDeficit | |
Inner Class :public class ConstantRateBlock | |
Method Summary | |
protected void | allocateCountedEarlyProjections(int today_bucket, Inventory inventory, LogisticsInventoryPG thePG) Create best allocations for Projections that are counted but in the past. | protected void | allocateNotCountedProjections(Inventory inventory, LogisticsInventoryPG thePG) Create best allocations for Projections that are not being counted. | public void | compareResults(AllocationResult estimatedResult, Task withdraw, Inventory inv, LogisticsInventoryPG thePG) | protected void | createAllocations(int todayBucket, int endBucket, Inventory inv, LogisticsInventoryPG thePG) | public void | createPhasedAllocationResult(TaskDeficit td, Inventory inv, LogisticsInventoryPG thePG, boolean success) | public double | getBestBucketQty(Task task, LogisticsInventoryPG thePG, long time) | public AspectValue | getDemandRateAV(double amount, long millis) | public double | getQuantityForDuration(Rate r, long duration) | public void | reconcileInventoryLevels(Collection inventories) Called by the InventoryPlugin when we are processing in Backwards Flow
(which is allocation result notifications) to try and allocated
withdraw tasks. | public void | reconcileThePast(int today_bucket, LogisticsInventoryPG thePG) Update the inventory levels from time zero to today. | protected void | resetTrailingPointers() | protected boolean | shouldSkipMakingResult(Task task) | public double | taskQtyInBucket(Task task, int currentBucket, LogisticsInventoryPG thePG) | public void | updatePG(Task withdraw, LogisticsInventoryPG thePG) |
AllocationAssessor | public AllocationAssessor(InventoryManager imPlugin, Role role)(Code) | | Constructor for this module
Parameters: imPlugin - The Plugin calling this module. Parameters: role - The role the Plugin is playing. |
allocateCountedEarlyProjections | protected void allocateCountedEarlyProjections(int today_bucket, Inventory inventory, LogisticsInventoryPG thePG)(Code) | | Create best allocations for Projections that are counted but in the past.
These may need to be re-allocated in the past if the optempo changes
and these tasks are still counted.
Parameters: today_bucket - The current day of the society Parameters: inventory - The Inventory we are processing Parameters: thePG - This is the PG for the Inventory we are processing |
allocateNotCountedProjections | protected void allocateNotCountedProjections(Inventory inventory, LogisticsInventoryPG thePG)(Code) | | Create best allocations for Projections that are not being counted.
These are likely early projections that are not counted because
Supply tasks (actuals) are being counted in their place.
Allocate these with yes or best.
Note that projections that span the not counted and counted projection
windows are not allocated here.
Parameters: inventory - The Inventory we are processing Parameters: thePG - This is the PG for the Inventory we are processing |
createAllocations | protected void createAllocations(int todayBucket, int endBucket, Inventory inv, LogisticsInventoryPG thePG)(Code) | | Create and update Withdraw and ProjectWithdraw Task Allocations for a particular Inventory
Parameters: todayBucket - This is the starting bucket to process Parameters: endBucket - Whats the last valid bucket for the inventory Parameters: inv - The Inventory we are processing Parameters: thePG - This is the PG for the Inventory we are processing |
getQuantityForDuration | public double getQuantityForDuration(Rate r, long duration)(Code) | | |
reconcileInventoryLevels | public void reconcileInventoryLevels(Collection inventories)(Code) | | Called by the InventoryPlugin when we are processing in Backwards Flow
(which is allocation result notifications) to try and allocated
withdraw tasks. It also updates the BG's Inventory Levels.
Parameters: inventories - The collection of inventories to be processed |
reconcileThePast | public void reconcileThePast(int today_bucket, LogisticsInventoryPG thePG)(Code) | | Update the inventory levels from time zero to today.
Parameters: today_bucket - Representation of today. Parameters: thePG - The PG for the Inventory Asset we are working with. |
resetTrailingPointers | protected void resetTrailingPointers()(Code) | | Reset Pointers Map, list of pointers, and pointer remove list
|
shouldSkipMakingResult | protected boolean shouldSkipMakingResult(Task task)(Code) | | Do not process tasks whose end times are beyond level 2
Parameters: task - true if after level 2 horizon |
Methods inherited from org.cougaar.logistics.plugin.inventory.InventoryLevelGenerator | protected double calculateDemandForPeriod(LogisticsInventoryPG thePG, int refillBucket, int endOfPeriodBucket)(Code)(Java Doc) public void calculateInventoryLevels(int startBucket, int endBucket, LogisticsInventoryPG thePG)(Code)(Java Doc) protected double findCommittedRefill(int bucket, LogisticsInventoryPG thePG, boolean countProjections)(Code)(Java Doc) public static int getIndexForType(int[] types, int type)(Code)(Java Doc) protected double getTargetLevel(int refillBucket, int reorderPeriodEndBucket, LogisticsInventoryPG thePG)(Code)(Java Doc) protected void setTargetForProjectionPeriod(LogisticsInventoryPG thePG, int startBucket, double prevTarget)(Code)(Java Doc)
|
|
|