Java Doc for GenerateDemandExpander.java in  » Science » Cougaar12_4 » org » cougaar » glm » plugins » projection » 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.glm.plugins.projection 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cougaar.glm.plugins.BasicProcessor
      org.cougaar.glm.plugins.projection.GenerateDemandExpander

All known Subclasses:   org.cougaar.glm.plugins.projection.GenerateSupplyDemandExpander,
GenerateDemandExpander
abstract public class GenerateDemandExpander extends BasicProcessor (Code)
Projects demand for assets consumed by some consumer.

Inner Class :static class TasksPlanElementPredicate implements UnaryPredicate
Inner Class :static class GenerateDemandPredicate implements UnaryPredicate
Inner Class :static class PolicyPredicate implements UnaryPredicate

Field Summary
final public static  Stringcreate_supply_tasks_param
     Plugin Parameter for creation of Supply instead of ProjectSupply tasks.
protected  IncrementalSubscriptiongenerateDemandSubscription_
     Subscription for GenerateDemand tasks.
protected  IncrementalSubscriptionownPESubscription_
    
protected  IncrementalSubscriptionownSubscription_
    
protected  UnaryPredicateownTasksPEPredicate_
    
protected  UnaryPredicateownTasksPredicate_
    
protected  IncrementalSubscriptionpolicySubscription_
    
protected  HashtablepolicyTable_
    
protected  HashtablepublishedProjectionTable_
    
protected  VectorresourceTypes_
    

Constructor Summary
public  GenerateDemandExpander(DecorationPlugin pi, Organization org, Vector types, UnaryPredicate pred)
    

Method Summary
protected  VectorcreateConstantParameterDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule, double multiplier)
     Create PROJECTSUPPLY tasks representing the demand.
public  VectorcreateDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule, double multiplier)
     Create PROJECTSUPPLY tasks representing the demand.
protected  VectorcreatePeriodicDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule)
     Create SUPPLY tasks representing the demand.
protected  voidcreatePolicyTable(Enumeration policies)
    
protected  intcreateResourceConsumptionTasks(Task parent_task)
     Creates demand tasks for each consumed resource.
Parameters:
  parent_task - Vector of demand tasks Converts the task's ConsumerSpec into resourceConsumptionRateSchedules which is then used to create a series of demand tasks.
protected  intgetAggregationPeriod(String type)
     Convenience function
Parameters:
  type - type id of the resource number of days between orders for resources.
protected  ConsumerSpecgetDemandSpec(Task task)
    
protected  doublegetTotalDemand(Schedule sched, long start, long end)
    
protected  voidinitializeSubscriptions()
     Subscribe for generate demand tasks.
abstract protected  TasknewDemandTask(Task parent_task, Asset resource, Object consumer, long end_time, double quantity)
    
abstract protected  TasknewProjectionTask(Task parent_task, Asset resource, Object consumer, long start_time, long end_time, Rate rate, double multiplier)
    
public  booleanprocessTasks(Enumeration tasks)
     Expands the GenerateDemand tasks, creates and publishes the expanded task with the associated workflow.
protected  voidpublishChangeProjection(Task parent_task, Asset resource, Enumeration new_tasks)
    
public  voidupdate()
    
protected  voidupdateGenerateDemandExpansion()
    

Field Detail
create_supply_tasks_param
final public static String create_supply_tasks_param(Code)
Plugin Parameter for creation of Supply instead of ProjectSupply tasks. Values true/false, e.g. MyProjectionPlugin(+BulkWaterSupplyTasks)



generateDemandSubscription_
protected IncrementalSubscription generateDemandSubscription_(Code)
Subscription for GenerateDemand tasks.



ownPESubscription_
protected IncrementalSubscription ownPESubscription_(Code)



ownSubscription_
protected IncrementalSubscription ownSubscription_(Code)



ownTasksPEPredicate_
protected UnaryPredicate ownTasksPEPredicate_(Code)



ownTasksPredicate_
protected UnaryPredicate ownTasksPredicate_(Code)
Subscription to changes in publications by this processor



policySubscription_
protected IncrementalSubscription policySubscription_(Code)
Subscription to policies



policyTable_
protected Hashtable policyTable_(Code)



