Virtual bioreactor simulation

Function to run virtual bioreactor simulation models based on specified configurations. There are various simulation events available to model different bioreactor operations.

bioreactormodelling.biosim.new_vb_simulation.run_validation_simulation(data: DataFrame, fitted_model: ModelCoefficients, column_map: ColumnMapping, fit_config: FitConfiguration, specific_productivity: float | None, reset_metabolites: bool = False, feed_compositions: list[Feed] | None = None, metabolic_rates: DataFrame | None = None, metabolic_rate_function: Callable[[float, dict[str, float], dict[str, float], dict[str, float]], list[float]] | None = None, titer_function: Callable[[float, dict[str, float], dict[str, float], dict[str, float], list[float]], float] | None = None, user_defined_growth_factor: Callable[[float, dict[str, float], dict[str, float], dict[str, float]], float] | None = None) DataFrame

Run a validation simulation using the fitted model and the provided data used to get the result from the fit function.

Parameters:
  • data (pandas.DataFrame. The experimental data to be used for the simulation)

  • fitted_model (ModelCoefficients. The fitted model coefficients)

  • column_map (ColumnMapping. The mapping of the columns in the data to the model variables)

  • fit_config (FitConfiguration. The configuration for the fitting)

  • specific_productivity (float | None. The specific productivity to be used in the simulation)

  • reset_metabolites (bool, optional. Whether to reset metabolites at each event, by default False)

  • feed_compositions (list[Feed] | None, optional. The feed compositions to be used in the simulation, by default None)

  • metabolic_rates (pandas.DataFrame | None, optional. The metabolic rates to be used in the simulation, by default None)

  • metabolic_rate_function (MetabolicRateFunction | None, optional. The function to calculate the metabolic rates, by default None)

  • titer_function (ProductivityFunction | None, optional. The function to calculate the titer, by default None)

  • user_defined_growth_factor (GrowthFactorFunction | None, optional. The user-defined growth factor function, by default None)

Returns:

  • pandas.DataFrame

  • The simulated data

bioreactormodelling.biosim.new_vb_simulation.run_vb_simulation(fit_config: FitConfiguration, column_map: ColumnMapping, fitted_model: ModelCoefficients, initial_conditions: dict[str, float], events: list[Event], simulation_duration: float, feeds: list[Feed] | None = None, metabolic_rates: DataFrame | None = None, titer_function: Callable[[float, dict[str, float], dict[str, float], dict[str, float], list[float]], float] | None = None, metabolite_function: Callable[[float, dict[str, float], dict[str, float], dict[str, float]], list[float]] | None = None, user_defined_growth_factor: Callable[[float, dict[str, float], dict[str, float], dict[str, float]], float] | None = None) DataFrame

Run a virtual bioreactor simulation

Parameters:
  • fit_config (FitConfiguration. The configuration for the fitting)

  • column_map (ColumnMapping. The mapping of the columns in the data to the model variables)

  • initial_conditions (dict[str, float]. The initial conditions for the simulation)

  • events (list[Event]. The events to be applied during the simulation)

  • simulation_duration (float. The duration of the simulation)

  • feeds (list[Feed] optional. The feeds to be used in the simulation, by default None)

  • metabolic_rates (pandas.DataFrame optional. The metabolic rates to be used in the simulation)

  • titer_function (ProductivityFunction optional. The function to calculate the titer, by default None)

  • metabolite_function (MetabolicRateFunction optional. The function to calculate the metabolic rates, by default None)

  • user_defined_growth_factor (GrowthFactorFunction optional. The user-defined growth factor function, by default None)

Returns:

  • pandas.DataFrame

  • The simulated data