Skip to content

Commit 73a3172

Browse files
authored
Update README.md to include instruction on procedural constraints (#19)
The previous README included outdated instructions on running scheduling procedures and did not include instructions on running constraint procedures. This small update revises the README to have the correct instructions.
1 parent e990586 commit 73a3172

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,42 +46,52 @@ This will create the file `'missionmodel/build/libs/missionmodel.jar`, which you
4646

4747
<!-- If you want to just try the model without building it yourself you can [download it here](./missionmodel.jar). -->
4848

49-
### Scheduling Procedures
50-
To build scheduling procedures, first you will need a completed mission model. You can accomplish this by following the [Aerie Mission Modeling Tutorial](https://nasa-ammos.github.io/aerie-docs/tutorials/mission-modeling/introduction/), or by using the included `complete-model-tutorial.patch`:
49+
### Scheduling Procedures and Constraints
50+
To build scheduling procedures or procedural constraints, first you will need a completed mission model. You can accomplish this by following the [Aerie Mission Modeling Tutorial](https://nasa-ammos.github.io/aerie-docs/tutorials/mission-modeling/introduction/), or by using the included `complete-model-tutorial.patch`:
5151

5252
```sh
5353
git apply complete-model-tutorial.patch
5454
```
5555

56-
This is required since scheduling procedures will reference activity types (e.g. when placing activity directives), and the model in this repo, out of the box, has no registered activities.
56+
This is required since these procedures will reference activity types (e.g. when placing activity directives), and the model in this repo, out of the box, has no registered activities.
5757

58-
Then, copy an example scheduling procedure into the procedures folder.
58+
Then, copy an example procedure into the scheduling or constraint procedures folder.
5959

6060
```sh
6161
cp scheduling/examples/SampleProcedure.java scheduling/src/main/java/scheduling/procedures
6262
```
63+
or
64+
```sh
65+
cp constraints/examples/SampleActivityConstraint.java scheduling/src/main/java/constraints/procedures
66+
```
6367

64-
(For a more involved example procedure, take a look at some [procedures in the Aerie repo](https://github.com/NASA-AMMOS/aerie/blob/develop/procedural/examples/foo-procedures/src/main/java/gov/nasa/ammos/aerie/procedural/examples/fooprocedures/procedures/StayWellFed.java))
68+
(For more involved example procedures, take a look at some [scheduling procedures in the Aerie repo](https://github.com/NASA-AMMOS/aerie/blob/develop/procedural/examples/foo-procedures/src/main/java/gov/nasa/ammos/aerie/procedural/examples/fooprocedures/procedures/StayWellFed.java) and [constraint procedures in the modeling tutorial]())
6569

6670
The following will be your process every time you iterate on these procedures
6771

6872
```sh
69-
./gradlew scheduling:compileJava
70-
./gradlew scheduling:buildAllSchedulingProcedureJars
73+
./gradlew scheduling:build
74+
./gradlew scheduling:buildAllProcedureJars
75+
```
76+
or
77+
78+
```sh
79+
./gradlew constraints:build
80+
./gradlew constraints:buildAllProcedureJars
7181
```
7282

73-
The first `gradle` command will expand `@SchedulingProcedure` annotations into new, verbose source code files that Aerie can process down the line.
83+
The first `gradle` command will expand `@SchedulingProcedure` or `@ConstraintProcedure` annotations into new, verbose source code files that Aerie can process down the line.
7484
The second `gradle` command then looks for those generated files, creates a task to build a `.jar` for each file, and then runs all those tasks.
7585

76-
Your procedure jars will then be in `scheduling/build/libs/OriginalSourceCodeFileName.jar`, which in this case will be `scheduling/build/libs/SampleProcedure.jar`.
86+
Your procedure jars will then be in `build/libs/OriginalSourceCodeFileName.jar` of either the `scheduling` or `constraints` directories
7787

7888
## Running Procedures
7989

8090
Now that you have `.jar`'s, we need to upload them to Aerie so you can run them against plans.
8191

82-
The quickest way to upload a single JAR is to use the `aerie-ui`. On the `/scheduling/goals/new` page, you should now see a new tab option for creating a `jar` procedural goal. Once created, you will need to register the goal with a specific plan, just like you do with EDSL goals.
92+
The quickest way to upload a single JAR is to use the `aerie-ui`. On the `/scheduling/goals/new` or `constraints/new` page, you should now see a new tab option for creating a `jar` procedural goal. Once created, you will need to register the procedure with a specific plan or model, just like you do with EDSL goals.
8393

84-
Then, from the manage goals page on your plan, you can pass arguments to your procedure using the drop down menu, and run your procedures using the schedule button. You can also right click to manage invocations (duplicate, delete, etc)
94+
Then, from the manage goals or constraints page on your plan, you can pass arguments to your procedure using the drop down menu, and run your procedures using the "schedule" or "check constraints" button. You can also right click to manage invocations (duplicate, delete, etc)
8595

8696
## Testing
8797

0 commit comments

Comments
 (0)