SimulationInterface class

This is the proposed class and its methods, that you should personalize to your needs.

class simulation_interface.SimulationInterface

Bases: object

GenericSimulationLibrary is a package encapsulates a methodology and tools for reproducible simulations. The main idea is to use python and/or jupyter notebooks to provide a lightweight and for-dummies easy “Simulation as a Service”. The framework puts emphasis on simplicity: for the client to install and use, for the programmer to distribute and update, and for everyone to store and reproduce results. The framework can be personalized and extended for a specific simulation need. Link: https://generalsimulationlibrary.readthedocs.io/

download(filename)

Utility to download file, using colab

export_xlsx(filename)

Creates an excel file and saves the plot data and simulation data. It helps providing a file format that final users might be more familiar with.

Parameters:filename (string) – Name for the file.
interactive_plot()

[summary]

load(filename)

Loads a simulation from a simulation file generated with the save method to restore the simulation.

Parameters:filename (string) – Name for the simulation file.
new(inputs, plot_options=None)

Associates inputs and plot options to the simulation.

Parameters:
  • inputs (dict) – The inputs that will be used in the simulation. This can be completely personalized.
  • plot_options (dict, optional) – The plot options, defaults to None
plot(filename='', display=True)

Conditionally imports the matplotlib library, and if possible, plots the experimental data given in plot_options, and the simulation data.

Parameters:
  • filename (str, optional) – Filename to save the graph. If not provided, figure is not saved. Defaults to ‘’.
  • display (bool, optional) – Boolean to show (True) or not show (False) the graph. Defaults to False
save(filename)

Saves the current state of the simulation, with all the provided information. The created file can be used with the load method to restore the simulation.

Parameters:filename (string) – Name for the simulation file.
simulate()

Conditionally imports the numpy library.

status()

Prints out the detected configuration: environment, python and library versions.