Documentation for Users¶
As a regular user of pypsdier, this is the only class and methods you should know and use.
-
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://pypsdier.readthedocs.io/
-
download
(filename)¶ Utility to download file, using colab.
-
export_xls
(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.
-
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
(figsize=(12, 8), plot_type='all', filename='', display=True)¶ Conditionally imports the matplotlib library, and if possible, plots the experimental data given in plot_options, and the simulation data.
Parameters: - plot_type –
?
- figsize (tuple, optional) – Size of the figure
- 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
- plot_type –
-
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
(sim_type)¶ Function that encapsulates the numerical simulation. Stores the simulation internally.
Parameters: sim_typle – Type of simulation required. Only two options: ode or pde. Returns: Dictionary with the results of the simulation Return type: dict
-
status
()¶ Prints out the detected configuration: environment, python and library versions.
-