Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 89ece784 authored by tansial's avatar tansial
Browse files

first commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #138988 failed
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
#VSCode
.vscode/
.history/
#documentation
_build/
\ No newline at end of file
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
Authors
=======
Developer:
- Alessandro Tansini <Alessandro.TANSINI@ec.europa.eu>
- Andres Marin <Andres.LAVERDE-MARIN@ext.ec.europa.eu>
Documentation:
- Alessandro Tansini <Alessandro.TANSINI@ec.europa.eu>
- Andrés Marín <Andres.LAVERDE-MARIN@ext.ec.europa.eu>
Model:
- Alessandro Tansini <Alessandro.TANSINI@ec.europa.eu>
Supervision:
- Georgios Fontaras <georgios.fontaras@ec.europa.eu>
- Athina Mitsiara <Athina.MITSIARA@ext.ec.europa.eu>
Tester:
- Dimitris Komnos <Dimitrios.KOMNOS@ec.europa.eu>
\ No newline at end of file
.. figure:: ./doc/_static/images/logo.png
:align: center
:alt: alternate text
:figclass: align-center
.. _start-info:
:versions: |gh-version| |rel-date| |python-ver|
:documentation: Under construction|doc|
:sources: https://github.com/tansial/VDP |codestyle|
:keywords: vehicle, data processing, real data.
:short name: VDP
:live-demo: Under construction
:Copyright and License: © Copyright (c) 2021 European Union.
Licensed under the EUPL, Version 1.2 or – as soon they will be approved by the European Commission – subsequent versions of the EUPL (the "Licence");
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: |proj-lic|
Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence.
A python-3.7+ package to process vehicle data.
.. Caution:: This project is under construction, all documentation here needs to be updated.
.. _end-info:
.. contents:: Table of Contents
:backlinks: top
.. _start-intro:
Introduction
============
Overview
--------
.. _end-intro:
.. _start-installation:
Installation
============
Prerequisites
-------------
**Python-3.7+** is required and **Python-3.10** recommended.
It requires **numpy/scipy** and **pandas** libraries with native backends.
.. Tip::
On *Windows*, it is preferable to use the `Anaconda <https://www.anaconda.com/products/individual>`__ distribution.
To avoid possible incompatibilities with other projects
.. Tip::
Comand to create a conda enviroment with a specifict python distribution::
conda create -n myenv python=x.x
Download
--------
Download the sources,
- either with *git*, by giving this command to the terminal::
git clone https://github.com/tansial/VDP.git
Install
-------
From within the project directory, run one of these commands to install it:
- for standard python, installing with ``pip`` is enough (but might)::
pip install -e <path_to_vdp>
.. _end-installation:
.. _start-sub:
.. |python-ver| image:: https://img.shields.io/badge/PyPi%20python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-informational
:alt: Supported Python versions of latest release in PyPi
.. |gh-version| image:: https://img.shields.io/badge/GitHub%20release-dev-orange
:target: https://github.com/tansial/VDP/tags
:alt: Latest version in GitHub
.. |rel-date| image:: https://img.shields.io/badge/rel--date-14--07--2022-orange
:target: https://github.com/JRCSTU/gearshift/releases
:alt: release date
.. |br| image:: https://img.shields.io/badge/docs-working%20on%20that-red
:alt: GitHub page documentation
.. |doc| image:: https://img.shields.io/badge/docs-passing-success
:alt: GitHub page documentation
.. |proj-lic| image:: https://img.shields.io/badge/license-European%20Union%20Public%20Licence%201.2-lightgrey
:target: https://joinup.ec.europa.eu/software/page/eupl
:alt: EUPL 1.2
.. |codestyle| image:: https://img.shields.io/badge/code%20style-black-black.svg
:target: https://github.com/ambv/black
:alt: Code Style
.. |pypi-ins| image:: https://img.shields.io/badge/pypi-v1.1.3-informational
:target: https://pypi.org/project/wltp-jrshift/
:alt: pip installation
.. |binder| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/git/https%3A%2F%2Fcode.europa.eu%2Fjrc-ldv%2Fjrshift.git/main?labpath=Notebooks%2FGUI_binder_interface.ipynb
:alt: JupyterLab for Gerashift Calculation Tool (stable)
.. |CO2| replace:: CO\ :sub:`2`
.. _end-sub:
config.py 0 → 100644
ordered_columns = [
"TIME",
"DYNO_SPEED",
"OBD_SPEED",
"GPS_SPEED",
"V_HV",
"V_HVBAT",
"I_HVBAT",
"I_MOTOR",
"I_MOTOR_F",
"I_MOTOR_R",
"I_MAC",
"I_COOLER",
"I_HEATER",
"I_DCDC_LV",
"I_DCDC_HV",
"T_MOTOR",
"S_MOTOR",
"P_HVBAT",
"P_EL_MOTOR",
"P_ME_MOTOR",
"P_MOTOR_F",
"P_MOTOR_R",
"P_MAC",
"P_AC_COMP",
"P_PTC_CABIN",
"P_DCDC_LV",
"P_DCDC_HV",
"V_LV",
"SOC",
"T_AMB",
"T_CABIN",
"T_HVBAT",
"E_RES_HVBAT",
"CEC",
"CED",
"GPS_ALT",
"GPS_LAT",
"GPS_LON",
"GPS_VER_ACC",
"GPS_HOR_ACC",
"GPS_SPEED_ACC",
"GPS_SAT",
"GPS_HDOP",
]
list_GPS = ["GPS_VER_ACC", "GPS_HOR_ACC", "GPS_SPEED_ACC", "GPS_SAT", "GPS_HDOP"]
list_initialise_none = []
dict_initialise = {}
for col in list_GPS + list_initialise_none:
dict_initialise[col] = None
cols_to_drop = [
"GPS_ALT",
"f0",
"f1",
"f2",
"mro",
"HVBAT_capacity",
"OBD_SPEED_CORRECTION_FACTOR",
"PANDAS_TIMESTAMP",
"TIME_SDS",
"S_MOTOR",
"T_MOTOR",
]
list_cols_reduced = [
"TIME",
"SPEED",
"ACCELERATION",
"SOC_HVBAT",
"V_HV",
"P_HVBAT",
"ice_motoring_torque",
"ice_torque_from_obd",
"ice_torque_out",
"ice_power_out",
"P_ME_MOTOR",
"P_EL_MOTOR",
"P_MAC",
"P_PTC_CABIN",
"P_AC_COMP",
"P_DCDC_LV",
"P_DCDC_HV",
"P_HVOTHERS",
"P_HVLOADS",
"P_HVBAT_check",
"P_HVBAT_rev",
"ice_power_at_wheels",
"ems_power_at_wheels",
"friction_brakes_power",
"MOTIVE_POWER",
"T_AMB",
"T_CABIN",
"T_HVBAT",
"E_HVBAT_rev_cumulative",
"E_HVOTHERS_cumulative",
"E_HVBAT_check_cumulative",
"E_wheels_cumulative",
"E_DCDC_HV_cumulative",
"E_MOTOR_cumulative",
"E_HVBAT_cumulative",
"E_HVBAT_cumulative_from_SOC_HVBAT",
"E_HVBAT_cumulative_from_OBD",
"E_MAC_cumulative",
"E_HVLOADS_cumulative",
"E_wheels_pos_cumulative",
"E_HVOTHERS_share",
"E_HVLOADS_share",
"E_DCDC_HV_share",
"E_MAC_share",
"E_MOTOR_share",
"GPS_LAT",
"GPS_LON",
"ALTITUDE",
"ALTITUDE_SRTM",
"GPS_POS_VALID",
"GPS_ALT_VALID",
"E_ice_neg_at_wheels",
"E_ems_neg_at_wheels",
"E_friction_brakes",
"E_wheels_neg_cumulative",
"rde_phase",
"is_urban",
"is_rural",
"is_motorway",
"DISTANCE",
"DISTANCE_urban",
"DISTANCE_rural",
"DISTANCE_motorway",
"share_urban",
"share_rural",
"share_motorway",
]
to_drop_2 = ["ANGLE_SLOPE", "delta_DISTANCE", "delta_E_HVBAT"]
File added
dict_defaults = dict(replace_ice_motoring_torque_with_default=0, fuel_type="gasoline")
File added
File added
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
doc/_static/images/logo.png

