| java.lang.Object org.cougaar.logistics.plugin.inventory.InventoryModule org.cougaar.logistics.plugin.inventory.InventoryLevelGenerator org.cougaar.logistics.plugin.inventory.RefillProjectionGenerator
RefillProjectionGenerator | public class RefillProjectionGenerator extends InventoryLevelGenerator implements RefillProjectionGeneratorModule(Code) | | The Refill Projection Generator Module is responsible for generating
projection refill tasks. These projections will be calculated by
time shifting the projections from each customer and summing the
results.
Called by the Inventory Plugin when there is new projection demand.
Uses the InventoryBG module to gather projected demand.
Generates Refill Projection tasks
NOTE: Right now this module assumes that all customers have the
same VTH boundaries as we do. This means that Level 2 demand is
calculated soley from Level 2 incoming demand. In the future we will
need to account for differing level2 boundaries and calculate level 2
projections by summing the tonnage across level 6 projections for all
inventories.
|
Method Summary | |
protected void | calculateLevelSixProjections(Collection touchedInventories, int daysOnHand, long endOfLevelSix, ComparatorModule myComparator) Calculate Projection Refills in level Six detail until the end of the
Level 6 VTH window. | public void | calculateRefillProjections(Collection touchedInventories, int daysOnHand, long endOfLevelSix, long endOfLevelTwo, ComparatorModule theComparator) Called by the InventoryPlugin to calculate new Refills. | protected PrepositionalPhrase | createPrepPhrase(String prep, Object io) | protected Task | createProjectionRefill(long start, long end, double demand, LogisticsInventoryPG thePG) Make a Projection Refill Task and publish it to the InventoryPlugin. | protected Preference | createRefillRatePreference(double refill_qty, long bucketMillis) Utility method to create Refill Projection Rate preference
We use a V scoring function for this preference. | protected NewTask | fillInTask(NewTask newRefill, long start, long end, long earliest, double qty, LogisticsInventoryPG thePG) | protected GeolocLocation | getHomeLocation() | protected Organization | getMyOrganization() Utility method to get and keep organization info from the InventoryPlugin. | protected String | getOrgName() |
calculateLevelSixProjections | protected void calculateLevelSixProjections(Collection touchedInventories, int daysOnHand, long endOfLevelSix, ComparatorModule myComparator)(Code) | | Calculate Projection Refills in level Six detail until the end of the
Level 6 VTH window.
Parameters: touchedInventories - The Inventories that have changed wrt projections.We will only recalculate refill projections for these. Parameters: daysOnHand - DaysOnHand policy. Parameters: endOfLevelSix - The date representing the end of the Level 6 VTH window. |
calculateRefillProjections | public void calculateRefillProjections(Collection touchedInventories, int daysOnHand, long endOfLevelSix, long endOfLevelTwo, ComparatorModule theComparator)(Code) | | Called by the InventoryPlugin to calculate new Refills.
We only want to calculate new Refills for inventories that have changed
because of projection changes.
Parameters: touchedInventories - Inventories that have changed Parameters: daysOnHand - Number of DaysOnHand from the InventoryPolicy Parameters: endOfLevelSix - The day representing the end of the Level 6 windowfrom the VariableTimeHorizon OperatingMode (knob) Parameters: endOfLevelTwo - The day representing the end of the Level 2 windowfrom the VariableTimeHorizon OperatingMode (knob) |
createPrepPhrase | protected PrepositionalPhrase createPrepPhrase(String prep, Object io)(Code) | | Utility method to create a Refill Projection Prepositional Phrase
Parameters: prep - The preposition Parameters: io - The indirect object PrepositionalPhrase A new prep phrase for the task |
createProjectionRefill | protected Task createProjectionRefill(long start, long end, double demand, LogisticsInventoryPG thePG)(Code) | | Make a Projection Refill Task and publish it to the InventoryPlugin.
The InventoryPlugin will hook the task in to the proper workflow
and publish it to the blackboard.
Parameters: start - The start time for the Task Parameters: end - The end time for the Task Parameters: demand - The demandrate value of the task Parameters: thePG - The Property Group of the Inventory Asset Task The new Projection Refill |
createRefillRatePreference | protected Preference createRefillRatePreference(double refill_qty, long bucketMillis)(Code) | | Utility method to create Refill Projection Rate preference
We use a V scoring function for this preference.
Parameters: refill_qty - The quantity we want for this Refill Task Preference The new demand rate preference for the Refill Task |
fillInTask | protected NewTask fillInTask(NewTask newRefill, long start, long end, long earliest, double qty, LogisticsInventoryPG thePG)(Code) | | Utility method to fill in task details
Parameters: newRefill - The task to fill in Parameters: start - Start time for Task Parameters: end - End Time for Task Parameters: qty - Quantity Pref for Task Parameters: thePG - The property group attached to the Inventory NewTask the filled in 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 accessor to get the Org Name from my organization and keep it around *
|
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)
|
|
|