gearshift.core.load package

Submodules

gearshift.core.load.excel module

Functions to read inputs from excel.

parse_excel_file(input_file_name, input_file)[source]

Reads cycle’s data and simulation plans.

Parameters:
  • input_file_name (str) – Input file name.

  • input_file (io.BytesIO) – Input file.

Returns:

Raw input data.

Return type:

dict

Module contents

Functions and dsp model to load data from a GEARSHIFT input file.

Sub-Modules:

excel

Functions to read inputs from excel.

open_input_file(input_file_name)[source]

Open the input file.

Parameters:

input_file_name (str) – Input file name.

Returns:

Input file.

Return type:

io.BytesIO

check_file_format(input_file_name, *args, ext=('.xlsx'))[source]

Check file format extension.

Parameters:
  • input_file_name (str) – Input file name.

  • ext (tuple[str]) – Allowed extensions.

Returns:

If the extension of the input file is within the allowed extensions.

Return type:

bool

merge_data(raw_data)[source]

Merge raw data with the speed phases data

Parameters:

raw_data (dict) – Raw input data.

Returns:

Merged raw data

Return type:

dict