tassl.application.workflow.policysample
Class Budget

java.lang.Object
  extended by tassl.application.workflow.PolicyAbstract
      extended by tassl.application.workflow.policysample.Budget

public class Budget
extends PolicyAbstract


Field Summary
 
Fields inherited from class tassl.application.workflow.PolicyAbstract
AgentList, globalResources, MapTask
 
Constructor Summary
Budget()
           
 
Method Summary
protected  void BudgetB(int tasks, java.util.HashMap<java.lang.Integer,TaskProperties> tasksP, java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> globalSlots, java.util.HashMap<java.lang.Integer,WorkerForScheduler> result, double taskTime)
          Calculate scheduling with Budget constraint using Branch & Bound
protected  java.util.HashMap BudgetConstraint(java.lang.String wkflId, WorkflowStage stage, java.lang.Object properties, java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> globalSlots)
          Create a solution within a budget limit
 java.util.HashMap scheduleStage(java.lang.String wkflId, WorkflowStage stage, java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> globalSlots)
           
protected  java.util.HashMap TimeCostConstraint(java.lang.String wkflId, WorkflowStage stage, java.lang.Object properties, java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> globalSlots)
          Find scheduling solutions while changing budget
 
Methods inherited from class tassl.application.workflow.PolicyAbstract
calculateInputTransfer, calculateOutputTransfer, checkInputConstraints, getDestinationFiles, getMapTask, getOriginFiles, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Budget

public Budget()
Method Detail

scheduleStage

public java.util.HashMap scheduleStage(java.lang.String wkflId,
                                       WorkflowStage stage,
                                       java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> globalSlots)
Specified by:
scheduleStage in class PolicyAbstract
globalSlots - available scheduling slots (workers)
Returns:
mapTasks. It will be empty if something failed

BudgetConstraint

protected java.util.HashMap BudgetConstraint(java.lang.String wkflId,
                                             WorkflowStage stage,
                                             java.lang.Object properties,
                                             java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> globalSlots)
Create a solution within a budget limit

Parameters:
wkflId -
stage -
properties -
globalSlots -
Returns:

TimeCostConstraint

protected java.util.HashMap TimeCostConstraint(java.lang.String wkflId,
                                               WorkflowStage stage,
                                               java.lang.Object properties,
                                               java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> globalSlots)
Find scheduling solutions while changing budget

Parameters:
wkflId -
stage -
properties -
globalSlots -
Returns:

BudgetB

protected void BudgetB(int tasks,
                       java.util.HashMap<java.lang.Integer,TaskProperties> tasksP,
                       java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> globalSlots,
                       java.util.HashMap<java.lang.Integer,WorkerForScheduler> result,
                       double taskTime)
Calculate scheduling with Budget constraint using Branch & Bound

Parameters:
tasks -
tasksP -
globalSlots -
result -
taskTime -