Depot Simulation for eFLIPS
Project description
eflips-depot
Part of the eFLIPS/simBA list of projects.
eFLIPS has been developed within several research projects at the Department of Methods of Product Development and Mechatronics at the Technische Universität Berlin (see https://www.tu.berlin/mpm/forschung/projekte/eflips).
With eFLIPS, electric fleets and depots can be simulated, planned and designed. This repository contains only the planning and design tool for depots.
The repository contains an example for the simulation and planning of an elecric bus depot, which is based on the dissertation by Dr.-Ing. Enrico Lauth (see https://depositonce.tu-berlin.de/items/f47662f7-c9ae-4fbf-9e9c-bcd307b73aa7).
Installation
-
Clone this git repository (or download a specific release)
git clone git@github.com:mpm-tu-berlin/eflips-depot.git
-
Install the packages listed in
poetry.lock
andpyproject.toml
into your Python environment. Notes:- The suggested Python version os 3.11.*, it may work with other versions, but this is not tested.
- Using the poetry package manager is recommended. It can be installed accoring to the instructions listed here.
macOS
poetry env use 3.11 poetry install
Windows
If you are using Windows, you have to provide the full path to the desired Python executable, e.g.:
poetry env use C:\Users\user\AppData\Local\Programs\Python\Python311\python.exe poetry install
-
To start a simulation, an existing eFLIPS-Model database is requires. Once you have that, you can run the script
bin/example.py
Usage
Please refer to the Documentation section of this Readme for information on how to use eFLIPS-Depot.
The API of eFLIPS-Depot can be accessed via eFLIPS.depot.api
. A usage example can be found in the
script bus_depot/user_example.py
.
Testing
NOTE: Be aware that the tests will clear the database specified in the DATABASE_URL
environment variable. Make sure that you are not using a database that you want to keep.
Testing is done using the pytest
framework with tests located in the tests
directory. To run the tests, execute the following command in the root directory of the repository:
export PYTHONPATH=tests:. # To make sure that the tests can find the eflips package
export DATABASE_URL=postgis://postgres:postgres@localhost:5432/postgres # Or whatever your database URL is
export DJANGO_SETTINGS_MODULE=tests.api.djangosettings # To make sure that the tests use the correct settings
pytest
Documentation
Documentation is available on Read the Docs.
To locally create the documentaiton from the docstrings in the code using sphinx-autoapi, you can create the documentation execute the following command in the root directory of the repository:
cd docs/
sphinx-build -b html . _build
Development
We utilize the GitHub Flow branching structure. This means
that the main
branch is always deployable and that all development happens in feature branches. The feature branches
are merged into main
via pull requests.
We use black for code formatting. You can use pre-commit to ensure the code is formatted correctly before committing. You are also free to use other methods to format the code, but please ensure that the code is formatted correctly before committing.
Please make sure that your poetry.lock
and pyproject.toml
files are consistent before committing. You can use poetry check
to check this. This is also checked by pre-commit.
License
This project is licensed under the AGPLv3 license - see the LICENSE file for details.
Funding Notice
This code was developed as part of the project eBus2030+ funded by the Federal German Ministry for Digital and Transport (BMDV) under grant number 03EMF0402.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file eflips_depot-4.3.18.tar.gz
.
File metadata
- Download URL: eflips_depot-4.3.18.tar.gz
- Upload date:
- Size: 205.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0490f41a5ca38512f39223a66ce7d1fe0be719d5d0c7f1f335b3c81632bdaa02 |
|
MD5 | 0a8b04b43d416d5f7cb4ce67c38ec695 |
|
BLAKE2b-256 | 5847202028c2398a89c56ea227e1e734de7c9629a5fac2bb676dd6a1968ff927 |
Provenance
The following attestation bundles were made for eflips_depot-4.3.18.tar.gz
:
Publisher:
release.yml
on mpm-tu-berlin/eflips-depot
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
eflips_depot-4.3.18.tar.gz
- Subject digest:
0490f41a5ca38512f39223a66ce7d1fe0be719d5d0c7f1f335b3c81632bdaa02
- Sigstore transparency entry: 145137052
- Sigstore integration time:
- Predicate type:
File details
Details for the file eflips_depot-4.3.18-py3-none-any.whl
.
File metadata
- Download URL: eflips_depot-4.3.18-py3-none-any.whl
- Upload date:
- Size: 217.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0236fc383be9d4076ad956d27601b5f15bdadb05557899d565fec1139a8dcbe1 |
|
MD5 | e1cd9a9f41e6f1305774c8f1151f50bc |
|
BLAKE2b-256 | 52b138914a7cca417549c40f46b80e252cf0b1906c2d7126236b2385dc5bc0eb |
Provenance
The following attestation bundles were made for eflips_depot-4.3.18-py3-none-any.whl
:
Publisher:
release.yml
on mpm-tu-berlin/eflips-depot
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
eflips_depot-4.3.18-py3-none-any.whl
- Subject digest:
0236fc383be9d4076ad956d27601b5f15bdadb05557899d565fec1139a8dcbe1
- Sigstore transparency entry: 145137053
- Sigstore integration time:
- Predicate type: