| 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 | |
Method Summary | |
protected Vector | createConstantParameterDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule, double multiplier) Create PROJECTSUPPLY tasks representing the demand. | public Vector | createDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule, double multiplier) Create PROJECTSUPPLY tasks representing the demand. | protected Vector | createPeriodicDemandTasks(Task parent_task, Asset resource, Schedule rate_schedule) Create SUPPLY tasks representing the demand. | protected void | createPolicyTable(Enumeration policies) | protected int | createResourceConsumptionTasks(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 int | getAggregationPeriod(String type) Convenience function
Parameters: type - type id of the resource number of days between orders for resources. | protected ConsumerSpec | getDemandSpec(Task task) | protected double | getTotalDemand(Schedule sched, long start, long end) | protected void | initializeSubscriptions() Subscribe for generate demand tasks. | abstract protected Task | newDemandTask(Task parent_task, Asset resource, Object consumer, long end_time, double quantity) | abstract protected Task | newProjectionTask(Task parent_task, Asset resource, Object consumer, long start_time, long end_time, Rate rate, double multiplier) | public boolean | processTasks(Enumeration tasks) Expands the GenerateDemand tasks,
creates and publishes the expanded task
with the associated workflow. | protected void | publishChangeProjection(Task parent_task, Asset resource, Enumeration new_tasks) | public void | update() | protected void | updateGenerateDemandExpansion() |
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)
|
ownTasksPredicate_ | protected UnaryPredicate ownTasksPredicate_(Code) | | Subscription to changes in publications by this processor
|
publishedProjectionTable_ | protected Hashtable publishedProjectionTable_(Code) | | Table used for Diff-Based replanning of ProjectSupply tasks
|
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 |
update | public void update()(Code) | | |
updateGenerateDemandExpansion | protected void updateGenerateDemandExpansion()(Code) | | |
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)
|
|
|