Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REPOSITORY_DOCKER_URL=ghcr.io/nasa-ammos

# choose a specific Aerie version
# choose a specific PlanDev version
DOCKER_TAG=v3.8.0

GITHUB_USER=
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Aerie Template
# PlanDev Template

This repo provides a basic template for getting started with mission modeling and scheduling within the Aerie framework.
This repo provides a basic template for getting started with mission modeling and scheduling within the PlanDev framework.

Included in this repo is all the basic infrastructure and scaffolding required to generate a mission model `.jar` file, as well as scheduling procedure `.jar`s that can be uploaded and run within Aerie.
Included in this repo is all the basic infrastructure and scaffolding required to generate a mission model `.jar` file, as well as scheduling procedure `.jar`s that can be uploaded and run within PlanDev.

#### Interested in learning how to develop a model yourself?
Check out the [Aerie Mission Modeling Tutorial](https://nasa-ammos.github.io/aerie-docs/tutorials/mission-modeling/introduction/)
Check out the [PlanDev Mission Modeling Tutorial](https://nasa-ammos.github.io/plandev-docs/tutorials/mission-modeling/introduction/)

#### Looking for some example models to play around with?
Try out the following models:
Expand All @@ -21,7 +21,7 @@ Try out the following models:
brew install --cask temurin@21
```

First you need to create a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) in your GitHub account that includes `read-packages` scope) so you can download the Aerie Maven packages from the [GitHub Maven package registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry).
First you need to create a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) in your GitHub account that includes `read-packages` scope) so you can download the PlanDev Maven packages from the [GitHub Maven package registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry).

Then, copy the `.env.template` file to `.env`. This `.env` file will hold your `GITHUB_TOKEN` and `GITHUB_USER` variables. Note that this file is "`.gitignore`d" by default, so edits to this file won't be tracked in version control.

Expand All @@ -42,12 +42,12 @@ To build a mission model JAR you can do:
./gradlew :missionmodel:build --refresh-dependencies
```

This will create the file `'missionmodel/build/libs/missionmodel.jar`, which you can upload to Aerie using the UI or API.
This will create the file `'missionmodel/build/libs/missionmodel.jar`, which you can upload to PlanDev using the UI or API.

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

### Scheduling Procedures and Constraints
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`:
To build scheduling procedures or procedural constraints, first you will need a completed mission model. You can accomplish this by following the [PlanDev Mission Modeling Tutorial](https://nasa-ammos.github.io/plandev-docs/tutorials/mission-modeling/introduction/), or by using the included `complete-model-tutorial.patch`:

```sh
git apply complete-model-tutorial.patch
Expand All @@ -65,7 +65,7 @@ or
cp constraints/examples/SampleActivityConstraint.java scheduling/src/main/java/constraints/procedures
```

(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]())
(For more involved example procedures, take a look at some [scheduling procedures in the PlanDev 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]())

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

Expand All @@ -80,16 +80,16 @@ or
./gradlew constraints:buildAllProcedureJars
```

The first `gradle` command will expand `@SchedulingProcedure` or `@ConstraintProcedure` annotations into new, verbose source code files that Aerie can process down the line.
The first `gradle` command will expand `@SchedulingProcedure` or `@ConstraintProcedure` annotations into new, verbose source code files that PlanDev can process down the line.
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.

Your procedure jars will then be in `build/libs/OriginalSourceCodeFileName.jar` of either the `scheduling` or `constraints` directories

## Running Procedures

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

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.
The quickest way to upload a single JAR is to use the PlanDev 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.

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)

Expand Down
Loading