Saving Data

At this time, the “save” utilities module only contains one function that helps you save simulation results into a CSV, described below.

API Documentation

mgrowthctrl.utils.save.save_simulation_results(sim, names: ModelNames, output_path: str)

Universal saver for 1-species or N-species simulations.

Parameters:
  • sim – A dictionary or SimpleNamespace with .t, .X, and .S properties holding simulation values. The simulate and predict methods of models and controllers produce compatible objects.

  • names – A ModelNames object containing the column names of consumers (X) and substrates (S)

  • output_path – The name of the CSV file to save the data in, e.g. “simulation.csv”