Java Doc for DemandGeneratorPlugin.java in  » Science » Cougaar12_4 » org » cougaar » logistics » plugin » demand » 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.demand 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.core.plugin.ComponentPlugin
   org.cougaar.logistics.plugin.demand.DemandGeneratorPlugin

DemandGeneratorPlugin
public class DemandGeneratorPlugin extends ComponentPlugin implements UtilsProvider(Code)
The DemandGeneratorPlugin generates demand during execution.


Field Summary
final public  StringDEMAND_GENERATOR
    
final public  StringDG_TO_FILE
    
final public  StringGENERATE_PERIOD
    
final public  StringRANDOM_DEVIATION_ON
    
final public  StringSTEP_PERIOD
    
final public  StringSUPPLY_TYPE
    
protected  HashMapinventoryHash
    
 LogisticsOPlanlogOPlan
    
protected  StringsupplyType
    


Method Summary
protected  voidcancelTimer()
     Cancel the timer.
public  booleancheckIfTaskOnBlackboard(Task task)
    
protected  voidexecute()
    
protected  CollectionfilterProjectionsOnTime(Collection projections, long startGen, long endGen)
     Filter the passed in collection of projection tasks to those overlapping the period between the start and end time.
protected  CollectionfilterSupplyTasksOnTime(Collection supplyTasks, long startGen, long endGen)
     Filter the passed in collection of projection tasks to those overlapping the period between the start and end time.
public  AssetUtilsgetAssetUtils()
    
public  BlackboardServicegetBlackboardService()
    
public  doublegetCapacityForTask(Task task)
     TODO: MWD Remove Find the earliest and latest times of all the org activites.
public  longgetCurrentTimeMillis()
    
protected  DemandTaskGeneratorIfcgetDemandTaskGeneratorModule()
     Creates an instance of an DemandTaskGeneratorIfc by searching plugin parameters for DEMAND_GENERATOR argument.
public  InventorygetInventoryForAsset(Asset asset)
    
public  InventorygetInventoryForTask(Task task)
    
protected  StringgetInventoryKey(Asset anAsset)
    
public  StringgetInventoryType(Inventory inventory)
    
public  longgetLogOPlanEndTime()
    
public  longgetLogOPlanStartTime()
    
public  LoggingServicegetLoggingService(Object requestor)
    
public  OrganizationgetMyOrganization()
    
public  StringgetOrgName()
    
public  longgetPeriod()
    
public  longgetPeriodUnit()
    
public  PlanningFactorygetPlanningFactory()
    
public  booleangetPoissonOn()
    
public  ScheduleUtilsgetScheduleUtils()
    
protected  longgetStartOfPeriod(long timeIn)
     Get the time in milliseconds that would be midnight of the day before or first thing in the morning today.
public  StringgetSupplyType()
    
public  TaskUtilsgetTaskUtils()
    
public  TimeUtilsgetTimeUtils()
    
protected  AlarmgetTimer()
    
protected  longgetTimerExpirationTime()
    
protected  booleanhasUnexpiredTimer()
     Returns true IFF there is an unexpired timer.
public  voidload()
    
protected  longnextDemandPeriod(Collection projections, long aTime)
     Find the earliest projection after the time passed in.
public  booleanperiodInDays()
    
protected  booleanperiodInDemandPeriod(Collection projections, long startGen, long endGen)
    
public  booleanpublishAdd(Object o)
    
public  booleanpublishChange(Object o)
    
public  booleanpublishRemove(Object o)
    
protected  voidresetTimer()
     Schedule a timer for midnight tonight.
protected  voidresetTimer(long expiration)
    
protected  voidresetTimerWDelay(long delay)
    
protected  voidsetTimerToTopOfPeriod(long goOffAt)
    
public  voidsetupSubscriptions()
    
protected  booleantimerExpired()
     Test if the timer has expired.
public  voidunload()
    

Field Detail
DEMAND_GENERATOR
final public String DEMAND_GENERATOR(Code)



DG_TO_FILE
final public String DG_TO_FILE(Code)



GENERATE_PERIOD
final public String GENERATE_PERIOD(Code)



RANDOM_DEVIATION_ON
final public String RANDOM_DEVIATION_ON(Code)



STEP_PERIOD
final public String STEP_PERIOD(Code)



SUPPLY_TYPE
final public String SUPPLY_TYPE(Code)



inventoryHash
protected HashMap inventoryHash(Code)



logOPlan
LogisticsOPlan logOPlan(Code)



supplyType
protected String supplyType(Code)





Method Detail
cancelTimer
protected void cancelTimer()(Code)
Cancel the timer.



checkIfTaskOnBlackboard
public boolean checkIfTaskOnBlackboard(Task task)(Code)



execute
protected void execute()(Code)



filterProjectionsOnTime
protected Collection filterProjectionsOnTime(Collection projections, long startGen, long endGen)(Code)
Filter the passed in collection of projection tasks to those overlapping the period between the start and end time.
Parameters:
  projections - - whole collection of projection tasks
Parameters:
  startGen - - start time for generating supply tasks
Parameters:
  endGen - - end time for generating supply tasks Collection of projection tasks filtered by start and end time.



filterSupplyTasksOnTime
protected Collection filterSupplyTasksOnTime(Collection supplyTasks, long startGen, long endGen)(Code)
Filter the passed in collection of projection tasks to those overlapping the period between the start and end time.
Parameters:
  projections - - whole collection of projection tasks
