Class TimeExpressionRelative
java.lang.Object
gov.nasa.jpl.aerie.scheduler.constraints.timeexpressions.TimeExpressionRelative
- Direct Known Subclasses:
TimeExpressionRelativeBefore,TimeExpressionRelativeBinary,TimeExpressionRelativeSimple
class allowing to define dynamic expressions of timepoints, relative to time anchors
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final List<org.apache.commons.lang3.tuple.Pair<TimeUtility.Operator, gov.nasa.jpl.aerie.merlin.protocol.types.Duration>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOperation(TimeUtility.Operator operator, gov.nasa.jpl.aerie.merlin.protocol.types.Duration operand) static TimeExpressionRelativeafterEnd()static TimeExpressionRelativestatic TimeExpressionRelativeatStart()static TimeExpressionRelativestatic TimeExpressionRelativeabstract gov.nasa.jpl.aerie.constraints.time.IntervalcomputeTime(gov.nasa.jpl.aerie.constraints.model.SimulationResults simulationResults, Plan plan, gov.nasa.jpl.aerie.constraints.time.Interval interval) A TimeExpressionRelative must implement this methodstatic TimeExpressionRelativeabstract voidextractResources(Set<String> names) static TimeExpressionRelativefromAnchor(TimeAnchor anchor) abstract Optional<TimeAnchor> static TimeExpressionRelativeoffsetByAfterEnd(gov.nasa.jpl.aerie.merlin.protocol.types.Duration dur) static TimeExpressionRelativeoffsetByAfterStart(gov.nasa.jpl.aerie.merlin.protocol.types.Duration dur) static TimeExpressionRelativeoffsetByBeforeEnd(gov.nasa.jpl.aerie.merlin.protocol.types.Duration dur) static TimeExpressionRelativeoffsetByBeforeStart(gov.nasa.jpl.aerie.merlin.protocol.types.Duration dur)
-
Field Details
-
operations
protected final List<org.apache.commons.lang3.tuple.Pair<TimeUtility.Operator,gov.nasa.jpl.aerie.merlin.protocol.types.Duration>> operations -
DEF_NAME
- See Also:
-
-
Constructor Details
-
TimeExpressionRelative
public TimeExpressionRelative()
-
-
Method Details
-
computeTime
public abstract gov.nasa.jpl.aerie.constraints.time.Interval computeTime(gov.nasa.jpl.aerie.constraints.model.SimulationResults simulationResults, Plan plan, gov.nasa.jpl.aerie.constraints.time.Interval interval) A TimeExpressionRelative must implement this method- Parameters:
plan- the current planinterval- the range on which the relative time expression must be computed- Returns:
- a range of valid times satisfying the expression
-
getAnchor
-
extractResources
-
fromAnchor
-
addOperation
public void addOperation(TimeUtility.Operator operator, gov.nasa.jpl.aerie.merlin.protocol.types.Duration operand) -
atStart
-
offsetByAfterStart
public static TimeExpressionRelative offsetByAfterStart(gov.nasa.jpl.aerie.merlin.protocol.types.Duration dur) -
offsetByBeforeStart
public static TimeExpressionRelative offsetByBeforeStart(gov.nasa.jpl.aerie.merlin.protocol.types.Duration dur) -
offsetByAfterEnd
public static TimeExpressionRelative offsetByAfterEnd(gov.nasa.jpl.aerie.merlin.protocol.types.Duration dur) -
offsetByBeforeEnd
public static TimeExpressionRelative offsetByBeforeEnd(gov.nasa.jpl.aerie.merlin.protocol.types.Duration dur) -
beforeEnd
-
beforeStart
-
afterEnd
-
afterStart
-
endsBefore
-