-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Temporal Subset Simulation #725
Conversation
d163d80
to
b7ee375
Compare
b7ee375
to
a1f4c0b
Compare
a1f4c0b
to
bd3ba6a
Compare
bd3ba6a
to
c962456
Compare
c962456
to
366f83c
Compare
Could you fill out the Documentation section of the PR template? If no documentation has been written - could you link to the ticket to write this documentation? I just pulled this branch and will play around a bit now - I don't expect to do a super detailed code review since we chatted about this a couple weeks ago, and it sounds like you guys had a good code walkthrough last week, but I would like to glance over it with the freshest pair of eyes I've had in a while 😅 |
* Update simulated_activity to use new columns * Add trigger to maintain offset_from_plan_start * Update MerlinDBTests to reflect new Trigger
* Change signature of SimulationDriver.simulate (Breaking Change) * Modify existing tests to use new signature
* Split getPlan into getPlanForSimulation(gets Plan/Activity/Simulation info) and getPlanForValidation (only gets the Plan/Activity info)
* Prevent NullPointerException in StartOffsetReducer.compute
* Add Tests for null input
* Remove Unneeded CreateSimulationAction
…cord * Update Get Actions to reflect this
* Update Get and Create Actions to reflect this * Update PostgresCellResults to reflect these changes
* Update SimulationEngine to output final elapsed time simulation duration
95cc3cc
to
358bde9
Compare
...in/java/gov/nasa/jpl/aerie/merlin/server/remotes/postgres/PostgresResultsCellRepository.java
Show resolved
Hide resolved
* Promoted AnchorTestModel to package-private
* remove delete_simulation_by_pk from DeleteSimulation
358bde9
to
6616391
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me. I didn't pull out my fine-toothed comb, but Adrien's review, and the level of testing give me confidence in this change. I'm looking forward to exercising it more as we implement the UI portion of this feature 🚀
Description
Database Changes
simulation
andsimulation_template
. They are both nullable, but between the two tables each column must have a value for a given row insimulation
. For example, if asimulation
row references a template, either the template or the simulation row can provide the sim start and end time, but if asimulation
row doesn't reference a template, it must provide these values.simulation
upon a row being inserted intoplan
simulation
to allow only one row per plan (If this constraint is currently violated in the DB, the migration introducing it will fail).simulation_dataset
now has columns for what bounds the simulation was run over, as well as what the provided arguments were.simulation_dataset
'soffset_from_plan_start
is now solely maintained via trigger rather than by direct update.simulated_activity
view was updated to have the correct start time for spans from temporal subset simulationsMerlin Changes
getPlan
was split intogetPlanForValidation
andgetPlanForSimulation
in order to avoid needlessly hitting up the database.duration
field.Breaking Changes
The following breaking changes occurred:
simulation
ortemplate
rows. (See Database Changes for more information)Verification
null
inputs, there are tests for these cases.Documentation
Documentation ticket for the API changes can be found here.
Future work
getPlanForSimulation
, I'd like to split them from the Plan class, either by putting them in their own class or by moving them into a subclass of Plan.simulation_dataset
'soffset_from_plan_start
column.