Run your first simulation
To run your first simulation, you need to follow these steps:
Import the
SimulationEnginefrom thesimulatrexpackage.Create an instance of the
SimulationEngine, passing the simulation configuration as a parameter.Run the simulation using the
runmethod of theSimulationEngine.Get the evaluation data using the
get_evaluation_datamethod of theSimulationEngine.Convert the evaluation data to a Pandas DataFrame for easier manipulation and analysis.
Here is an example of how to do this:
from simulatrex import SimulationEngine
import pandas as pd
simulation_config = {...} # Your simulation configuration here
engine = SimulationEngine(config=simulation_config)
await engine.run()
evaluation_data = engine.get_evaluation_data()
df = pd.DataFrame(evaluation_data)Replace {...} with your actual simulation configuration, or alternatively reference to a json file.
Last updated