| |
|
| java.lang.Object org.cougaar.logistics.plugin.inventory.ShortfallPeriod
ShortfallPeriod | public class ShortfallPeriod implements java.io.Serializable,Publishable(Code) | | ShortfallSummary is an object that summarizizes which inventories of
a particular inventory have shortfall.
|
Method Summary | |
public boolean | equals(ShortfallPeriod sp) The method to compare two shortfall period. | public long | getEndTime() | public int | getNumBuckets(long msecPerBucket) Given the Milliseconds per bucket compute the total number of inventory buckets spanned by this ShortfallPeriod.
A Bucket is the granularity at which we calculate the inventory numbers. | public double | getPercentShortfall() The percent shortfall which is totalDemand - totalFilled/totalDemand * 100 (Ie the less that is filled the greater
the qty percent shortfall. | public double | getRoundedTotalDemand(boolean roundToInt) | public double | getRoundedTotalFilled(boolean roundToInt) | public double | getShortfallQty(boolean roundToInt) The shortfall qty is the total demand over this period minus the total filled by this period. | public long | getStartTime() | public double | getTotalDemand() | public double | getTotalFilled() The total amount allocated as the filled amount of the asked for demand during this period. | public boolean | isPersistable() | public static double | roundAppropriately(double aNum, boolean roundToInt) | public static double | roundToHundreths(double aNum) Round to the hundreths place the passed in number
Parameters: aNum - - Number to be rounded to hundreths place. | public static double | roundToInt(double aNum) | public void | setTotalDemand(double demand) | public void | setTotalFilled(double filled) | public String | toString() |
ShortfallPeriod | public ShortfallPeriod()(Code) | | Constructor
|
ShortfallPeriod | public ShortfallPeriod(long aStartTime, long anEndTime)(Code) | | |
ShortfallPeriod | public ShortfallPeriod(long aStartTime, long anEndTime, double demand, double filled)(Code) | | |
equals | public boolean equals(ShortfallPeriod sp)(Code) | | The method to compare two shortfall period. If all the slot values are the same then they are equal periods.
Parameters: sp - other shortfall period boolean true if all the slots are equivilent |
getEndTime | public long getEndTime()(Code) | | The end time for the shortfall period
long milliseconds since epoch time representing date/time of the end of the shortfall period |
getNumBuckets | public int getNumBuckets(long msecPerBucket)(Code) | | Given the Milliseconds per bucket compute the total number of inventory buckets spanned by this ShortfallPeriod.
A Bucket is the granularity at which we calculate the inventory numbers. If the bucket is an hour long then we
add things up that fall within the same hour. If a day long demand coming in just after midnight and demand coming
in before midnight of the next day is counted in the same bucket.
Parameters: msecPerBucket - The number of milliseconds per inventory bucket int The number of buckets spanned. |
getPercentShortfall | public double getPercentShortfall()(Code) | | The percent shortfall which is totalDemand - totalFilled/totalDemand * 100 (Ie the less that is filled the greater
the qty percent shortfall.
the double representing total percent shortfall for this period |
getRoundedTotalDemand | public double getRoundedTotalDemand(boolean roundToInt)(Code) | | Get total demand rounded to integer or to the hundreths place
Parameters: roundToInt - true if you want to round to an integer total demand rounded to the appropriate precision. |
getRoundedTotalFilled | public double getRoundedTotalFilled(boolean roundToInt)(Code) | | Get total demand rounded to an integer or to the hundreths place depending on the passed boolean
Parameters: roundToInt - true if you want the filled demand rounded to an integer false if only to the hundreths place the double represent total filled demand. |
getShortfallQty | public double getShortfallQty(boolean roundToInt)(Code) | | The shortfall qty is the total demand over this period minus the total filled by this period. Most times greater than zero
Parameters: roundToInt - booean true if round to an integer otherwise round to hundreths double representing the integer or double rounded to the hundreths place |
getStartTime | public long getStartTime()(Code) | | The start time for the shortfall period
long milliseconds since epoch time represnting date/time of the start of thr shortfall period |
getTotalDemand | public double getTotalDemand()(Code) | | The number gleaned from the InventoryBG of the total amount of demand during the time period of this ShortfallPeriod
double The total amount of demand being asked of this inventory during this time period |
getTotalFilled | public double getTotalFilled()(Code) | | The total amount allocated as the filled amount of the asked for demand during this period. Should be less than
the amount of demand, but could be equal due to a late delivery in an allocation result attached to one of the demand
tasks within the shortfall period. Or if quiescence has not taken place yet and there is not allocation results on the
demand.
double The total amount of demand filled at this inventory over the course of the shortfall period. |
isPersistable | public boolean isPersistable()(Code) | | Indicates that this is a persistable object
true |
roundAppropriately | public static double roundAppropriately(double aNum, boolean roundToInt)(Code) | | Helper rounding function
Parameters: aNum - Number to round Parameters: roundToInt - true if round to integer false yields something rounded to the hundreths place double integer or double value rounded to hundreths |
roundToHundreths | public static double roundToHundreths(double aNum)(Code) | | Round to the hundreths place the passed in number
Parameters: aNum - - Number to be rounded to hundreths place. The passed in number rounded to the hundreths place. |
roundToInt | public static double roundToInt(double aNum)(Code) | | Round to an integer the passed in number
Parameters: aNum - - Number to be rounded double an integer value. |
setTotalDemand | public void setTotalDemand(double demand)(Code) | | Setters for the total demand
Parameters: demand - The total demand for this shortfall period |
setTotalFilled | public void setTotalFilled(double filled)(Code) | | Setters for the total filled
Parameters: filled - The total amount of demand filled over this shortfall period. |
toString | public String toString()(Code) | | The string representation of all the fields in this object
String - The string representation of all the fields in this object |
|
|
|