1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2024-12-30 18:33:31 +00:00

Fix README instructions

This commit is contained in:
Mo8it 2022-04-06 17:06:09 +02:00
parent 94c7bc717a
commit a2262bce9e

View file

@ -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 **additionally** after activating an environment in a subdirectory.
=== Import the package
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]
----
sim_dir = init_sim(100, 40.0)
sim_dir = init_sim(; n_particles=100, v₀=40.0)
----
Run the simulation:
[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`.
@ -95,7 +97,8 @@ To generate an animation of a simulation, run the following:
[source,julia]
----
using Animation
include("visualization/Animation.jl")
using .Animation
animate(sim_dir)
----
@ -107,7 +110,8 @@ To plot only one snapshot of a simulation, run the following:
[source,julia]
----
using SnapshotPlot
include("visualization/SnapshotPlot.jl")
using .SnapshotPlot
plot_snapshot(sim_dir)
----
@ -165,7 +169,8 @@ To plot the rewards, activate the environment of the subdirectory `visualization
[source,julia]
----
using RewardsPlot
include("visualization/RewardsPlot.jl")
using .RewardsPlot
plot_rewards(rl_dir)
----