174 KiB

VDP
===
.. toctree::
:maxdepth: 4
vdp
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
from os.path import abspath, join, dirname
prj_dir = abspath(join(dirname(__file__), ".."))
sys.path.insert(0, prj_dir)
# -- Project information -----------------------------------------------------
project = "VDP"
copyright = "2022, European commission"
author = "European commission"
# The full version, including alpha/beta/rc tags
release = "0.0.1.dev"
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.extlinks",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx_click.ext",
"sphinx.ext.autodoc",
]
graphviz_output_format = "svg"
autodoc_member_order = "bysource"
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"
# The encoding of source files.
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = "index"
# General information about the project.
project = "VDP"
copyright = "2015-2019, European Commission (JRC)" # @ReservedAssignment
author = "see AUTHORS.rst"
# -- Options for HTML output ----------------------------------------------
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
if not on_rtd:
html_theme = "sphinx_rtd_theme"
# Add any paths that contain custom themes here, relative to this directory.
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = "en"
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build", "setup.rst", "modules.rst"]
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = False
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# Output file base name for HTML help builder.
htmlhelp_basename = "GEARSHIFTdoc"
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "GEARSHIFT", "GEARSHIFT Documentation", [author], 1)]
# If true, show URL addresses after external links.
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
"GEARSHIFT",
"GEARSHIFT Documentation",
author,
"GEARSHIFT",
"One line description of project.",
"Miscellaneous",
),
]
# Documents to append as an appendix to all manuals.
# texinfo_appendices = []
# If false, no module index is generated.
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}
.. figure:: ../doc/_static/images/logo.png
:align: center
:alt: alternate text
:figclass: align-center
.. include:: ../README.rst
:start-after: .. _start-info:
:end-before: .. _end-info:
.. include:: ../README.rst
:start-after: .. _start-sub:
:end-before: .. _end-sub:
.. include:: ../AUTHORS.rst
.. toctree::
:maxdepth: 2
:caption: Contents:
api
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
vdp.algorithms package
======================
Module contents
---------------
.. automodule:: vdp.algorithms
:members:
:undoc-members:
:show-inheritance:
vdp.calibration package
=======================
Module contents
---------------
.. automodule:: vdp.calibration
:members:
:undoc-members:
:show-inheritance:
vdp.components.dcdc package
===========================
Module contents
---------------
.. automodule:: vdp.components.dcdc
:members:
:undoc-members:
:show-inheritance:
vdp.components.drivebattery package
===================================
Module contents
---------------
.. automodule:: vdp.components.drivebattery
:members:
:undoc-members:
:show-inheritance:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment