Examples
Subpackages
Submodules
examples.example_hisim module
Requests a file containing KPIs generated from HiSim
- examples.example_hisim.main()
examples.example_hisim_sensitivity_analysis module
examples.example_lpg module
Requests a load profile that is generated using the Load Profile Generator (LPG)
- examples.example_lpg.main()
examples.example_mean_load_profiles module
examples.example_multiple_hisim_requests module
Sends multiple requests to HiSim and collects all results.
- examples.example_multiple_hisim_requests.calculate_multiple_hisim_requests(hisim_configs: List[str], raise_exceptions: bool = False, result_files=None) List[ResultDelivery | Exception]
Sends multiple hisim requests for parallel calculation and collects their results.
- Parameters:
hisim_configs (List[str]) – the hisim configurations to calculate
return_exceptions (bool, optional) – whether exceptions should be caught and returned in the result list, defaults to False
- Returns:
a list containing the content of the result KPI file for each request
- Return type:
List[str]
examples.example_shutdown module
This example shows how to shutdown all UTSP workers
examples.example_smelpg module
Requests a load profile that is generated using the small and medium-sized enterprise load profile generator (sme-lpg)
- examples.example_smelpg.main()
examples.example_upload_image module
This example shows how to add a new provider image to the UTSP server.
Strictly speaking, this script sends a tar file containing the build context for a docker image to the server, so that the server builds the new provider image. This is done because the build context is usually significantly smaller than the built docker image file.
In order to create a build context of a provider, simply create a .tar file containing everything that is needed to build the docker image, including sources and Dockerfile. Usually this is simply the full repository of the software. The .tar file can optionally be compressed via gzip and sent as a .tar.gz file.
examples.example_weather_provider module
Requests TRY weather data
- examples.example_weather_provider.main()