| java.lang.Object org.cougaar.logistics.plugin.inventory.InventoryModule org.cougaar.logistics.plugin.inventory.InventoryLevelGenerator org.cougaar.logistics.plugin.inventory.RefillGenerator
RefillGenerator | public class RefillGenerator extends InventoryLevelGenerator implements RefillGeneratorModule(Code) | | The Refill Generator Module is responsible for generating new
refill tasks as needed when new demand is received. This Refill
Generator uses a total replan algorithm which ignores all previously
generated refill tasks (that are not yet committed) and replans by
creating new refills based on the new due out totals and the
inventory levels. The Comparator module will decide whether to
rescind all previous refills and publish all new refills generated
by this module or whether to compare and merge the 'old' and
'new' refill tasks.
Called by the Inventory Plugin when there is new demand.
Uses the InventoryBG module for inventory bin calculations
Generates Refill tasks which are passed to the InventoryPlugin
to be added to the MaintainInventory workflow and published.
|
RefillGenerator | public RefillGenerator(InventoryManager imPlugin)(Code) | | Need to pass in the IM Plugin for now to get services
and util classes.
|
calculateInventoryLevelsForRG | protected void calculateInventoryLevelsForRG(int startBucket, int endBucket, LogisticsInventoryPG thePG)(Code) | | |
calculateRefills | public void calculateRefills(Collection touchedInventories, ComparatorModule myComparator)(Code) | | Called by the Inventory Plugin to re-calculate refills when an demand has changed
for an inventory. This method creates Refill Tasks and publishes them through the
Inventory Plugin.
Parameters: touchedInventories - The collection of changed Inventories. Parameters: myComparator - The RefillComparator to use. |
createPrepPhrase | protected PrepositionalPhrase createPrepPhrase(String prep, Object io)(Code) | | Utility method to create a Refill Task Prepositional Phrase
Parameters: prep - The preposition Parameters: io - The indirect object PrepositionalPhrase A new prep phrase for the task |
createRefillQuantityPreference | protected Preference createRefillQuantityPreference(double refill_qty)(Code) | | Utility method to create a Refill Quantity preference
We use a Strictly At scoring function for this preference.
Note that out use of strictly at allows for multiple shipments as
long as the total amount delivered meets the best quantity for this
preference inside the feasable delivery time (defined by the end_time
scoring function)
Parameters: refill_qty - The quantity we want for this Refill Task Preference The new quantity preference for the Refill Task |
getHomeLocation | protected GeolocLocation getHomeLocation()(Code) | | Utility method to get the default (home) location of the Org *
|
getMyOrganization | protected Organization getMyOrganization()(Code) | | Utility method to get and keep organization info from the InventoryPlugin. *
|
getOrgName | protected String getOrgName()(Code) | | Utility method to get the Org Name from my organization and keep it around. *
|
roundAmmoToHundrethsPlace | protected double roundAmmoToHundrethsPlace(double refillQty)(Code) | | |
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)
|
|
|