| |
|
| java.lang.Object org.cougaar.logistics.plugin.inventory.ShortfallSummary
ShortfallSummary | public ShortfallSummary(String aSupplyType, UID aUID, long mSecs)(Code) | | Constructor
Parameters: aSupplyType - - the supply type this shortfall summary applys to |
addShortfallInventories | public boolean addShortfallInventories(Collection invs)(Code) | | Add a collection of shortfall inventories. Before adding see if it already contains that shortfall inventory
and if they are equal if not don't bother to update.
Parameters: invs - - The collection of ShortfallInventories to add to the Summary. boolean true if there was a new ShortfallInventory added. false if nothing changed in the collection.Determines whether to republish this ShortfallSummary or not. |
getMsecPerBucket | public long getMsecPerBucket()(Code) | | The number of milliseconds per bucket. Either an Hour (UA) or Days worth of milliseconds. This is the granularity
at which the inventory counts tasks and qty's. If a day you add demand for all tasks that are for within a given day.
long - the number of milliseconds per bucket in all the inventories at this agent for this supply type. |
getNumShortfallPeriodInvs | public int getNumShortfallPeriodInvs()(Code) | | Return the total number of unexpected shortfall period inventories
int the total number of unexpected shortfall period inventories. |
getShortfallInventories | public Collection getShortfallInventories()(Code) | | Get the shortfall Inventories contained in this summary
- The shortfall Inventories |
getSupplyType | public String getSupplyType()(Code) | | ShortfallSummaries are divided by supply type - 1 to 1 for each inventory plugin. All the inventories contained
within are of that supply type.
String the supply type "Ammunition", "BulkPOL", "PackagedPOL", "Subsistence", or "Cosumeable" |
getUnit | public String getUnit()(Code) | | Get the bucket unit
String "Hours" or "Days" |
getUnit | public static String getUnit(long msecPerBucket)(Code) | | |
hasPercentShortfallAbove | public boolean hasPercentShortfallAbove(int thresholdPercent)(Code) | | Return true if there is a percent shortfall above the threshold in the shortfall inventores
Parameters: thresholdPercent - - percent shortfall threshold true if there is a shortfall period in any shortfall inventory above the threhold percent. |
isPersistable | public boolean isPersistable()(Code) | | |
removeShortfallInventories | public boolean removeShortfallInventories(Collection invIDs)(Code) | | Remove a collection of shortfall invetories by ID. Make sure they exist in the collection if none of them do
return false else true.
Parameters: invIDs - - The collection of inventory ID's to be removed true is a Shortfall Inventory was removed else false. |
removeShortfallInventory | protected boolean removeShortfallInventory(String invID)(Code) | | |
setShortfallInventories | public void setShortfallInventories(Collection invs)(Code) | | Accessor for setting shortfall inventories.
Parameters: invs - - Shortfall inventories to be added to the Summary |
setUID | public void setUID(UID uid)(Code) | | Set the UID (unique identifier) of this UniqueObject. Used only
during initialization.
Parameters: uid - the UID to be given to this |
|
|
|