Skip to content

sim start time #1743

@bradNASA

Description

@bradNASA

Checked for duplicates

No - I haven't checked

Alternatives considered

Yes - and alternatives don't suffice

Related problems

I'm frustrated when I want to use temporal subset sim, but if the sim and plan start times are different, the mission model cannot determine the current date-time because only the plan start time is passed in to it, and Aerie provides no way to get the time (e.g., as an Instant), only the passing duration.

At least one modeler (Brad Clement) expected that Resources.currentTime() would return the difference in plan and start times at the beginning of the simulation, but it returns Duration.ZERO.

SRL cannot use temporal subset sim as a result. Clipper does not use it either.

Here's a paste from a slack conversation:

Bradley J Clement
Monday at 11:08 AM
Temporal subset sim question:
I have tasks that need an Instant for the current time. When subset sim is run, I don't know how to get that. A plan start is passed to the mission model, but it is not the sim start time, and Resource.currentTime() returns 0 at the beginning of the simulation for a subset sim. Is there an alternative constructor for the mission model that gets both the plan start and sim start?
14 replies

Bradley J Clement
Monday at 11:09 AM
For example, I have a discrete string resource for the current Sol number, e.g., "Sol 4116."
11:11
A simpler example, I have a String resource for day boundaries for Pacific Time, the first in this screenshot:
image.png

image.png

11:13
All of these are wrong because they are based on plan start instead of the simulation start.
11:15
Is there a way to get the sim start from the mission model, or should I make a feature request? (edited)

Matthew L Dailis
Monday at 11:29 AM
I see... so your model assumes that the current time is always plan start + duration elapsed, but that assumption doesn't hold when you start the simulation in the middle of the plan :thinking_face: (edited)

Bradley J Clement
Monday at 12:02 PM
Right, in essence, you can't know what the current time is.

12:05
I asked @David Legg about this for incons for Clipper, and he said the problem hasn't bitten them yet.
12:06
But, wouldn't spice calls be wrong?
:blob-yes:
1

David Legg
Monday at 12:16 PM
To be clear - I think the issue hasn’t bitten clipper, because clipper uses full plans. In that case, plan start = sim start, irrespective of incons, so spice works.
I suspect if Clipper used subset sim, it would bite us immediately.
:agree:
1
👍
1

Matthew L Dailis
Monday at 12:19 PM
@Bradley J Clement can you elaborate a bit about why your use case requires temporal subset simulation?
12:22
After determining the answer to the above question, we can evaluate paths forward...
It seems to me the options are:
Make a new plan that starts at the time you want to simulate from
Simulate your current plan from the beginning
Add a parameter to the mission model where you manually set the start time
Change Aerie to provide the simulation start as if it were the plan start
Change Aerie to provide both times
Change Aerie to remove the temporal subset simulation feature since the customer that requested the feature (Clipper) doesn't even use it 😉

Bradley J Clement
Monday at 12:24 PM
It was actually another user on SRL. Maybe the 100-sol plans are taking minutes, and they don't want to wait. I don't think we need it.
👍
1

David Legg
Monday at 12:33 PM
Out of curiosity - why does Aerie pass the plan start and not the sim start to the model constructor? If we’re simulating, isn’t the simulation start time what matters most?

Matthew L Dailis
Monday at 12:37 PM
I believe there was a fair amount of consternation around the model behaving differently depending on whether it was being simulated in a full plan vs a subset plan, and so this information was hidden
As this use case clearly shows, that design decision is a little self-defeating because it makes it harder for a mission model implementer to keep the behavior consistent (edited)
🤔
1

Describe the feature request

I need or want either the sim start time passed to the mission model constructor (in addition to the plan start time) or a built-in resource that gives me the current date-time.

Independent of this issue, I would also like the plan horizon/duration or the end time passed in to the mission model constructor. For this issue, this would include the sim end time, too.

Independent of this issue, I would also like to be able to access to the plan (directives) from the mission model, whether passed in or provided another way.

The workaround is to require the user to specify the sim start time in some way through the sim configuration . This would be error prone. Another workaround is to use directives in the plan at fixed/known times that set a clock resource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new feature or feature request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions