Java Doc for ShortfallPeriod.java in  » Science » Cougaar12_4 » org » cougaar » logistics » plugin » inventory » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.logistics.plugin.inventory 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.



Constructor Summary
public  ShortfallPeriod()
    
public  ShortfallPeriod(long aStartTime, long anEndTime)
    
public  ShortfallPeriod(long aStartTime, long anEndTime, double demand, double filled)
    

Method Summary
public  booleanequals(ShortfallPeriod sp)
     The method to compare two shortfall period.
public  longgetEndTime()
    
public  intgetNumBuckets(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  doublegetPercentShortfall()
     The percent shortfall which is totalDemand - totalFilled/totalDemand * 100 (Ie the less that is filled the greater the qty percent shortfall.
public  doublegetRoundedTotalDemand(boolean roundToInt)
    
public  doublegetRoundedTotalFilled(boolean roundToInt)
    
public  doublegetShortfallQty(boolean roundToInt)
     The shortfall qty is the total demand over this period minus the total filled by this period.
public  longgetStartTime()
    
public  doublegetTotalDemand()
    
public  doublegetTotalFilled()
     The total amount allocated as the filled amount of the asked for demand during this period.
public  booleanisPersistable()
    
public static  doubleroundAppropriately(double aNum, boolean roundToInt)
    
public static  doubleroundToHundreths(double aNum)
     Round to the hundreths place the passed in number
Parameters:
  aNum - - Number to be rounded to hundreths place.
public static  doubleroundToInt(double aNum)
    
public  voidsetTotalDemand(double demand)
    
public  voidsetTotalFilled(double filled)
    
public  StringtoString()
    


Constructor Detail
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)




Method Detail
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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.