JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.EOSscheduling
Class SlewTimeline

java.lang.Object
  extended bygov.nasa.javaGenes.EOSscheduling.Timeline
      extended bygov.nasa.javaGenes.EOSscheduling.SlewTimeline
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SlewTimelineNone

public class SlewTimeline
extends Timeline

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nasa.javaGenes.EOSscheduling.Timeline
debug, horizon, nodeArray, nodeFactory, nodeList, NOT_SCHEDULED
 
Constructor Summary
SlewTimeline()
           
SlewTimeline(Horizon inHorizon, int typicalSlewDuration)
           
 
Method Summary
 void assertIsValid()
           
protected  boolean endTimeOK(SlewNode node, int time, SlewRequirement slew, Slewable slewable)
           
protected  int findEarliest(int start, int end, int duration, SlewRequirement slew, Slewable slewable)
          This will happen a lot and must be very fast.
 int findEarliest(int start, int end, SchedulingData schedulingData)
           
 boolean fits(int start, SchedulingData schedulingData)
           
protected  int getEarliestStartTimeInNode(SlewNode node, int start, SlewRequirement slew, Slewable slewable)
           
 boolean[] getRampArray()
           
 double[][] getSlewArray()
          for test and debug
 int[] getStartTimesArray()
           
 int getTotalSlewTime(Slewable slewable)
           
protected  boolean incompatibleSlewInMiddle(SlewRequirement slew, SlewNode start, SlewNode end, Slewable slewable)
           
protected  void insertAt(int startTime, int endTime, SlewRequirement slew)
          assumes the insertion is legal.
 void insertAt(int start, SchedulingData schedulingData)
          assumes the insertion is legal
 boolean isLastEndNode(SlewNode node)
          for testing only
 boolean isLastStartNode(SlewNode node)
          for testing only
 void printToTsd(java.lang.String filename)
           
protected  void setLastNodes(Node start, Node end)
          for testing only
 void setUpNodeList()
           
 
Methods inherited from class gov.nasa.javaGenes.EOSscheduling.Timeline
getEnd, getFirstNode, getHorizon, getInitialNodeForNodeArray, getNodeAtTime, getStart, horizonIsValid, includes, includes, initialize, initializeAllTimelines
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlewTimeline

public SlewTimeline()

SlewTimeline

public SlewTimeline(Horizon inHorizon,
                    int typicalSlewDuration)
Method Detail

setUpNodeList

public void setUpNodeList()
Overrides:
setUpNodeList in class Timeline

getSlewArray

public double[][] getSlewArray()
for test and debug


getRampArray

public boolean[] getRampArray()

getStartTimesArray

public int[] getStartTimesArray()

getTotalSlewTime

public int getTotalSlewTime(Slewable slewable)

printToTsd

public void printToTsd(java.lang.String filename)

assertIsValid

public void assertIsValid()
Overrides:
assertIsValid in class Timeline

isLastStartNode

public boolean isLastStartNode(SlewNode node)
for testing only


isLastEndNode

public boolean isLastEndNode(SlewNode node)
for testing only


setLastNodes

protected void setLastNodes(Node start,
                            Node end)
for testing only


fits

public boolean fits(int start,
                    SchedulingData schedulingData)
Specified by:
fits in class Timeline

findEarliest

public int findEarliest(int start,
                        int end,
                        SchedulingData schedulingData)
Specified by:
findEarliest in class Timeline

findEarliest

protected int findEarliest(int start,
                           int end,
                           int duration,
                           SlewRequirement slew,
                           Slewable slewable)
This will happen a lot and must be very fast. Avoid unnecessary tests and object creation.

Returns:
time time >= start time <= end || NOT_SCHEDULED

incompatibleSlewInMiddle

protected boolean incompatibleSlewInMiddle(SlewRequirement slew,
                                           SlewNode start,
                                           SlewNode end,
                                           Slewable slewable)

getEarliestStartTimeInNode

protected int getEarliestStartTimeInNode(SlewNode node,
                                         int start,
                                         SlewRequirement slew,
                                         Slewable slewable)

endTimeOK

protected boolean endTimeOK(SlewNode node,
                            int time,
                            SlewRequirement slew,
                            Slewable slewable)

insertAt

public void insertAt(int start,
                     SchedulingData schedulingData)
assumes the insertion is legal

Specified by:
insertAt in class Timeline

insertAt

protected void insertAt(int startTime,
                        int endTime,
                        SlewRequirement slew)
assumes the insertion is legal. Puts in two slew nodes, one at startTime and the other at endTime with the same slew requirement (assumes the slew doesn't change during the observation).


JavaGenes, NASA Ames. Written largely by Al Globus