Plan

interface Plan

An interface for querying plan information and simulation results.

Functions

Link copied to clipboard

Queries all activity directives, deserializing them as AnyDirective.

Queries activity directives, filtered by type, deserializing them as AnyDirective.

abstract fun <A : Any> directives(type: String?, deserializer: (SerializedValue) -> A): Directives<A>

Query activity directives.

Link copied to clipboard
open fun duration(): Duration

The total duration of the plan, whether simulated on the full extent or not.

Link copied to clipboard

Get all external events across all derivation groups associated with this plan.

abstract fun events(query: EventQuery): ExternalEvents

Get external events associated with this plan.

Link copied to clipboard
abstract fun <V : Any, TL : SerialSegmentOps<V, TL>> resource(name: String, deserializer: (List<Segment<SerializedValue>>) -> TL): TL

Query a resource profile from the external datasets associated with this plan.

Link copied to clipboard
abstract fun toAbsolute(rel: Duration): Instant

Convert a relative duration to a time instant.

Link copied to clipboard
abstract fun toRelative(abs: Instant): Duration

Convert a time instant to a relative duration (relative to plan start).

Link copied to clipboard
abstract fun totalBounds(): Interval

Total extent of the plan's bounds, whether it was simulated on the full extent or not.