Package: psimpy
DescriptionPSimPy(Predictive and probabilistic simulation with Python) implements
a Gaussian process emulation-based framework that enables systematic and
efficient investigation of uncertainties associated with physics-based models
(i.e. simulators).PrerequisitesBefore installing and usingPSimPy, please ensure that you have the following
prerequisites:(Please note that we will cover number 1 to 3 in our recommended installation
method:Installation in a Conda Environment.)Python 3.9 or later:Make sure you have Python installed on your system. You can download the latest
version of Python from the official website:Python DownloadsR Installed and Added to the PATH Environment Variable:Install R from the officialR Projectwebsite.Add R to your system's PATH environment variable. This step is crucial for
enabling communication between Python and R.(Optional)RobustGaSP - R package:The emulator module,robustgasp.py, relies on the R packageRobustGaSP. This has also been initegrated with other PSimPy modules, such asactive_learning.py. In order to utilize these modules, make sure to install the R packageRobustGaSPfirst.(Optional)r.avaflow - Mass Flow Simulation Tool:PSimPyincludes a simulator module,ravaflow3G.py, that interfaces
with the open source softwarer.avaflow 3G. If you intend to use this module, please refer to the official documentation ofr.avaflow 3Gto for installation guide.InstallationPSimPycan be easily installed usingpip.$pipinstallpsimpyThis command will install the package along with its dependencies.Installation in a Conda Environment (Recommended)We recommond you to installPSimPyin a virtual environment such as acondaenvironment. In this section, we will ceate acondaenvironment, install prerequisites (number 1 to 3), install python, and lastly, add the conda environment toJupyter Notebook. You may want to first installAnacondaorMinicondaif you haven't. The steps afterwards are as follows:Create a conda environment with Python and R, and activate the environment:$condacreate--nameyour_env_namepythonR
$condaactivateyour_env_nameInstall the R packageRobustGaSPin the R terminal:$R
...
>install.packages("RobustGaSP",repos="https://cran.r-project.org",version="0.6.4")Make sure it is successfully installed:>library("RobustGaSP")Next, you need to configure the environment variableR_HOMEso thatrpy2knows where to findRpackages. Find yourR_HOMEusing the following command and then quit the R terminal:>R.home()>q()Set the environment variableR_HOMEin your
conda environment with$condaenvconfigvarssetR_HOME=your_R_HOMEReactivate your conda environment to make the change take effect by$condadeactivate
$condaactivateyour_env_nameInstallPSimPyusingpipin your conda environment:$pipinstallpsimpyNow you should havePSimPyand its dependencies successfully installed in your
conda environment. You can use it in the Python terminal or in your Python IDE.If you would like to use it withJupyter Notebook(iPython Notebook), there
is one extra step needed to set your conda environment on your Notebook:Installipykerneland install a kernel that points to your conda environment:$condainstall-cconda-forgeipykernel
$python-mipykernelinstall--user--name=your_env_nameNow you can start your Notebook, change the kernel to your conda environment,
and usePSimPy.DocumentationDetailed documentation ofPSimPyis hosted athttps://mbd.pages.rwth-aachen.de/psimpy/,
including the API and theory (or reference) of each module.UsageUsage examples are provided by theExample Gallery.LicensePSimPywas created by Hu Zhao at the Chair of Methods for Model-based
Development in Computational Engineering (RWTH Aachen University, Germany). It
is licensed under the terms of the MIT license.