Skip to content

Commit

Permalink
Merge pull request #911 from NASA-AMMOS/feat/no-effect-model-fixed-du…
Browse files Browse the repository at this point in the history
…ration

Assign zero duration to activities with no effect model
  • Loading branch information
camargo authored May 11, 2023
2 parents 8da423c + 583520a commit 481127b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public JavaFile generateSchedulerModel(final MissionModelRecord missionModel) {
else if ($.parametricDuration().isPresent()) return CodeBlock.of("parametric($$ -> (new $L().new InputMapper()).instantiate($$).$L())", activityTypeRecord.inputType().mapper().name, $.parametricDuration().get());
else return CodeBlock.of("uncontrollable()");
})
.orElse(CodeBlock.of("uncontrollable()"))))
.orElse(CodeBlock.of("fixed($T.ZERO)", ClassName.get(Duration.class)))))
.reduce((x, y) -> x.add("$L", y.build()))
.orElse(CodeBlock.builder()).build())
.addStatement("return result")
Expand Down

0 comments on commit 481127b

Please sign in to comment.