publishedProjectionTable_
protected Hashtable publishedProjectionTable_(Code)
Table used for Diff-Based replanning of ProjectSupply tasks



resourceTypes_
protected Vector resourceTypes_(Code)




Constructor Detail
GenerateDemandExpander
public GenerateDemandExpander(DecorationPlugin pi, Organization org, Vector types, UnaryPredicate pred)(Code)




Method Detail
createConstantParameterDemandTasks
protected Vector createConstantParameterDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule, double multiplier)(Code)
Create PROJECTSUPPLY tasks representing the demand.
Parameters:
  parent_task - parent task (GenerateDemand) Vector of POJECTSUPPLY tasks



createDemandTasks
public Vector createDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule, double multiplier)(Code)
Create PROJECTSUPPLY tasks representing the demand.
Parameters:
  parent_task - parent task (GenerateDemand) Vector of PROJECTSUPPLY tasks



createPeriodicDemandTasks
protected Vector createPeriodicDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule)(Code)
Create SUPPLY tasks representing the demand.
Parameters:
  parent_task - parent task (GenerateDemand) Vector of SUPPLY tasks



createPolicyTable
protected void createPolicyTable(Enumeration policies)(Code)
Fill in the policyTable_ with current DemandProjectionPolicies



createResourceConsumptionTasks
protected int createResourceConsumptionTasks(Task parent_task)(Code)
Creates demand tasks for each consumed resource.
Parameters:
  parent_task - Vector of demand tasks Converts the task's ConsumerSpec into resourceConsumptionRateSchedules which is then used to create a series of demand tasks. *



getAggregationPeriod
protected int getAggregationPeriod(String type)(Code)
Convenience function
Parameters:
  type - type id of the resource number of days between orders for resources. Defaults to one day.



getDemandSpec
protected ConsumerSpec getDemandSpec(Task task)(Code)
Convenience method
Parameters:
  task - GenerateDemand task that has demandSpec ConsumerSpec from PrepPhrase "DemandSpec"



getTotalDemand
protected double getTotalDemand(Schedule sched, long start, long end)(Code)

Parameters:
  sched - Object schedule where Object is a rate
Parameters:
  start - start time
Parameters:
  end - end time amount used over given time period (rate*time)



initializeSubscriptions
protected void initializeSubscriptions()(Code)
Subscribe for generate demand tasks.



newDemandTask
abstract protected Task newDemandTask(Task parent_task, Asset resource, Object consumer, long end_time, double quantity)(Code)
Create Demand Task
Parameters:
  quantity - of resource requested 'demand' task for given resource



newProjectionTask
abstract protected Task newProjectionTask(Task parent_task, Asset resource, Object consumer, long start_time, long end_time, Rate rate, double multiplier)(Code)
Create Projection Task
Parameters:
  rate - of consumption over time period 'demand' task for given resource



processTasks
public boolean processTasks(Enumeration tasks)(Code)
Expands the GenerateDemand tasks, creates and publishes the expanded task with the associated workflow.
Parameters:
  tasks - tasks to be processed boolean - is there an error condition



publishChangeProjection
protected void publishChangeProjection(Task parent_task, Asset resource, Enumeration new_tasks)(Code)



update
public void update()(Code)



updateGenerateDemandExpansion
protected void updateGenerateDemandExpansion()(Code)



Fields inherited from org.cougaar.glm.plugins.BasicProcessor
final protected static long MSEC_PER_DAY(Code)(Java Doc)
final protected static long MSEC_PER_HOUR(Code)(Java Doc)
final protected static long MSEC_PER_MIN(Code)(Java Doc)
public AllocationResultAggregator UnlikeTaskARA_(Code)(Java Doc)
protected Calendar calendar_(Code)(Java Doc)
protected String className_(Code)(Java Doc)
protected MessageAddress clusterId_(Code)(Java Doc)
protected PluginDelegate delegate_(Code)(Java Doc)
public static NumberFormat demandFormat(Code)(Java Doc)
protected PlanningFactory ldmFactory_(Code)(Java Doc)
protected String myOrgName_(Code)(Java Doc)
protected Organization myOrganization_(Code)(Java Doc)
protected DecorationPlugin plugin_(Code)(Java Doc)

