swarmrl.engine.engine Module API Reference¶
Parent class for the engine.
Engine
¶
Parent class for an engine.
An engine is an object that can generate data for the environment. Currently we have only an espresso model but this should be kept generic to allow for an experimental interface.
Source code in swarmrl/engine/engine.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
finalize()
¶
Optional: to clean up after finishing the simulation (e.g. writing the last chunks of trajectory)
Source code in swarmrl/engine/engine.py
40 41 42 43 44 45 |
|
get_particle_data()
¶
Get type, id, position, velocity and director of the particles as a dict of np.array
Source code in swarmrl/engine/engine.py
33 34 35 36 37 38 |
|
integrate(n_slices, force_model)
¶
Parameters¶
n_slices: int Number of time slices to integrate force_model A an instance of ForceFunction
Source code in swarmrl/engine/engine.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|