public class Node extends Object
Modifier and Type | Field and Description |
---|---|
private HashSet |
ancestors |
private long |
ancET |
int |
cluster |
private Edge |
critEdge |
static long |
DEFAULT_WEIGHT |
private HashSet |
descendants |
private long |
desET |
private long |
downLen |
boolean |
examined |
private String |
id |
private LinkedList |
inEdges |
long |
lb |
long |
olb |
long |
orb |
private LinkedList |
outEdges |
long |
rb |
long |
st |
boolean |
stacked |
private String |
taskName |
long |
tempFT |
long |
tempST |
long |
tlevel |
private long |
upLen |
private long |
weight |
Constructor and Description |
---|
Node(String id) |
Node(String id,
String name,
int n,
long w) |
Node(String id,
String name,
long w)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addIn(Edge e)
add a data dependency edge to this task
|
void |
addOut(Edge e)
add a data dependency edge from this task
|
Set |
buildAncestors()
build the list of ancestor tasks
|
Set |
buildDescendants()
build the list of descendant tasks
|
boolean |
checkIn()
check whether all parent tasks are finished.
|
void |
checkIntegrity()
check all child task's start time is scheduled after the finishtime of this task
|
boolean |
equals(Object e) |
long |
evalWeight()
return execution time of this task
|
long |
getAncET() |
int |
getAncSize() |
long |
getDepET() |
int |
getDepSize() |
long |
getDesET() |
int |
getDesSize() |
long |
getDownLen()
return the DnLength of this task.
|
String |
getID() |
LinkedList |
getIn()
return the list of incoming edges.
|
LinkedList |
getOut()
return the list of outgoing edges.
|
long |
getUpLen()
return the UpLength of this task.
|
void |
init() |
void |
initOut(boolean s,
long et)
notify child nodes that this task will finish at time et
|
boolean |
isAnc(Node n) |
boolean |
isBottom()
Check whether this task is the exit task or not.
|
boolean |
isDes(Node n) |
boolean |
isFree()
used for DSC algorithm
|
boolean |
isTop()
Check whether this task is the entry task or not.
|
boolean |
moveLeft(LinkedList[] timeMap,
int limit,
long bound)
Redistribute this task to the earlier time.
|
boolean |
moveRight(LinkedList[] timeMap,
int limit,
long bound)
Redistribute this task to the later time.
|
boolean |
NPbalance(LinkedList[] timeMap,
int limit,
boolean force)
Non-propagate redistribution of this task
|
void |
print() |
private int |
pushedChildren(long timeLimit) |
private int |
pushedParents(long timeLimit) |
void |
removeIn(Edge e)
remove a specified data dependency edge from this task
|
void |
removeOut(Edge e)
remove a specified data dependency edge from this task
|
void |
setWeight(long w)
set execution time of this task
|
private void |
updateDownLen() |
void |
updateLeftBound(long nlb,
TreeSet set)
update EST(earliest start time) of this task.
|
void |
updateRightBound(long nrb,
TreeSet set)
update LFT(latest finish time) of this task.
|
private void |
updateUpLen() |
public static final long DEFAULT_WEIGHT
private LinkedList inEdges
private LinkedList outEdges
private Edge critEdge
private String id
private String taskName
private long weight
private long upLen
private long downLen
private HashSet ancestors
private HashSet descendants
public long st
public boolean stacked
public long lb
public long rb
public long olb
public long orb
public long tempST
public long tempFT
private long ancET
private long desET
public int cluster
public long tlevel
public boolean examined
public Node(String id, String name, long w)
id
- the unique ID of this taskname
- task name(executable name)w
- predicted execution timepublic Node(String id)
public void init()
public void setWeight(long w)
w
- excution timepublic long evalWeight()
public void addIn(Edge e)
e
- the edge to be addedpublic void removeIn(Edge e)
e
- the edge to be removedpublic void addOut(Edge e)
e
- the edge to be addedpublic void removeOut(Edge e)
e
- the edge to be removedpublic boolean checkIn()
public LinkedList getIn()
public LinkedList getOut()
public void initOut(boolean s, long et)
et
- finish timeprivate void updateUpLen()
public long getUpLen()
private void updateDownLen()
public long getDownLen()
public boolean isTop()
public boolean isBottom()
public String getID()
public void updateLeftBound(long nlb, TreeSet set)
nlb
- new ESTset
- set of ancestor taskspublic void updateRightBound(long nrb, TreeSet set)
nrb
- new LFTset
- set of descendant taskspublic boolean NPbalance(LinkedList[] timeMap, int limit, boolean force)
timeMap
- List of scheduled tasks at each time slot. i.e., Occupation diagram itselflimit
- maximum height of Occupation diagram. The result of redistribution should cause taller height of this limit.force
- Not used.public boolean moveLeft(LinkedList[] timeMap, int limit, long bound)
timeMap
- List of scheduled tasks at each time slot. i.e., Occupation diagram itselflimit
- maximum height of Occupation diagram. The result of redistribution should cause taller height of this limit.bound
- Earliest time this tasks can be scheduled.public boolean moveRight(LinkedList[] timeMap, int limit, long bound)
timeMap
- List of scheduled tasks at each time slot. i.e., Occupation diagram itselflimit
- maximum height of Occupation diagram. The result of redistribution should cause taller height of this limit.bound
- Lastest time this tasks can be scheduled.private int pushedParents(long timeLimit)
private int pushedChildren(long timeLimit)
public void checkIntegrity()
public Set buildDescendants()
public Set buildAncestors()
public int getDepSize()
public int getAncSize()
public int getDesSize()
public long getAncET()
public long getDesET()
public long getDepET()
public boolean isAnc(Node n)
public boolean isDes(Node n)
public void print()
public boolean isFree()