Welcome to consmodel library 👋
!!! Warning: the library is active and the functionalities are being added on weekly basis, some functionalities will also change !!!
The library aims to provide a simple way to create individual consumer loads and generation.
The library is a centralised modelling tool that implements the following consumption/generation consumptions:
- pure consumption model,
- solar plant model,
- heat pump model,
- electric vehicle modelling,
- possibly other models...
The main idea of the library is to be able to easily create consumption or generation power consumption profiles.
The schema of the library is as follows:
🏠 Homepage
Install
pip3 install consmodel
Usage
PV model
from consmodel import PV
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# create a simple PV model
pv = PV(lat=46.155768,
lon=14.304951,
alt=400,
index=1,
name="test",
freq="15min",)
timeseries = pv.simulate(pv_size=14.,
year=2022,
model="ineichen",
consider_cloud_cover=True)
# plot the results
timeseries.plot()
plt.show()
BS model
from consmodel import BS
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# create a simple PV model
test_consumption = [0.,-3.,-2.,8.,7.,6.,7.,8.,5.,4.,-2.]
test_consumption_df = pd.DataFrame({"p": test_consumption},
index=pd.date_range("2020-01-01 06:00:00",
periods=11,
freq="15min"))
bs = BS(lat=46.155768,
lon=14.304951,
alt=400,
index=1,
st_type="10kWh_5kW",
freq="15min",)
timeseries = batt.simulate(control_type="installed_power",
p_kw=test_consumption_df)
# plot the results
timeseries.plot()
plt.show()
Consumer model
from consmodel import ConsumerModel
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
cons = ConsumerModel(lat=46.155768,
lon=14.304951,
alt=400,
index=1,
name="ConsumerModel_default",
tz="Europe/Ljubljana",
use_utc=False,
freq="15min",)
timeseries = cons.simulate(has_generic_consumption=False,
has_pv=True,
has_heatpump=True,
has_ev=False,
has_battery=True,
start=pd.to_datetime("2020-01-01 06:15:00"),
end=pd.to_datetime("2020-01-01 06:00:00")+pd.Timedelta("1d"),
pv_size=14.,
wanted_temp=20.,
hp_st_type="Outdoor Air / Water (regulated)",
bs_st_type="10kWh_5kW",
control_type="production_saving")
timeseries.plot()
plt.show()
Author
👤 Blaž Dobravec
- Website: https://github.com/blazdob
- Github: @blazdob
- LinkedIn: @https://www.linkedin.com/in/blaz-dobravec/
Colaborated:
- Matej Oblak: @MatejGitOblak
- Bine Flajnik: @Bine-f
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!
Metadata
Release files for consmodel 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| consmodel-0.2.3.tar.gz | 26.1 kB | Without provenance | Details for consmodel-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| consmodel-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for consmodel-0.2.3-py3-none-any.whl |
Total release size: 54.0 kB
Release files / consmodel-0.2.3.tar.gz
| Download URL | consmodel-0.2.3.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
032d99aaf77a85aa205a7054d7cb897d48cac0d3db25c90897c8069edc4765a5
|
|
BLAKE2b-256 checksum How to use checksums |
4e0aa060831154c18ad425ffa4cbbea3df063c0fe250dbc91b9738bf02f9ef9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.18
|
Release files / consmodel-0.2.3-py3-none-any.whl
| Download URL | consmodel-0.2.3-py3-none-any.whl |
|---|---|
| Size | 27.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
510f8a1b82b215495a75c3d7bf6e01de8dbf8d1d262faff04caa0de734562bd2
|
|
BLAKE2b-256 checksum How to use checksums |
4def7462a355b8c92351dc549d34f06887ea9f27a484b61f69b641ed38a8300e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.18
|
Security for consmodel 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.