Skip to content

Commit

Permalink
Update examples/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
t-wolfeadam authored Mar 18, 2024
1 parent 55632b7 commit 2df7821
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,9 @@ The necessary Python libraries needed to run all the scripts can be installed by

Be aware that some AnyLogic models require you to have some custom libraries added to your AnyLogic environment, used for querying/inferencing the trained policies. These are detailed further in the specific READMEs.

Once the necessary libraries are installed, you will need to export the model. To comply with the way that the scripts are setup, do the following:
Before running the example scripts, you'll need to first export them from AnyLogic. To run them without any modifications, you'll need to do the following:

1. Open the model source in AnyLogic
2. At the top of the RL Experiment's properties, click the button to export the model as a zip; save it within the "ModelExported" folder (creating it if it does not exist)
3. In your file explorer, unpack the zip in place, such that the file "ModelExported/model.jar" is valid
4. Delete the zip file

You should now be able to run any of the scripts without errors. The way you load the information back into the model will depend on the specific example and are detailed further in the example's README.

Contributions
-------------

From improvements on existing training scripts to new models, contributions are greatly welcomed! General guidelines:

- Training scripts should, by default, be able to run in 10 minutes or less and be able to produce results that are better than random
- Having commandline arguments for longer / more robust training is completely acceptable
- Simpler, semi-realistic models are best (like the ones in the example repository); more complex ones are OK if they are understandable by people from different industries
- Models should be at least have implementations and toggles for "training" and "testing" (of the policy); others can be freely added (e.g., manual, heuristic)
- Models should be reasonably organized or structured (e.g., aligned elements, clean flowchart connectors)
- Use standard conventions where relevant (e.g., TitledClassNames, camelCaseJavaVariables, snake_case_python_variables)

⚠ If planning to build a model with the intention of including it in this repo, it's suggested to make a discussion post first to avoid chancing it being rejected down the line
1. Open the given model in AnyLogic (e.g., `examples/Pathfinder/ModelSource/Pathfinder.alp`)
2. In the properties of its RL Experiment, click the export button at the top; save the zip file inside a folder named "ModelExported" to sit alongside the "ModelSource" folder
3. Most examples are setup expecting the zip file to be unpacked in-place (such that the file `ModelExported/model.jar` is valid); see the individual models' README for more specifics.
4. Run the associated Python script

0 comments on commit 2df7821

Please sign in to comment.