mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2024-12-21 00:51:21 +00:00
Fix README instructions
This commit is contained in:
parent
94c7bc717a
commit
a2262bce9e
1 changed files with 10 additions and 5 deletions
15
README.adoc
15
README.adoc
|
@ -53,6 +53,8 @@ Pkg.update()
|
||||||
|
|
||||||
This step has to be done by running the line above for the first time using the package to install its dependencies. Running the line above after the first time will update the installed dependencies which is optional.
|
This step has to be done by running the line above for the first time using the package to install its dependencies. Running the line above after the first time will update the installed dependencies which is optional.
|
||||||
|
|
||||||
|
This step has to be done **additionally** after activating an environment in a subdirectory.
|
||||||
|
|
||||||
=== Import the package
|
=== Import the package
|
||||||
|
|
||||||
You can import the package by running:
|
You can import the package by running:
|
||||||
|
@ -74,14 +76,14 @@ Initialize a simulation with 100 particles having a self-propulsion velocity of
|
||||||
|
|
||||||
[source,julia]
|
[source,julia]
|
||||||
----
|
----
|
||||||
sim_dir = init_sim(100, 40.0)
|
sim_dir = init_sim(; n_particles=100, v₀=40.0)
|
||||||
----
|
----
|
||||||
|
|
||||||
Run the simulation:
|
Run the simulation:
|
||||||
|
|
||||||
[source,julia]
|
[source,julia]
|
||||||
----
|
----
|
||||||
run_sim(sim_dir, duration=20.0)
|
run_sim(sim_dir; duration=20.0)
|
||||||
----
|
----
|
||||||
|
|
||||||
The values for the number of particles, self-propulsion velocity and simulation duration are used here as an example. For more information about possible values and other optional arguments, see the documentation of `init_sim` or `run_sim`.
|
The values for the number of particles, self-propulsion velocity and simulation duration are used here as an example. For more information about possible values and other optional arguments, see the documentation of `init_sim` or `run_sim`.
|
||||||
|
@ -95,7 +97,8 @@ To generate an animation of a simulation, run the following:
|
||||||
|
|
||||||
[source,julia]
|
[source,julia]
|
||||||
----
|
----
|
||||||
using Animation
|
include("visualization/Animation.jl")
|
||||||
|
using .Animation
|
||||||
animate(sim_dir)
|
animate(sim_dir)
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -107,7 +110,8 @@ To plot only one snapshot of a simulation, run the following:
|
||||||
|
|
||||||
[source,julia]
|
[source,julia]
|
||||||
----
|
----
|
||||||
using SnapshotPlot
|
include("visualization/SnapshotPlot.jl")
|
||||||
|
using .SnapshotPlot
|
||||||
plot_snapshot(sim_dir)
|
plot_snapshot(sim_dir)
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -165,7 +169,8 @@ To plot the rewards, activate the environment of the subdirectory `visualization
|
||||||
|
|
||||||
[source,julia]
|
[source,julia]
|
||||||
----
|
----
|
||||||
using RewardsPlot
|
include("visualization/RewardsPlot.jl")
|
||||||
|
using .RewardsPlot
|
||||||
plot_rewards(rl_dir)
|
plot_rewards(rl_dir)
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue