NASA-AMMOS / aerie

A software framework for modeling spacecraft.
https://nasa-ammos.github.io/aerie-docs/
MIT License
73 stars 19 forks source link

Spawn Spans from Model Daemons #1381

Open pranav-super opened 7 months ago

pranav-super commented 7 months ago

Checked for duplicates

No - I haven't checked

Alternatives considered

Yes - and alternatives don't suffice

Related problems

No response

Describe the feature request

The goal of this feature request would be the ability to spawn activity spans from a daemon. Currently, the only ways to get an activity span into AERIE is via an activity directive, or via activity decomposition (which requires an activity directive as well). We would like for it to be possible for a span to appear in the activity timeline without a parent activity or a directly related activity directive - rather it is spawned in from a daemon during simulation. Presently, attempts to do so simply don't show up in the user interface.

There is one alternative that was considered but was ultimately decided as undesirable, for reasons that will be explained in the next paragraph. This alternative is to have a daemon like activity with a duration equivalent to the span horizon. Then, the resulting spans that are spawned by it would be children, like any regular activity decomposition. The reason this was deemed undesirable is that we did not want an activity that lasts the entire duration of the plan with a very long span, as it looks slightly misleading and confusing, and we would prefer, in implementation, to localize the daemon not to an activity but the component of the mission model that it is relevant to, like any other daemon.

The reasoning behind why we want to place spans from a daemon, as opposed to just using activity directives, is that we would like for there to be a way to place activities in the timeline that cannot be moved, to represent events that necessarily occur at a fixed point in time. We would ingest a file specifying when these happen, and from that the daemon would place these spans which cannot be moved, logically binding the spans to the contents of the file. Should the file contents change, so too, would the placement of the spans. Activity directives can be shifted around, and if an ingest that influences where these directives are scheduled is changed, the directive doesn't shift but rather a new one is placed alongside the old one. To avoid this undesirable behavior, we would like to spawn spans directly from an in-model daemon, without the use of a daemon activity.