Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCourtney committed Sep 5, 2024
1 parent 77ca4ca commit b6d06b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
import gov.nasa.ammos.aerie.procedural.scheduling.annotations.SchedulingProcedure;
import gov.nasa.jpl.aerie.merlin.protocol.types.Duration;
import gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.DirectiveStart;
import org.jetbrains.annotations.NotNull;

import java.util.Map;

@SchedulingProcedure
public record SampleProcedure(int quantity) implements Goal {
@Override
public void run(EditablePlan plan) {
public void run(@NotNull final EditablePlan plan) {
final var firstTime = Duration.hours(24);
final var step = Duration.hours(6);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import gov.nasa.ammos.aerie.procedural.scheduling.plan.EditablePlan;
import gov.nasa.ammos.aerie.procedural.timeline.collections.profiles.Real;
import gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.DirectiveStart;
import org.jetbrains.annotations.NotNull;

import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
Expand All @@ -17,7 +18,7 @@
@SchedulingProcedure
public record SimulationDemo(int quantity) implements Goal {
@Override
public void run(EditablePlan plan) {
public void run(@NotNull final EditablePlan plan) {
// final var firstActivityTime = plan.toRelative(Instant.from(DOY_WITHOUT_ZONE_FORMATTER.parse("2024-128T07:00:00")));
//
// plan.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ interface ParallelOps<T: IntervalLike<T>, THIS: ParallelOps<T, THIS>>: GeneralOp
/** [(DOC)][countActive] Returns a [Numbers] profile that corresponds to the number of active objects at any given time. */
fun countActive() = reduceIntoProfile(::Numbers, NullBinaryOperation.reduce(
{ _, _ -> 1 },
{ _, acc, _ -> acc.toInt() + 1}
)).assignGaps(Numbers(0))
{ _, acc, _ -> acc + 1}
)).assignGaps(0)

/**
* [(DOC)][accumulatedDuration] Creates a Real profile corresponding to the running total of time
Expand Down

0 comments on commit b6d06b3

Please sign in to comment.