EditablePlan

interface EditablePlan : Plan

A plan representation that can be edited and simulated.

Functions

Link copied to clipboard
abstract fun commit()

Commit plan edits, making them final.

Link copied to clipboard
abstract fun create(directive: NewDirective): ActivityDirectiveId

Create a new activity.

open fun create(type: String, start: DirectiveStart, arguments: Map<String, SerializedValue>): ActivityDirectiveId

A simplified version of create with minimal arguments.

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

Get the latest simulation results.

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 rollback(): List<Edit>

Roll back uncommitted edits.

Link copied to clipboard

A simplified version of simulate which uses the default configuration.

Simulate the current plan, including committed and uncommitted changes.

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.