choco.kernel.solver.variables.scheduling
Class AbstractTask

java.lang.Object
  extended by choco.kernel.solver.variables.scheduling.AbstractTask
All Implemented Interfaces:
IPretty, IDotty, ITask
Direct Known Subclasses:
HTask, TaskVar

public abstract class AbstractTask
extends Object
implements ITask


Constructor Summary
AbstractTask()
          Warning: preemption should not be allowed.
AbstractTask(ITimePeriodList timePeriodList)
          possibly allow preemption.
 
Method Summary
 int getECT()
          Gets the Earliest Completion Time (ECT).
 int getLST()
          Gets the Latest Starting Time (LST).
 String getName()
          Gets the name of the task.
 ITimePeriodList getTimePeriodList()
          Gets the list of time periods in which the task is executed
 boolean hasConstantDuration()
          Checks for if the duration is constant.
 boolean isInterrupted()
          Checks if the task is interrupted (preempted).
 boolean isPartiallyScheduled()
          Checks whether a preemptive task has been partially scheduled.
 boolean isScheduled()
          Checks if the task is scheduled.
 String pretty()
          pretty printing of the object.
 String toDotty()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface choco.kernel.solver.variables.scheduling.ITask
getEST, getID, getLCT, getMaxDuration, getMinDuration, isPreemptionAllowed
 

Constructor Detail

AbstractTask

public AbstractTask()
Warning: preemption should not be allowed.


AbstractTask

public AbstractTask(ITimePeriodList timePeriodList)
possibly allow preemption.

Method Detail

getName

public String getName()
Description copied from interface: ITask
Gets the name of the task.

Specified by:
getName in interface ITask
Returns:
the name

hasConstantDuration

public boolean hasConstantDuration()
Description copied from interface: ITask
Checks for if the duration is constant.

Specified by:
hasConstantDuration in interface ITask
Returns:
true, if the duration is constant.

getECT

public int getECT()
Description copied from interface: ITask
Gets the Earliest Completion Time (ECT).

Specified by:
getECT in interface ITask
Returns:
the ECT

getLST

public int getLST()
Description copied from interface: ITask
Gets the Latest Starting Time (LST).

Specified by:
getLST in interface ITask
Returns:
the LST

toDotty

public String toDotty()
Specified by:
toDotty in interface IDotty

pretty

public String pretty()
Description copied from interface: IPretty
pretty printing of the object. This String is not constant and may depend on the context.

Specified by:
pretty in interface IPretty
Returns:
a readable string representation of the object

toString

public String toString()
Overrides:
toString in class Object

isScheduled

public boolean isScheduled()
Description copied from interface: ITask
Checks if the task is scheduled. The task is scheduled if its starting time and its duration are fixed.

Specified by:
isScheduled in interface ITask
Returns:
true, if the tasks is scheduled

isPartiallyScheduled

public final boolean isPartiallyScheduled()
Description copied from interface: ITask
Checks whether a preemptive task has been partially scheduled.

Specified by:
isPartiallyScheduled in interface ITask
Returns:
true, if a preemptive task has been partially scheduled.

isInterrupted

public final boolean isInterrupted()
Description copied from interface: ITask
Checks if the task is interrupted (preempted).

Specified by:
isInterrupted in interface ITask
Returns:
true, if the tasks is interrupted

getTimePeriodList

public final ITimePeriodList getTimePeriodList()
Description copied from interface: ITask
Gets the list of time periods in which the task is executed

Specified by:
getTimePeriodList in interface ITask
Returns:
a list of time period.


Copyright © 2012. All Rights Reserved.