-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #947 from NASA-AMMOS/855-860-catch-sim-exceptions-…
…refactor-rootfinding Refactor rootfinding to simulate less and catch simulation exceptions
- Loading branch information
Showing
11 changed files
with
281 additions
and
466 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...nmodel/src/main/java/gov/nasa/jpl/aerie/foomissionmodel/activities/LateRiserActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package gov.nasa.jpl.aerie.foomissionmodel.activities; | ||
|
||
import gov.nasa.jpl.aerie.foomissionmodel.Mission; | ||
import gov.nasa.jpl.aerie.merlin.framework.annotations.ActivityType; | ||
import gov.nasa.jpl.aerie.merlin.framework.annotations.ActivityType.EffectModel; | ||
|
||
/** | ||
* An activity that can't be scheduled in the first 60 seconds of the horizon | ||
*/ | ||
@ActivityType("LateRiser") | ||
public record LateRiserActivity() { | ||
@EffectModel | ||
public void run(final Mission mission) { | ||
if (mission.timeTrackerDaemon.getMinutesElapsed() < 1) { | ||
throw new RuntimeException("Can't be scheduled THAT early"); | ||
} | ||
} | ||
} |
13 changes: 6 additions & 7 deletions
13
...ssionmodel/src/main/java/gov/nasa/jpl/aerie/foomissionmodel/models/TimeTrackerDaemon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.