be.ac.ua.broker.scheduling.workload.wm1
Class BasicTHOptimizer

java.lang.Object
  extended by be.ac.ua.broker.scheduling.workload.wm1.BasicTHOptimizer
All Implemented Interfaces:
Optimizer<WorkloadWM1>

public class BasicTHOptimizer
extends java.lang.Object
implements Optimizer<WorkloadWM1>

This class is used to perform the basic scheduling for workload model one tasks. Basic scheduling is the naive method in which every task is scheduled on a separate resource. The task hours are scheduled consecutively starting at the beginning of the schedule.

Author:
Vermeersch Kurt

Constructor Summary
BasicTHOptimizer()
           
 
Method Summary
 void add(WorkloadWM1 wl)
          Add the provided workload to the scheduling optimizer.
 java.util.List<ScheduledTaskCollection> determineOptimal()
           
 java.util.List<WorkloadWM1> getWorkLoadsForDeadline(int deadline)
          Getter for the tasks begin scheduled which have a given deadline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicTHOptimizer

public BasicTHOptimizer()
Method Detail

add

public void add(WorkloadWM1 wl)
Description copied from interface: Optimizer
Add the provided workload to the scheduling optimizer.

Specified by:
add in interface Optimizer<WorkloadWM1>
Parameters:
wl - the workload to add.

determineOptimal

public java.util.List<ScheduledTaskCollection> determineOptimal()
Specified by:
determineOptimal in interface Optimizer<WorkloadWM1>
Returns:
a list of scheduledTaskCollections, one of these represents the schedule containing subTasks for a single instance. This schedules are made in a way that tries to minimize the total cost of running the workload on EC2.

getWorkLoadsForDeadline

public java.util.List<WorkloadWM1> getWorkLoadsForDeadline(int deadline)
Getter for the tasks begin scheduled which have a given deadline.

Parameters:
deadline - the deadline of which we want to get the tasks.
Returns:
the list of workloads associated with the given deadline