Package: wltp-jrshift
versions:documentation:https://gearshift-calculation-tool.readthedocs.io/en/latest/sources:https://code.europa.eu/jrc-ldv/jrshiftkeywords:automotive, car, cars, driving, engine, emissions, fuel-consumption,
gears, gearshifts, rpm, simulation, simulator, standard, vehicle, vehicles, WLTPshort name:JR-Shiftlive-demo: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: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.6+ package to generate thegear-shiftsof Light-duty vehiclesTable of ContentsIntroductionOverviewInstallationPrerequisitesDownloadInstallProject files and foldersQuick-StartUsageSetupLoad dataDispatcherIntroductionThe aim of the JR-Shift is obtain the Required Engine Speeds, the Available Powers, the Required Vehicle Speeds
and the Gears for the whole WLTC based on the vehicle characteristics. The model should allow accurate calculation
of final trace and the operating conditions of the engine.OverviewThe calculator accepts as input an excel file  that contains the vehicle’s technical data, along with parameters for
modifying the execution WLTC cycle, and it then spits-out the gear-shifts of the vehicle and the others parameters used
during the obtaining of these. It does not calculate any CO2emissions.InstallationPrerequisitesPython-3.6+is required andPython-3.7recommended.
It requiresnumpy/scipyandpandaslibraries with native backends.TipOnWindows, it is preferable to use theAnacondadistribution.
To avoid possible incompatibilities with other projectsDownloadDownload the sources,either withgit, by giving this command to the terminal:git clone https://github.com/JRCSTU/gearshift_calculation_tool --depth=1InstallFrom within the project directory, run one of these commands to install it:for standard python, installing withpipis enough (but might):pip install -e .[path_to_gearshift_calculation_tool_folder]Project files and foldersThe files and folders of the project are listed below:+--gearshift/                                       # main folder that contains the whole gearshift project
|   +--cli/                                         # folder that contains all cli scripts
|   +--core/                                        # folder that contains core packages
|       +--load/                                    # (package) python-code of the load
|           +--speed_phases/                        # folder that contains speed phases in ftr format
|           +--excel.py                             # (script) load from the excel file parameters
|       +--model/                                   # (package) python-code of the model
|           +--calculateShiftpointsNdvFullPC/       # (package) python-code of the calculate shift points, Ndv and  FullPC
|           +--scaleTrace/                          # (package) python-code of the calculate scale trace
|       +--write/                                   # (package) python-code of the write
|           +--excel.py                             # (script) write to the excel file output parameters
|   +--demos/                                       # folder that contains demo files
|   +--docs/                                        # folder that contains documentation
+-- AUTHORS.rst
+--setup.py                                         # (script) The entry point for `setuptools`, installing, testing, etc
+--README.rst
+--LICENSE.txtQuick-StartCmd-line usageThe command-line usage below requires the Python environment to be installed, and provides for
executing an experiment directly from the OS’s shell (i.e.cmdin windows orbashin POSIX),
and in asinglecommand.  To have precise control over the inputs and outputs$gearshift--help## to get generic help for cmd-line syntax$gearshiftdemo## to get demo input file$gearshiftrun"path_input_file"-O"path_to_save_output_file"## to run gearshift toolUsageIn this example we will use gearshift model in order to predict the gears.SetupImport dispatcher(dsp) from gearshift tool that contains functions and simulation model to process vehicle data and Import also
schedula for selecting and executing functions. for more information on how to useschedulafromgearshift.coreimportdspimportschedulaasshLoad dataLoad vehicle data for a specific vehicle fromexcel templatevehData='gs_input_demo.xlsx'Define the input dictionary for the dispacher.input=dict(input_file_name=vehData)DispatcherDispatcher will select and execute the proper functions for the given inputs and the requested outputscore=dsp(input,outputs=['sol'],shrink=True)Plot workflow of the core model from the dispatchercore.plot()This will automatically open an internet browser and show the work flow of the core model as below.
You can click all the rectangular boxes to see in detail sub models like load, model, write and plot.The load moduleLoad outputs of dispatcher Select the chosen dictionary key (sol) from the given dictionary.solution=sh.selector(['sol'],sh.selector(['sol'],core))Select each output case# Select first casesolution['sol'][0]# Select second case casesolution['sol'][1]# Select gears output for different casesgears={}forsolinsolution['sol']:gears[f'gears_{sol["Case"]}']=sol['GearsOutput']