Skip to content
Open
Show file tree
Hide file tree
Changes from 226 commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
9678ef9
wip
mattdailis Feb 13, 2023
28ef5ca
separate cell reads from the EventGraph
bradNASA Feb 27, 2023
3ef9d17
cache facades, track staleness, map for cell read history
bradNASA Mar 3, 2023
2e62cb5
reschedule stale task, computed results now members of SimulationEngine
bradNASA Mar 4, 2023
54d9294
Combine extracting batches with performing jobs into a single step me…
mattdailis Mar 4, 2023
72baf61
Allow computeResults to receive resources from outside the engine
mattdailis Mar 4, 2023
4909674
Implement a resource tracker external to the simulation engine
mattdailis Mar 4, 2023
43b88f3
Expose USE_RESOURCE_TRACKER as a feature flag
mattdailis Mar 4, 2023
9c8a2a7
Set USE_RESOURCE_TRACKER to true in dev docker-compose
mattdailis Mar 4, 2023
ee7be56
update execution loop for incrmental sim
bradNASA Mar 5, 2023
8bbd42d
fixing some warnings and adding some comments
bradNASA Mar 6, 2023
de725f5
Merge branch 'develop' into prototype/incremental-sim
bradNASA Mar 7, 2023
9c4ae89
Merging changes from IncrementalSimulationDriver into ResumableSimula…
bradNASA Mar 7, 2023
1ad918f
remove renamed file
bradNASA Mar 23, 2023
2ca40b8
incr sim: noop events for reads in EventGraph again; task staleness a…
bradNASA Apr 19, 2023
79d1cdb
checking cells for staleness when stepping up
bradNASA Apr 20, 2023
29c6b3b
fix rescheduleStaleTasks to check stale reads
bradNASA Apr 20, 2023
0e985e5
step up cells from the right places; fix getCells(Topic)
bradNASA Apr 21, 2023
25599eb
cell cache for reads by re-run tasks in past
bradNASA Apr 22, 2023
bc5bac9
cell cache for reads by re-run tasks in past
bradNASA Apr 22, 2023
fcfe8aa
Merge branch 'prototype/incremental-sim' of github.com:NASA-AMMOS/aer…
bradNASA Apr 23, 2023
53c9eaa
move stepUp() logic out of TemporalCursor
bradNASA Apr 23, 2023
5321166
fix warnings; cleanup
bradNASA Apr 26, 2023
5e86e12
handle nulls
bradNASA Apr 29, 2023
b7c5fcd
fix for unit tests
bradNASA Apr 29, 2023
42f7385
fix more for unit tests
bradNASA May 1, 2023
9244f22
don't record resource profiles if not stale; clean up
bradNASA May 5, 2023
0cf30f9
incr sim CombinedSimulationResults, cellTimes marked before/after com…
bradNASA May 8, 2023
206145d
fix stepUp(), sharing driver curTime with engine and timeline
bradNASA May 13, 2023
2c0e6c0
Merge branch 'develop' into prototype/incremental-sim
bradNASA May 14, 2023
a0a0a22
fix merge from develop
bradNASA May 14, 2023
231ae38
fix for unit tests
bradNASA May 20, 2023
fc8c5b0
fix compile error
bradNASA May 20, 2023
e693c85
need more memory for gradle executor
bradNASA May 21, 2023
7d79afc
handle multiple commits per timepoint; fix for unit tests; all pass!
bradNASA May 21, 2023
d82fa72
rerun daemon tasks properly
bradNASA May 22, 2023
474cba3
SimulationDriver to support incremental sim like ResumableSimulationD…
bradNASA May 23, 2023
ef05c08
Diff schedule to use incremental simulation in LocalMissionModelService
bradNASA May 26, 2023
abf4344
Merge branch 'develop' into prototype/incremental-sim
bradNASA May 27, 2023
701516b
fix diff handling for incremental sim
bradNASA May 27, 2023
5cc8a94
remove TemporalEventSource.points
bradNASA May 27, 2023
63883df
Merge branch 'prototype/excise-resources-from-sim-engine' into protot…
bradNASA May 27, 2023
1ce907d
fixes after merge
bradNASA May 28, 2023
1b82d06
fix merge with funky iterators
bradNASA May 28, 2023
5d9c298
update resource tracker to work for all tests
bradNASA May 30, 2023
c25cbf4
remove commented out merge conflicts
bradNASA May 30, 2023
3635a0f
toString() functions for common Cells
bradNASA Jun 7, 2023
6260695
fixes to incremental sim; debug prints to be removed later
bradNASA Jun 7, 2023
ca8987c
remove segments for removed activities
bradNASA Jun 12, 2023
ad85617
inc sim tests in separate file
bradNASA Jun 12, 2023
05e5bb0
performance tests using Timer; separate computeResults()
bradNASA Jun 12, 2023
c551440
preserve Initializer interface to avoid breaking change
bradNASA Jun 16, 2023
eee6afa
add debug prints
bradNASA Jun 25, 2023
f2ac87d
fix for Cell stepped through some graphs
bradNASA Jul 5, 2023
7d95adc
Merge branch 'prototype/incremental-sim-resource-tracker' into isrt-i…
bradNASA Sep 12, 2023
207acf4
fix merge; compiles but fails tests, many for countSimulationRestarts()
bradNASA Sep 13, 2023
20c3345
fixes from merge: init time to MIN_VALUE and fix sim restart counts
bradNASA Oct 11, 2023
cb41610
avoid recursion in getCombinedEventsByTask(); need elsewhere, too
bradNASA Oct 13, 2023
30a068e
debug print
bradNASA Oct 13, 2023
33e8da1
add back horizon task in SimulationDriver
bradNASA Oct 13, 2023
fd9cf94
make removing from queue faster
bradNASA Oct 19, 2023
e4652f3
remove comments
bradNASA Oct 19, 2023
811bc6a
cleanup skip list calls
bradNASA Oct 19, 2023
f31fa5b
David Legg fixes job queue
bradNASA Oct 20, 2023
eb300bc
invalidate topics for waiting conditions
bradNASA Oct 20, 2023
aafbbae
fix computeSimulationResults(); new daemon test
bradNASA Oct 25, 2023
89064b7
many fixes and checkpoint
bradNASA Nov 13, 2023
b0ddd94
make cell times and cache consistent
bradNASA Nov 17, 2023
515c410
use SubInstantDuration instead of Duration
bradNASA Nov 20, 2023
6803f0f
fixes for SubInstantDuration
bradNASA Nov 29, 2023
04ec77f
use SubInstantDuration for staleness; fix step() for cells
bradNASA Dec 22, 2023
36c35d0
log sim cpu time
bradNASA Dec 22, 2023
ff5b95f
Merge branch 'develop' into isrt-indexed-subinstant-time-merge-develop
bradNASA Dec 22, 2023
310f1f9
compile fixes for merge
bradNASA Dec 22, 2023
90a3760
explicit type for dumb compiler
bradNASA Dec 23, 2023
d7860d4
improve performance:
bradNASA Jan 2, 2024
80b6966
don't update TaskInfo
bradNASA Jan 2, 2024
9091ef2
don't commit empty graphs except for task jobs; add comments to add()
bradNASA Jan 3, 2024
556ac55
more memory for large models in unit tests
bradNASA Jan 15, 2024
d268a5d
use a more human readable id for daemon tasks
bradNASA Feb 17, 2024
53aee5f
Merge branch 'develop' into dev-into-inc-sim
bradNASA Mar 31, 2024
0ed40b8
ORIGIN is TaskId, not SpanId
bradNASA Apr 1, 2024
d446f4e
build property to skip tests
bradNASA Apr 1, 2024
d8c4ff8
fixes for span ids but not enough
bradNASA Apr 22, 2024
12f5f19
use EventSource.Cursor
bradNASA Apr 23, 2024
422bcff
update gradle wrapper to 8.6
bradNASA Apr 23, 2024
e608ad9
better track TaskId parents/children; turned off testDaemon(), which …
bradNASA Apr 25, 2024
6cde964
update stale cells for resources before finishing
bradNASA Apr 27, 2024
89c2693
merge update-inc-sim into prototype/inc-sim to update branch to work …
jswope2112 Apr 29, 2024
bac5afb
Merge branch 'develop' into update-inc-sim
bradclement May 14, 2024
cece5b8
Merge branch 'update-inc-sim' into prototype/incremental-sim
bradclement May 17, 2024
290425e
Merge branch 'prototype/incremental-sim' into incremental-sim-merge-2111
Aug 8, 2024
487293f
rm unused printfs
Aug 12, 2024
aac0a72
rm useResourceTracker flag / envvar
Aug 12, 2024
da00c3a
move freeze() handling up to TemporalEventSource
Aug 12, 2024
207920e
rm unused imports
Aug 12, 2024
810fc40
rm spurious indent
Aug 12, 2024
9fc2558
rm resource tracker
Aug 12, 2024
ba4426d
resolve merge argument changes in SimEng
Aug 12, 2024
bb628ba
switch to new EventRecord in results
Aug 12, 2024
161979f
switch to new resource profile struct in results
Aug 12, 2024
13750e6
switch to new EventRecord type
Aug 12, 2024
8cdfeee
remove resource tracker handling
Aug 12, 2024
7a22aef
synch merge on new param name resourceId
Aug 12, 2024
2011cac
synch merge on new resource type
Aug 12, 2024
f740d45
synch merge datatypes
Aug 12, 2024
9eae7e6
synch merge datatypes/args
Aug 12, 2024
a6f2a6a
synch merged datatypes
Aug 12, 2024
3b0f0e2
synch merged datatypes
Aug 12, 2024
68dff98
synch merged datatypes
Aug 12, 2024
e45c205
synch merge datatypes / args / fields
Aug 12, 2024
449837d
synch merge datatypes / args / fields
Aug 12, 2024
beaa32a
synch merge datatypes / args / fields
Aug 12, 2024
d49688f
synch merge datatypes / args / fields
Aug 12, 2024
26bd113
switch to SimResInterface
Aug 12, 2024
868c991
switch to SimResInterface
Aug 12, 2024
243b1f0
access resources in simEng
Aug 12, 2024
6c7c6ca
use new extra ctor args
Aug 12, 2024
04becdb
merge synch ctor arg types
Aug 12, 2024
50a32c3
switch to using start/endAct over generic emit
Aug 12, 2024
bce374c
synch merge datatypes / args
Aug 12, 2024
56235d0
synch merge datatypes / args
Aug 12, 2024
3db49f7
synch merge datatypes / args
Aug 12, 2024
6e641d8
synch merge datatypes / args
Aug 13, 2024
462fd1e
synch merge datatypes / args
Aug 13, 2024
102a1a0
synch merge new topics as Map
Aug 13, 2024
718a710
synch merge rm duplicate
Aug 13, 2024
91b6bb6
synch merge args
Aug 13, 2024
38b8ba6
compile fixes after merge
bradNASA Aug 23, 2024
7110819
compile fixes for test
bradNASA Aug 25, 2024
a654b97
fix spanInfo collection, step() loop end, and SimulationEngine init
bradNASA Aug 25, 2024
d519076
return AtDuration instead of NoJobs from SimulationEngine.step()
bradNASA Aug 26, 2024
91deded
avoid inf loop
bradNASA Aug 26, 2024
13ec13f
don't recompute SpanInfo; copy SpanInfo when duplicating engine
bradNASA Aug 27, 2024
bbbb209
fixes for IncrementalSimTest; more stuff copied in SimulationEngine c…
bradNASA Sep 5, 2024
483a972
incremental sim facade for scheduler
Sep 16, 2024
f5f1efe
remove misguided overload for simulate()
Sep 17, 2024
d2bb5d1
fix to use same resourceManager between simulate/computeResults
Sep 17, 2024
a8e0d2e
timing fix in stepping up cell for checkpoint sim; deeper copy for Si…
bradNASA Sep 17, 2024
c0bf5e6
remove commented out code
bradNASA Sep 17, 2024
31d92e5
Merge branch 'incremental-sim-merge-2160' of github.com:NASA-AMMOS/ae…
bradNASA Sep 17, 2024
7436464
fix to properly find parents in setTaskStale
Sep 18, 2024
cf31367
"fixing" exceptions in incremental sim from scheduling
Sep 18, 2024
94bf052
rm old todo
Sep 18, 2024
3a615de
cleanup intellij gripes on typos, unused
Sep 18, 2024
5407c17
add env var to control Checkpoint vs Incremental sim in scheduler
Sep 19, 2024
34d7896
unify construction of facades in scheduler tests to SimulationUtility
Sep 20, 2024
5e185a5
add switch between Incremental vs Checkpoint facades
Sep 20, 2024
1bcb8fb
fix for stepping cell in past
bradNASA Sep 20, 2024
31639ed
Merge branch 'incremental-sim-merge-2160' of github.com:NASA-AMMOS/ae…
bradNASA Sep 20, 2024
bb1a4ec
abandon infinite loop if selected act causes a sim exception
Sep 21, 2024
74fd967
add separate env var to control main simulation incremental mode or not
Sep 21, 2024
df99e8b
equals() for LinearIntegrationCell supporting incremental sim
bradNASA Sep 21, 2024
96a0a39
Merge branch 'incremental-sim-merge-2160' of github.com:NASA-AMMOS/ae…
bradNASA Sep 21, 2024
af2985b
add separate env var to control main simulation incremental mode or n…
Sep 21, 2024
21d66bb
fix call to submap()
bradNASA Sep 21, 2024
72b1781
Merge branch 'incremental-sim-merge-2160' of github.com:NASA-AMMOS/ae…
bradNASA Sep 21, 2024
8763157
fix to calculate results only as far as valid data
Sep 21, 2024
e2b4f42
pass elapsedTime into getCombinedSimulationResults()
bradNASA Sep 21, 2024
d42d980
failed flag for SimulationEngine
bradNASA Sep 21, 2024
4befb04
need to update curTime of parent LiveCells source
bradNASA Sep 22, 2024
7b2144a
update scheduler tests to use SimDriver (vs CheckpointSimDriver)
Sep 22, 2024
3db1a0b
remember cell time of duplicated parent LiveCell
bradNASA Sep 22, 2024
9db42b4
Merge branch 'incremental-sim-merge-2160' of github.com:NASA-AMMOS/ae…
bradNASA Sep 22, 2024
540b320
fixes for timing of cell stepping, mostly for checkpoint sim
bradNASA Sep 26, 2024
1734ce9
Merge tag 'v2.20.0' into incremental-sim-merge-2200
bradNASA Sep 26, 2024
ddd3ab3
fix compile
bradNASA Sep 26, 2024
faa1a59
StartOffsetReducer needs all directives
bradNASA Sep 26, 2024
0fe0a1d
make ActivityDirectiveId Comparable again
bradNASA Sep 26, 2024
c5cdb8f
more compile fix
bradNASA Sep 26, 2024
2533e88
trying to fix TestApplyWhen.changingForAllTimeIn()
bradNASA Sep 27, 2024
a16accb
Incremental sim testing framework
mattdailis Sep 27, 2024
c9b8327
Include newlines in dual schedule
mattdailis Sep 28, 2024
f8e560d
Merge branch 'incremental-sim-merge-2200' into incremental-sim-merge-…
bradNASA Sep 28, 2024
4cc66d8
temporary fix for IncrementalSimFacade
bradNASA Sep 28, 2024
646fc59
fix missing resource invalidation, etc.
bradNASA Sep 29, 2024
34f8117
remove dummy task
bradNASA Sep 29, 2024
f834776
extra info on assertion of json mismatch to indicate when not really …
bradNASA Sep 29, 2024
0ae1c29
Remove empty test mission model
mattdailis Sep 30, 2024
3096388
Add retracing simulator
mattdailis Sep 30, 2024
3089de3
Add EdgeCaseTests
mattdailis Oct 2, 2024
9903381
fix rescheduleTask() and more fully capture Task-Span and parent-chil…
bradNASA Oct 6, 2024
b2d3922
Merge branch 'incremental-sim-merge-2200' of github.com:NASA-AMMOS/ae…
bradNASA Oct 6, 2024
28a703a
ofNulluable()
bradNASA Oct 6, 2024
23bf101
Clarify use of Scheduler interface
mattdailis Oct 7, 2024
2c1363b
Reorganize test code
mattdailis Oct 8, 2024
a11af0b
Reorganize retracing simulator
mattdailis Oct 8, 2024
d95800e
More test reorganization
mattdailis Oct 8, 2024
a160c01
Further simplify retracing implementation
mattdailis Oct 9, 2024
ca579fb
Reorganize test code
mattdailis Oct 9, 2024
d37a7d9
fix timing mismatch for daemon task start up
bradNASA Oct 9, 2024
24ccd1c
Merge branch 'incremental-sim-merge-2200' of github.com:NASA-AMMOS/ae…
bradNASA Oct 9, 2024
3dfec2c
RangeSetMap and RangeMapMap
bradNASA Oct 9, 2024
ca1107b
Use Incremental simulator in EdgeCaseTests.java
mattdailis Oct 9, 2024
371c8f7
need guava
bradNASA Oct 9, 2024
abb3610
Merge branch 'incremental-sim-merge-2200' of github.com:NASA-AMMOS/ae…
bradNASA Oct 9, 2024
0614095
debug prints
bradNASA Oct 10, 2024
943a31b
a fix to get past a stale read condition bug; some todos left
bradNASA Oct 10, 2024
f4fddda
Add todos
mattdailis Oct 10, 2024
8c22471
Add test7
mattdailis Oct 11, 2024
5d5d341
Reduce number of cells in test7
mattdailis Oct 11, 2024
2083157
fixes to stale read and condition history
bradNASA Oct 11, 2024
da9ab7d
accurate SubInstantDuration time to reschedule tasks;
bradNASA Oct 12, 2024
ea97b7b
minor
bradNASA Oct 12, 2024
11a766f
minor
bradNASA Oct 12, 2024
8ed2dd8
spawn all children of rerun tasks
bradNASA Oct 14, 2024
165a849
don't reschedule parent and child; fix earlierStaleReads()
bradNASA Oct 18, 2024
fee6b54
test case fixes; reorder test debug prints
bradNASA Oct 18, 2024
55df0cc
rerun all parents for stale read to pass test_spawned_activity(),
bradNASA Oct 19, 2024
a75e975
Merge tag 'v2.21.0' into incremental-sim-merge-2210
bradNASA Oct 19, 2024
3c14742
fix how old and new sim activities are combined
bradNASA Oct 20, 2024
4563335
Handles the case where goals are deleted from a spec before procedura…
skovati Nov 12, 2024
e83f7d9
Release v3.0.1
Nov 20, 2024
c722428
Merge pull request #1608 from NASA-AMMOS/release/v3-0-1
dandelany Nov 20, 2024
934b74f
fix from long ago for something, I hope
bradNASA Apr 1, 2025
b344486
junit version fix
bradNASA Apr 1, 2025
1373333
same version of gateway and aerie-ui containers instead of develop
bradNASA Apr 1, 2025
6e1437b
Merge branch 'bradrelease/v3-0-1' into incremental-sim-merge-3.0.1
bradNASA Apr 1, 2025
8e9d1cb
updating merlin-driver-develop by copying merlin-driver from develop
bradNASA Apr 1, 2025
5573f9a
fix build dependencies and driver adapters
bradNASA Apr 1, 2025
682a6e8
make getSpan() recurse to old engines
bradNASA Apr 2, 2025
ef2a32d
update docker compose yaml to use v3.0.1 for gateway and aerie-ui
bradNASA Apr 2, 2025
ed8963d
Merge branch 'develop' into incremental-sim-merge-3.6.0
bradNASA Aug 2, 2025
39986a5
SortedMap instead of Map
bradNASA Aug 2, 2025
fd3be24
fix compile errors for SimulationResultsInterface
bradNASA Aug 3, 2025
1151d8f
compile fixes for test; new test baseline for verboseOn/Off()
bradNASA Aug 3, 2025
c114004
docker yml to use develop branch images again
bradNASA Aug 4, 2025
0b3d3f1
revert UNTRUE_PLAN_START timestamp
bradNASA Aug 4, 2025
8bc38ea
minor
bradNASA Aug 4, 2025
ae76e82
obey security gods
bradNASA Aug 4, 2025
805f8ce
Merge branch 'develop' into prototype/incremental-sim
bradNASA Aug 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ private static <T> DiscreteProfile fromProfileHelper(
final var nextCursor = cursor.plus(pair.extent());

final var value = transform.apply(pair.dynamics());

final Duration finalCursor = cursor;
final var isLast = c == profile.size() - 1;
value.ifPresent(
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SimulationResultsInterface was added so that the results of multiple SimulationEngines can be combined lazily.

Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ public SimulationResults(
}

public SimulationResults(
gov.nasa.jpl.aerie.merlin.driver.SimulationResults merlinResults
gov.nasa.jpl.aerie.merlin.driver.SimulationResultsInterface merlinResults
) {
this.planStart = merlinResults.startTime;
this.bounds = Interval.between(Duration.ZERO, merlinResults.duration);
this.planStart = merlinResults.getStartTime();
this.bounds = Interval.between(Duration.ZERO, merlinResults.getDuration());
this.activities = new ArrayList<>();
this.realProfiles = new HashMap<>();
this.discreteProfiles = new HashMap<>();

for(final var entry : merlinResults.realProfiles.entrySet()) {
for(final var entry : merlinResults.getRealProfiles().entrySet()) {
realProfiles.put(entry.getKey(), LinearProfile.fromSimulatedProfile(entry.getValue().segments()));
}
for(final var entry : merlinResults.discreteProfiles.entrySet()) {
for(final var entry : merlinResults.getDiscreteProfiles().entrySet()) {
discreteProfiles.put(entry.getKey(), DiscreteProfile.fromSimulatedProfile(entry.getValue().segments()));
}

final var simulatedActivities = merlinResults.simulatedActivities;
final var simulatedActivities = merlinResults.getSimulatedActivities();
for (final var entry : simulatedActivities.entrySet()) {
final var id = entry.getKey();
final var activity = entry.getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ public Violation(List<Interval> windows, List<Long> activityInstanceIds) {
this(windows, new ArrayList<>(activityInstanceIds));
}

public static List<Violation> fromProceduralViolations(Violations violations, gov.nasa.jpl.aerie.merlin.driver.SimulationResults simResults) {
public static List<Violation> fromProceduralViolations(Violations violations, gov.nasa.jpl.aerie.merlin.driver.SimulationResultsInterface simResults) {
final var proceduralViolations = violations.collect();
final ArrayList<Violation> constraintViolations = new ArrayList<>(proceduralViolations.size());
for(final var v : proceduralViolations) {
final List<Long> activityInstanceIds = new ArrayList<>(v.getIds().size());
for(final var id : v.getIds()) {
switch (id) {
case ActivityDirectiveId dId -> simResults.simulatedActivities
case ActivityDirectiveId dId -> simResults.getSimulatedActivities()
.entrySet()
.stream()
.filter(e -> e.getValue().directiveId().isPresent()
Expand All @@ -31,7 +31,7 @@ public static List<Violation> fromProceduralViolations(Violations violations, go
"Activity instance with activity directive id "
+dId.id()+" not present in simulation results.");});
case ActivityInstanceId aId -> {
if (simResults.simulatedActivities.containsKey(aId)) {
if (simResults.getSimulatedActivities().containsKey(aId)) {
activityInstanceIds.add(aId.id());
break;
}
Expand Down
3 changes: 3 additions & 0 deletions contrib/build.gradle
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lets you exclude running specific tests with something like this:
./gradlew test -PexcludeTests="**/IntegrationTest*"

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ test {
testLogging {
exceptionFormat = 'full'
}
if (project.hasProperty('excludeTests')) {
exclude project.property('excludeTests')
}
}

jacocoTestReport {
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helps with debug

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ public T getValue() {
return this.duplicator.apply(this.value);
}

@Override
public String toString() {
return "CounterCell{" +
"duplicator=" + duplicator +
", adder=" + adder +
", value=" + value +
'}';
}

public static final class CounterCellType<T> implements CellType<T, CounterCell<T>> {
private final EffectTrait<T> monoid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ public RealDynamics getValue() {
return dynamics;
}

@Override
public String toString() {
return "DurativeRealCell{" +
"activeEffects=" + activeEffects +
", elapsedTime=" + elapsedTime +
'}';
}

public static final class DurativeCellType
implements CellType<Collection<Pair<Duration, RealDynamics>>, DurativeRealCell>
{
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to know why equals() and maybe hashCode() are necessary.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import gov.nasa.jpl.aerie.merlin.protocol.types.Duration;
import gov.nasa.jpl.aerie.merlin.protocol.types.RealDynamics;

import java.util.Objects;
import java.util.function.Function;

public final class LinearIntegrationCell {
Expand Down Expand Up @@ -42,6 +43,32 @@ public RealDynamics getRate() {
return RealDynamics.constant(this.rate);
}

@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
LinearIntegrationCell that = (LinearIntegrationCell) o;
return Double.compare(initialVolume, that.initialVolume) == 0
&& Double.compare(
accumulatedVolume,
that.accumulatedVolume) == 0
&& Double.compare(rate, that.rate) == 0;
}

@Override
public int hashCode() {
return Objects.hash(initialVolume, accumulatedVolume, rate);
}

@Override
public String toString() {
return "LinearIntegrationCell{" +
"initialVolume=" + initialVolume +
", accumulatedVolume=" + accumulatedVolume +
", rate=" + rate +
'}';
}

public static final class LinearIntegrationCellType
implements CellType<LinearAccumulationEffect, LinearIntegrationCell>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public boolean isConflicted() {

@Override
public String toString() {
return "{value=%s, conflicted=%s}".formatted(this.getValue(), this.isConflicted());
return "RegisterCell{value=%s, conflicted=%s}".formatted(this.getValue(), this.isConflicted());
}

public static final class RegisterCellType<T> implements CellType<RegisterEffect<T>, RegisterCell<T>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public boolean equals(final Object obj) {
return super.equals(obj);
}

@Override
public String toString() {
return "Accumulator{" +
"ref=" + ref.get() +
", rate=" + rate.get() +
'}';
}

public final class Rate implements RealResource {
@Override
Expand Down
21 changes: 17 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
AERIE_DB_PORT: 5432
GATEWAY_DB_USER: "${GATEWAY_USERNAME}"
GATEWAY_DB_PASSWORD: "${GATEWAY_PASSWORD}"
image: "ghcr.io/nasa-ammos/aerie-gateway:develop"
image: "ghcr.io/nasa-ammos/aerie-gateway:v3.0.1"
ports: ["9000:9000"]
restart: always
volumes:
Expand Down Expand Up @@ -74,6 +74,7 @@ services:
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store
- ${SPICE_KERNEL_PATH:?err}:/usr/src/spice
aerie_scheduler:
build:
context: ./scheduler-server
Expand All @@ -98,6 +99,7 @@ services:
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store
- ${SPICE_KERNEL_PATH:?err}:/usr/src/spice
aerie_sequencing:
build:
context: ./sequencing-server
Expand Down Expand Up @@ -129,6 +131,7 @@ services:
volumes:
- ./sequencing-server:/app:cached
- aerie_file_store:/usr/src/app/sequencing_file_store
- ${SPICE_KERNEL_PATH:?err}:/usr/src/spice
aerie_ui:
container_name: aerie_ui
depends_on: ["postgres"]
Expand All @@ -142,7 +145,7 @@ services:
PUBLIC_HASURA_SERVER_URL: http://hasura:8080/v1/graphql
PUBLIC_HASURA_WEB_SOCKET_URL: ws://localhost:8080/v1/graphql
PUBLIC_COMMAND_EXPANSION_MODE: "typescript"
image: "ghcr.io/nasa-ammos/aerie-ui:develop"
image: "ghcr.io/nasa-ammos/aerie-ui:v3.0.1"
ports: ["80:80"]
restart: always
aerie_merlin_worker_1:
Expand All @@ -163,12 +166,15 @@ services:
-Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=INFO
-Dorg.slf4j.simpleLogger.logFile=System.err
UNTRUE_PLAN_START: "2000-01-01T11:58:55.816Z"
-Xmx34g
#UNTRUE_PLAN_START: "${UNTRUE_PLAN_START:-2030-01-01T00:00:00Z}"
UNTRUE_PLAN_START: "${UNTRUE_PLAN_START:-2030-01-01T00:00:00Z}"
image: "aerie_merlin_worker_1"
ports: ["5007:5005", "27187:8080"]
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store:ro
- ${SPICE_KERNEL_PATH:?err}:/usr/src/spice
aerie_merlin_worker_2:
build:
context: ./merlin-worker
Expand All @@ -187,12 +193,15 @@ services:
-Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=INFO
-Dorg.slf4j.simpleLogger.logFile=System.err
UNTRUE_PLAN_START: "2000-01-01T11:58:55.816Z"
-Xmx34g
#UNTRUE_PLAN_START: "${UNTRUE_PLAN_START:-2030-01-01T00:00:00Z}"
UNTRUE_PLAN_START: "${UNTRUE_PLAN_START:-2030-01-01T00:00:00Z}"
image: "aerie_merlin_worker_2"
ports: ["5008:5005", "27188:8080"]
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store:ro
- ${SPICE_KERNEL_PATH:?err}:/usr/src/spice
aerie_scheduler_worker_1:
build:
context: ./scheduler-worker
Expand All @@ -214,11 +223,13 @@ services:
-Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=INFO
-Dorg.slf4j.simpleLogger.logFile=System.err
-Xmx35g
image: "aerie_scheduler_worker_1"
ports: ["5009:5005", "27189:8080"]
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store:ro
- ${SPICE_KERNEL_PATH:?err}:/usr/src/spice
aerie_scheduler_worker_2:
build:
context: ./scheduler-worker
Expand All @@ -240,11 +251,13 @@ services:
-Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=INFO
-Dorg.slf4j.simpleLogger.logFile=System.err
-Xmx35g
image: "aerie_scheduler_worker_2"
ports: ["5010:5005", "27190:8080"]
restart: always
volumes:
- aerie_file_store:/usr/src/app/merlin_file_store:ro
- ${SPICE_KERNEL_PATH:?err}:/usr/src/spice
hasura:
container_name: aerie_hasura
depends_on: ["postgres"]
Expand Down
1 change: 1 addition & 0 deletions examples/banananation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ java {

test {
useJUnitPlatform()
maxHeapSize = "8g"
testLogging {
exceptionFormat = 'full'
}
Expand Down
Copy link
Contributor Author

@bradNASA bradNASA Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added switch to optionally run newly added daemon tasks in the mission model since only some newly added tests need it.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import static gov.nasa.jpl.aerie.merlin.framework.annotations.Export.Template;

public record Configuration(@Unit("count") int initialPlantCount, String initialProducer, Path initialDataPath, InitialConditions initialConditions) {
public record Configuration(@Unit("count") int initialPlantCount, String initialProducer, Path initialDataPath, InitialConditions initialConditions, boolean runDaemons) {

public static final int DEFAULT_PLANT_COUNT = 200;
public static final String DEFAULT_PRODUCER = "Chiquita";
Expand All @@ -30,7 +30,11 @@ public boolean validateInitialDataPath() {
}

public static @Template Configuration defaultConfiguration() {
return new Configuration(DEFAULT_PLANT_COUNT, DEFAULT_PRODUCER, DEFAULT_DATA_PATH, DEFAULT_INITIAL_CONDITIONS);
return new Configuration(DEFAULT_PLANT_COUNT, DEFAULT_PRODUCER, DEFAULT_DATA_PATH, DEFAULT_INITIAL_CONDITIONS, false);
}

public static @Template Configuration daemonConfiguration() {
return new Configuration(DEFAULT_PLANT_COUNT, DEFAULT_PRODUCER, DEFAULT_DATA_PATH, DEFAULT_INITIAL_CONDITIONS, true);
}

@AutoValueMapper.Record
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package gov.nasa.jpl.aerie.banananation;

import gov.nasa.jpl.aerie.banananation.activities.BiteBananaActivity;
import gov.nasa.jpl.aerie.banananation.activities.GrowBananaActivity;
import gov.nasa.jpl.aerie.banananation.generated.ActivityActions;
import gov.nasa.jpl.aerie.contrib.models.Accumulator;
import gov.nasa.jpl.aerie.contrib.models.Register;
import gov.nasa.jpl.aerie.contrib.models.counters.Counter;
Expand All @@ -8,7 +11,9 @@
import gov.nasa.jpl.aerie.contrib.serialization.mappers.EnumValueMapper;
import gov.nasa.jpl.aerie.contrib.serialization.mappers.IntegerValueMapper;
import gov.nasa.jpl.aerie.contrib.serialization.mappers.StringValueMapper;
import gov.nasa.jpl.aerie.merlin.framework.ModelActions;
import gov.nasa.jpl.aerie.merlin.framework.Registrar;
import gov.nasa.jpl.aerie.merlin.protocol.types.Duration;
import gov.nasa.jpl.aerie.spice.SpiceLoader;
import spice.basic.CSPICE;
import spice.basic.SpiceErrorException;
Expand All @@ -17,6 +22,8 @@
import java.nio.file.Files;
import java.nio.file.Path;

import static gov.nasa.jpl.aerie.merlin.protocol.types.Duration.SECOND;
import static gov.nasa.jpl.aerie.merlin.protocol.types.Duration.SECONDS;
import static gov.nasa.jpl.aerie.contrib.metadata.UnitRegistrar.discreteResource;
import static gov.nasa.jpl.aerie.contrib.metadata.UnitRegistrar.realResource;

Expand Down Expand Up @@ -49,10 +56,31 @@ public Mission(final Registrar registrar, final Configuration config) {
// Load SPICE in the Mission constructor
try {
SpiceLoader.loadSpice();
System.out.println(CSPICE.ktotal("ALL"));
System.out.println(this.getClass().getCanonicalName() + ": CSPICE.ktotal(\"ALL\") = " + CSPICE.ktotal("ALL"));
} catch (final SpiceErrorException ex) {
throw new Error(ex);
}

if (config.runDaemons()) {
ModelActions.spawn(
"grow bananas",
() -> {
while (true) {
if (fruit.get() < 6) {
ActivityActions.spawn(this, new GrowBananaActivity(1, Duration.of(1, SECOND)));
}
ModelActions.delay(2, SECONDS);
}
});
ModelActions.spawn(
"bite bananas",
() -> {
while (true) {
ModelActions.waitUntil(fruit.isBetween(6, 10));
ActivityActions.spawn(this, new BiteBananaActivity());
}
});
}
}

private static int countLines(final Path path) {
Expand Down
Loading
Loading