3. Installation
RHEIA in its entirety is a Python package. The following sections provide information on how to install Python, followed by the installation guide of RHEIA and the package dependencies for performing deterministic design optimization, robust design optimization and uncertainty quantification.
3.1. Installing Python
Python can be installed in several ways on your system. If the distribution platform is no constraint, we recommend installing Python via the Anaconda Python distribution, as it includes the installation of many common packages in data science (and used in RHEIA), such as NumPy and SciPy.
3.2. Installing RHEIA
3.2.1. From PyPi
RHEIA is available on PyPi, and can be downloaded via the pip package manager. The following command installs the most recent version of RHEIA and the package dependencies:
pip install rheia
Specific from a Jupyter Kernel:
import sys
!{sys.executable} -m pip install rheia
After installation, the package should be installed in the native rheia folder under the default site-packages folder,
e.g. C:\Users\...\anaconda3\Lib\site-packages\rheia.
3.2.2. From source
Alternatively, if you do not have pip, you can instead install the package from the source code. First, clone the repository:
git clone https://github.com/rheia-framework/RHEIA.git
Then, from that directory, install the package:
python setup.py install
The package will be installed under the default site-packages folder, in the .egg folder
e.g. C:\Users\...\anaconda3\Lib\site-packages\rheia-1.0.0-py3.8.egg\rheia.
3.3. Testing
From the rheia directory, the unit tests can be conveniently performed using pytest:
pytest
A set of unit sets can be selected individually, e.g. the ones to test the energy system models:
pytest TESTS\test_models.py
3.4. Package dependencies
The RHEIA features require the installation of several packages.
To evaluate the hydrogen-based energy system models:
- Included in Anaconda native installation:
Matplotlib
NumPy
Pandas
- Other packages:
pvlib
To perform uncertainty quantification:
- Included in Anaconda native installation:
NumPy
SciPy
- Other packages:
pyDOE
SobolSequence
To perform deterministic design optimization:
- Included in Anaconda native installation:
NumPy
- Other packages:
pyDOE
DEAP
To perform robust design optimization:
- Included in Anaconda native installation:
NumPy
SciPy
- Other packages:
pyDOE
SobolSequence
DEAP
In case Anaconda is used, keep in mind that the packages excluded from the Anaconda native installation can be installed in the activated Anaconda environment either by the conda library or through the classic pip library.
3.5. Import what you need
RHEIA allows to import the specific tool you need. To run deterministic or robust design optimization:
import rheia.OPT.optimization as rheia_opt
To perform uncertainty quantification:
import rheia.UQ.uncertainty_quantification as rheia_uq
To post-process the results:
import rheia.POST_PROCESS.post_process as rheia_pp