stella
Interface Appointable

All Superinterfaces:
Handable, TargetDefinition
All Known Implementing Classes:
GrbTarget, ParsedTarget

public interface Appointable
extends Handable

An interface describing an astronomical target that is aware of its current dispatch-scheduling properties. This includes methods to find out if a target is observable, how long it'll stay observable under unchanged weather conditions, and how long an observation under the current observing conditions may take.

Because targets that may be part of a sophisticated scheduling system, they must also support low-level handling properties. Therefore, this interface extends the Handable interface rather than the TargetDefinition.


Nested Class Summary
static interface Appointable.Constraint<T>
          A constraint imposed on all targets.
 
Method Summary
 double getActualMerit(ParameterClustering condition, Collection<? extends TargetDefinition> targets, long timespan)
          Gets the value of the actual merit.
 Date getDailyDate()
          The date of the high daily merit.
 double getDailyMerit()
          The highest merit in the last 24 hours.
 Date getHighestDate()
          The date of the highest merit.
 double getHighestMerit()
          The highest merit ever achieved.
 Appointable.Constraint getLastFail()
          The conditions which lately rendered this target unobservable
 double getLastMerit()
          The last measured merit.
 long getObservingTime(ParameterClustering condition)
          Returns an estimate of the time required for an observation of this target.This is only an advisory method and will not return a very accurate estimate, but it should also work if the parameters handed over are invalid.
 long getRemainingTime(ParameterClustering condition)
          Returns the time this target will remain observable under current weather conditions.
 boolean isAbort(ParameterClustering set)
          Signals that the execution of this target should be aborted.
 boolean isObservable(ParameterClustering condition)
          Checks if this target is currently observable.
 boolean isProgramOver(ParameterClustering set)
          Test, if the observing program on the target is completed.
 boolean isRetry(ParameterClustering set)
          Signals that the target should be retried immediately.
 
Methods inherited from interface stella.Handable
errorDaughter, errorMain, errorSuccessor, isEnabled, isFinished, isNotify, isPicked, setEnabled, setFinished, setPicked
 
Methods inherited from interface stella.TargetDefinition
getDaughters, getDescription, getDescriptionID, getEmailAddresses, getImageType, getInstitution, getName, getPrecursor, getSuccessor, getTargetResource, getTargetSpecific, getTeam, getTitle, getType, getUser, setPrecursor
 

Method Detail

isObservable

boolean isObservable(ParameterClustering condition)
Checks if this target is currently observable. This method is for the benefit of pre-selection. Targets that are not observable are not considered for dispatch-scheduling.

Parameters:
condition - A set of actual observing conditions
Returns:
True if the target is currently observable.

getActualMerit

double getActualMerit(ParameterClustering condition,
                      Collection<? extends TargetDefinition> targets,
                      long timespan)
Gets the value of the actual merit. The merit is used for scheduling. The merit is a number the higher the higher the current priority. Normally, the merit is calculated in accordance with the current observing conditions which are reflected in the parameter set handed over to this method. Note that the target assumes that all parameters are actual.
The actual merit should be calculated in a way that it returns the maximum the merit will achieve in the projected observation period supplied to this method in the last parameter. Non time-depending targets may ignore this parameter. If the time span is zero, the observing time as returned by getObservingTime(stella.ParameterClustering) should be used.

Parameters:
condition - A set of actual observing conditions
targets - All targets relavant for this target.
timespan - The timespan within the merit should be maximized.
Returns:
A merit.

isProgramOver

boolean isProgramOver(ParameterClustering set)
Test, if the observing program on the target is completed. Target that are completed are removed from the scheduler list. Normally, an EndpointDefining merit is needed to answer the completeness puzzle. If a target first encounters that it is program-over, the target should change its completeness flag.


getRemainingTime

long getRemainingTime(ParameterClustering condition)
Returns the time this target will remain observable under current weather conditions. This is only an advisory method and will not return a very accurate estimate.


getObservingTime

long getObservingTime(ParameterClustering condition)
Returns an estimate of the time required for an observation of this target.This is only an advisory method and will not return a very accurate estimate, but it should also work if the parameters handed over are invalid.


isAbort

boolean isAbort(ParameterClustering set)
Signals that the execution of this target should be aborted. This can happen during regular execution due to changing conditions, or due to previous errors encountered.


isRetry

boolean isRetry(ParameterClustering set)
Signals that the target should be retried immediately. Think of a target that consists of a couple of calibration stars. Pick one, this fails, so you can block the failed one, but immedeately retry the target. Retry should also take previous errors into account.


getLastFail

Appointable.Constraint getLastFail()
The conditions which lately rendered this target unobservable


getLastMerit

double getLastMerit()
The last measured merit.


getHighestMerit

double getHighestMerit()
The highest merit ever achieved.


getDailyMerit

double getDailyMerit()
The highest merit in the last 24 hours.


getHighestDate

Date getHighestDate()
The date of the highest merit.


getDailyDate

Date getDailyDate()
The date of the high daily merit.