Parameters:
  startGen - - start time for generating supply tasks
Parameters:
  endGen - - end time for generating supply tasks Collection of projection tasks filtered by start and end time.



getAssetUtils
public AssetUtils getAssetUtils()(Code)



getBlackboardService
public BlackboardService getBlackboardService()(Code)



getCapacityForTask
public double getCapacityForTask(Task task)(Code)
TODO: MWD Remove Find the earliest and latest times of all the org activites.

private void computeOrgTimes(Enumeration orgActs) { long latestEnd = 0; long earliestStart = 0; while(orgActs.hasMoreElements()) { OrgActivity oa = (OrgActivity) orgActs.nextElement(); long endTime = oa.getEndTime(); if (endTime > latestEnd) { latestEnd = endTime; } long startTime = oa.getStartTime(); if (startTime < earliestStart) { earliestStart = startTime; } } orgEndTime = latestEnd; orgStartTime = earliestStart; }

public long getOrgStartTime() { return orgStartTime; }

public long getOrgEndTime() { return orgEndTime; }




getCurrentTimeMillis
public long getCurrentTimeMillis()(Code)



getDemandTaskGeneratorModule
protected DemandTaskGeneratorIfc getDemandTaskGeneratorModule()(Code)
Creates an instance of an DemandTaskGeneratorIfc by searching plugin parameters for DEMAND_GENERATOR argument. In the absence of an REQ_EXPANDER argument, a default is used: org.cougaar.logistics.plugin.demand.DemandTaskGenerator DemandTaskGeneratorIfc



getInventoryForAsset
public Inventory getInventoryForAsset(Asset asset)(Code)



getInventoryForTask
public Inventory getInventoryForTask(Task task)(Code)



getInventoryKey
protected String getInventoryKey(Asset anAsset)(Code)



getInventoryType
public String getInventoryType(Inventory inventory)(Code)



getLogOPlanEndTime
public long getLogOPlanEndTime()(Code)



getLogOPlanStartTime
public long getLogOPlanStartTime()(Code)



getLoggingService
public LoggingService getLoggingService(Object requestor)(Code)



getMyOrganization
public Organization getMyOrganization()(Code)



getOrgName
public String getOrgName()(Code)



getPeriod
public long getPeriod()(Code)



getPeriodUnit
public long getPeriodUnit()(Code)



getPlanningFactory
public PlanningFactory getPlanningFactory()(Code)



getPoissonOn
public boolean getPoissonOn()(Code)



getScheduleUtils
public ScheduleUtils getScheduleUtils()(Code)



getStartOfPeriod
protected long getStartOfPeriod(long timeIn)(Code)
Get the time in milliseconds that would be midnight of the day before or first thing in the morning today. - the time in milliseconds that represents first thing in themorning today



getSupplyType
public String getSupplyType()(Code)



getTaskUtils
public TaskUtils getTaskUtils()(Code)



getTimeUtils
public TimeUtils getTimeUtils()(Code)



getTimer
protected Alarm getTimer()(Code)
access the timer itself (if any) *



getTimerExpirationTime
protected long getTimerExpirationTime()(Code)
When will (has) the timer expire *



hasUnexpiredTimer
protected boolean hasUnexpiredTimer()(Code)
Returns true IFF there is an unexpired timer.



load
public void load()(Code)



nextDemandPeriod
protected long nextDemandPeriod(Collection projections, long aTime)(Code)
Find the earliest projection after the time passed in.
Parameters:
  projections - - whole collection of projection tasks
Parameters:
  aTime - - time concerned with to find whether in a demand period Collection of projection tasks filtered by start and end time.



periodInDays
public boolean periodInDays()(Code)



periodInDemandPeriod
protected boolean periodInDemandPeriod(Collection projections, long startGen, long endGen)(Code)
Find out if passed in time is in a demand period
Parameters:
  projections - - whole collection of projection tasks
Parameters:
  startGen - - time concerned with to find whether in a demand period
Parameters:
  endGen - - time concerned with to find whether in a demand period Collection of projection tasks filtered by start and end time.



publishAdd
public boolean publishAdd(Object o)(Code)



publishChange
public boolean publishChange(Object o)(Code)



publishRemove
public boolean publishRemove(Object o)(Code)



resetTimer
protected void resetTimer()(Code)
Schedule a timer for midnight tonight.



resetTimer
protected void resetTimer(long expiration)(Code)
Schedule a update wakeup after some interval of time
Parameters:
  expiration - The date-time you wish this alarm to expire at



resetTimerWDelay
protected void resetTimerWDelay(long delay)(Code)
Schedule a update wakeup after some interval of time
Parameters:
  delay - how long to delay before the timer expires.



setTimerToTopOfPeriod
protected void setTimerToTopOfPeriod(long goOffAt)(Code)



setupSubscriptions
public void setupSubscriptions()(Code)



timerExpired
protected boolean timerExpired()(Code)
Test if the timer has expired. false if the timer is not running or has not yet expiredelse return true.



unload
public void unload()(Code)



Methods inherited from org.cougaar.core.plugin.ComponentPlugin
abstract protected void execute()(Code)(Java Doc)
protected ConfigFinder getConfigFinder()(Code)(Java Doc)
abstract protected void setupSubscriptions()(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.