Methods inherited from org.cougaar.glm.plugins.BasicProcessor
public String arDesc(AllocationResult ar)(Code)(Java Doc)
public AllocationResult buildExpansionResult(Expansion expansion)(Code)(Java Doc)
public AllocationResult buildExpansionResult(Expansion expansion, boolean like_tasks)(Code)(Java Doc)
public NewTask buildNewTask(Task input_task, String output_verb, Asset direct_object)(Code)(Java Doc)
public Task buildTask(Task input_task, String output_verb, Asset direct_object, PrepositionalPhrase pp)(Code)(Java Doc)
public Task buildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases)(Code)(Java Doc)
public Task buildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases, Preference pref)(Code)(Java Doc)
public Task buildTask(Task input_task, String output_verb, Asset direct_object, Vector preposition_phrases, Enumeration prefs)(Code)(Java Doc)
public Task buildTask(Task input_task, String output_verb, Asset direct_object, Enumeration prefs)(Code)(Java Doc)
public Workflow buildWorkflow(Task parent, Vector subtasks)(Code)(Java Doc)
public Workflow buildWorkflow(Task parent, Task task)(Code)(Java Doc)
protected Task changeTask(Task prev_task, Task new_task)(Code)(Java Doc)
public Preference createDateAfterPreference(int aspect, long value)(Code)(Java Doc)
public Preference createDateBeforePreference(int aspect, long value)(Code)(Java Doc)
public AllocationResult createEstimatedAllocationResult(Task t)(Code)(Java Doc)
public Preference createPreference(int aspect, double value)(Code)(Java Doc)
public Preference createQuantityPreference(int aspect, double value)(Code)(Java Doc)
protected Enumeration diffProjections(Schedule published_schedule, Schedule newtask_schedule)(Code)(Java Doc)
public long getAlpTime()(Code)(Java Doc)
public boolean isSubscriptionChanged(IncrementalSubscription sub)(Code)(Java Doc)
public static Schedule newObjectSchedule(Enumeration tasks)(Code)(Java Doc)
public PrepositionalPhrase newPrepositionalPhrase(String preposition, Object io)(Code)(Java Doc)
public PrepositionalPhrase newPrepositionalPhrase(String preposition)(Code)(Java Doc)
public NewWorkflow newWorkflow(Task parent)(Code)(Java Doc)
protected String printProjection(String msg, Task task)(Code)(Java Doc)
protected void publishAddTask(Task task)(Code)(Java Doc)
protected boolean publishAllocation(Task task, Asset asset, org.cougaar.planning.ldm.plan.Role role)(Code)(Java Doc)
protected boolean publishAllocation(Task task, Asset asset, Role role, AllocationResult ar)(Code)(Java Doc)
protected boolean publishAllocation(Task task, Asset asset, Role role, AllocationResult ar, boolean needAR)(Code)(Java Doc)
protected void publishAsset(Asset asset)(Code)(Java Doc)
protected void publishChangeAsset(Asset asset)(Code)(Java Doc)
protected void publishChangeTask(Task task)(Code)(Java Doc)
protected void publishExpansion(Task parent, Vector tasks)(Code)(Java Doc)
protected void publishFailedDisposition(Task task, AllocationResult ar)(Code)(Java Doc)
protected void publishRemoveAllocation(Allocation alloc)(Code)(Java Doc)
protected void publishRemoveAsset(Asset asset)(Code)(Java Doc)
protected void publishRemoveExpansion(Expansion exp)(Code)(Java Doc)
protected void publishRemoveTask(Task task)(Code)(Java Doc)
public String qseString(QuantityScheduleElement qse)(Code)(Java Doc)
protected void setEndTimePreference(NewTask task, long end)(Code)(Java Doc)
protected void setStartTimePreference(NewTask task, long start)(Code)(Java Doc)
protected IncrementalSubscription subscribe(UnaryPredicate predicate)(Code)(Java Doc)
protected String taskKey(Task t)(Code)(Java Doc)
abstract public void update()(Code)(Java Doc)
public void updateAllocationResult(PlanElement pe)(Code)(Java Doc)
protected void updateExpansionResult(Enumeration planelements)(Code)(Java Doc)

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.