Replies: 3 comments 2 replies
-
@jmorton, thank you for the detailed description on your plans to support plan-independent events into Aerie. We would definitely love to continue to collaborate to fit this idea into Aerie. One additional motivation to note is that the Consultative Committee for Space Data Systems (CCSDS) is currently drafting a standard for Mission Planning and Scheduling services that includes the concept of a "Planning Event" and "Planning Event Type", which is separate from an "Activity" and "Activity Type". If those are interested, these concepts are discussed in the Mission Planning and Scheduling Green Book, which is an information book intended to inform the actual standard (Blue Book). If you feel comfortable, the community may also be interested in seeing some of the specifications you have designed out for the various elements of your design (e.g. source, source type, event type). |
Beta Was this translation helpful? Give feedback.
-
@jmorton Thank you for the detailed write-up! I have one major question and two minor topics I just want your clarification on: My major question is: Minor topics I'd like clarification on:
|
Beta Was this translation helpful? Give feedback.
-
Hi. I got aware of this effort not long ago, but I couldn't read the discussion until today. I have been also developing the concept of events in the frame of VIOLET, which is a library that extends Aerie with focus on multi-mission mission analysis. In VIOLET, the motivation to implement events is somewhat similar. I wanted to be able to model asynchronous, uncontrollable FACTS that can influence the plan generation process. As examples, I am using events to model when a fault or an opportunistic science happens. I am modelling events as a triplet: The condition could represent a constant, a variable value, a probability distribution, ... . If the condition is triggered, then an activity is executed. The task is an Aerie activity where you put whatever logic you want. As an example, for the fault example, the task FaultEvent adds a fault to spacecraft queue and a change to a non-nominal status. This change in turns triggers the spacecraft to repair the fault. "mission_phase": "traverse", Values like recovery are stored in the EventsProperties. VIOLET incorporates the concept of condition and effect to the model. That could allow me in the future to incorporate definitions to support automated planning throw expressions such as: (:event low-battery This expression is from a model I'm doing for a rover in the PDDL language. I am defining this events in what would be the equivalent of Problem definition in the world of planning, that is, in the specific instantiation of your mission model containing the initial states, events and goals necessary to produce a plan. I think the two approaches have some overlap but also complement each other |
Beta Was this translation helpful? Give feedback.
-
Introduction
This discussion proposes the concept of plan-independent events. In this proposal, we explain the underlying motivation, envisioned use cases, and a high-level design that considers real-world challenges.
But before diving in, let me introduce ourselves and provide some additional background. I'm Jonathan Morton, I manage a software team at NASA Goddard Space Flight Center (GSFC) in the Science Mission Operations (SSMO). We have a squad focused on mission planning that includes myself, Pranav Subramanian, and Joe Volosin. Mission planning is one of the core capabilities required by mission operators. We have a strong desire to adopt a common mission planning system for future missions and think Aerie could be the one! To that end, our team wants to collaborate with the Aerie community to identify, explore, and realize new capabilities of value, not just for the SSMO, but the Aerie community at large.
Motivation
We have explored various ways of using resources and activities to manage information about things that will happen beyond a planner's immediate control that influence their decision making (e.g., orbital events, view periods, etc...). Planners at SSMO distinguish between "events" and what they want to do about them (i.e., activities). Although there are ways to represent event data using activities and resources, we perceive a difference between their apparent purposes. Activities seem to be about what a planner wants to do, are intended to be mutable, always occur within the context of a plan, and are produced as part of the planning process. Resources, although related to events, are more about understanding how state changes over time as activities occur. Events are continually revised predictions that may be superseded by subsequent events; are derived from external sources that potentially span multiple planning periods; and are immutable.
We also need to manage the underlying data sources that inform plans separate from any one specific plan. It is our preference to manage such externally provided data sources within Aerie itself, rather than a separate tool or application.
Goals and Use Cases
Our primary goal is to give planners a way to manage different types of data sources and reference the contained events in plans.
Here is a summary of our envisioned use cases:
Basic Use Cases
Overlapping Sources
Event-Aware Scheduling and Constraints
Advanced Event Type and Source Type Management
Approach
We will take incremental steps toward the ultimate goal, explain what we did and why, gather feedback, and take another – more informed – next step. We are currently...
Concepts
As part of this work, we have realized the following concepts:
This entity relationship diagram illustrates the relationship between these concepts:
This is an example of a JSON representation of a source that contains one event:
Please note: We are very open to naming and organization choices. We have, for the sake of brevity, used shorter names than what would actually be used in the database.
The next sections delves into challenges and implications that inform this proposed (and tentative) structure.
Challenges
There are many challenges to be faced as part of this proposal. We begin with five challenges and explain their implication on our initial design, knowing there will be more to come.
Challenge 1: Source Data Format Variety
Sources come in many different formats that provide various types of events. We propose a JSON representation of sources and events to avoid contending with problems related to handling variety before we do anything else.
Implication 1: Users need to be able to distinguish between types of sources and events. This motivates having a "type" property. We think it is reasonable to differentiate between types of events within a source. There is a separate challenge we identify to discuss versioning of such types and an open question about whether different source types can include the same event type.
Implication 2: Arbitrary properties at the both the source-level and event-level motivate using JSONB to store those properties in the database. We can use JSON schemas to enforce requirements for specific source and event types.
Challenge 2: Source Data Have Rolling Windows
Planners typically receive data that covers a rolling period of time. For example, they may receive a weekly report describing predicted events for a 90-day period. In some cases, changes between events can be clearly established because events have an externally provided identifier. In other cases, it can be difficult to establish equivalence between events from different sources. This has major user experience implications for planners when an activity is predicated on a superseded event. Without a clear identifier, it is more difficult to suggest planners with a resolution.
Our initial foray into a relational model indicates that we can handle both cases using views to distill events. The presence of an externally provided identifier for an event (i.e., a key) – although helpful – is not essential to handle rolling windows. Our preliminary exploration will focus on "keyed" (externally identified events).
Finally, some data sources may not explicitly state that an event contained in previous source was removed; in other words, it is simply omitted and only inferred that the event is no longer expected to happen.
Implication 1: A source must have an explicit ordering property relative to other sources. An implicit property such as the time a file is uploaded could produce surprising and unexpected behavior. The intention of the "valid_at" property seen in the above sample is to provide the ability to order sources.
Implication 2: Sources must explicitly specify the period of time they cover. Without this, it is not possible to determine if events should be treated as if they were removed.
Implication 3: We must maintain an immutable history of all sources and events. We will not update entities in place. Without a history, we impair planners' decision making.
Challenge 3: Externally Provided Identifiers Are Not Coordinated Across Types
Although sources may contain externally provided identifiers, no authority exists to guarantee their global uniqueness.
Implication 1: We must ensure that constraints or aggregates don't treat externally providers as globally unique IDs. Any constraints that are defined, should be also consider an event type.
Challenge 4: Type Definitions May Change
We anticipate a need to support evolving definitions of source-types and event-types. To support this, we suggest a version-aware database schema. Our intent is to allow for an arbitrary JSON schema to enforce type specific requirements of different sources.
Implication 1: Source types and event types must support versioning.
Implication 2: Actual sources and events must refer to a type and version.
Implication 3: We must ensure our uniqueness constraints consider type and type version.
Challenge 5: Event Relationships (e.g., Hierarchy)
We would appreciate community guidance on the subject of relationships between events. Our initial exploration of this topic has been thought provoking yet inconclusive. Although some notion of "parent-child" relationships seems intuitive, the real meaning of a "child" event is unclear.
Furthermore, given the rolling nature of sources, we anticipate many scenarios that will require thorough elaboration consideration to arrive at well-defined system behavior.
Implication: We will defer modeling any event relationships until we have more input.
Other Challenges
Transformers: Providing mission modelers or planners with a way to specify how raw data is transformed into a canonical representation is worth considering. However, it's too early for us to make a recommendation about whether this responsibility is within the scope of Aerie. I am sure the community will have input on this topic!
Streaming: It is conceivable that missions may want to subscribe to a streamed source of events. This suggest that our data model should carefully consider uniqueness constraints and explicit ordering of events. However, we will defer modeling this until further discussion.
Retrodictions: There may be use cases related to viewing historical events (i.e. "retrodictions") to a plan. This could be useful when analyzing executed plans to reason about actual and expected behavior.
Conclusion
Providing a way to support plan-independent events introduces many challenges. We are deeply grateful for your consideration and willingness to collaborate; we are eager to hear your feedback and guidance as we explore this concept.
Beta Was this translation helpful? Give feedback.
All reactions