Command Line Interface (CLI)

From COPERT Documentation
Revision as of 17:32, 12 November 2021 by Michalis.p (talk | contribs)
Jump to navigation Jump to search

This document describes the functionalities of the Command Line Interface (CLI) which is a new COPERT feature integrated in the program code. The document will cover the additional capabilities of COPERT under the CLI. All previous functionalities are described in the existing COPERT manual (http://COPERT.emisia.com). The CLI does not introduce new methodological elements which are described in detail in EEA’s emission inventory guidebook (https://www.eea.europa.eu/publications/emep-eea-guidebook-2019/part-b-sectoral-guidance-chapters/1-energy/1-a-combustion/1-a-3-b-i/view). The CLI feature will, from now on, follow the development of the software (currently COPERT version 5.4), which means that it will be available to all COPERT users. Therefore, it is advised that users familiarize themselves with the COPERT software before using the CLI interface.

Introduction - main features

The purpose of this feature is to allow multiple automatic executions of COPERT, by externally providing input data and subsequently receiving results in an external file. Moreover, third party applications (like Matlab or custom software) will be able to execute COPERT via the Command Line Interface to perform automated tasks.

Calculation methodology will follow the COPERT functionalities allowing for emission factor and emission calculation as well as energy consumption calculation. Advanced features of the model can only be run by using the windows version of the tool. The following table lists the features available via the CLI and those available under Windows.

Table 1

Installation

No separate installation is required; the feature is integrated in the COPERT installation.

Minimum software requirements

COPERT is a 64-bit application and requires a 64-bit Microsoft Windows operating system, Microsoft® Windows 7 or newer Windows version.

Minimum hardware requirements

  1. 2 GHz, 64-bit processor
  2. 8 GB RAM
  3. 30 MB for installation, 100 MB for full run
  4. Screen Resolution: 1024x768 pixels

Note that a higher frequency processor based computer and/or more on RAM memory are recommended if frequent use of the program is expected.

Execution

The CLI is available on any PC where the COPERT tool is installed. It is called by the Windows command line window. To open the command line window (Figure 1) click Start. In the Search or Run line, type cmd (short for command), and press Enter.

A specific syntax must be followed to start the procedure.

CLI execution syntax

The command line syntax is the following:

<COPERT.exe path1>/COPERT.exe” -i <input folder path>/<input filename with extension xlsx or json> -oEF <output folder path>/<output filename with extension xlsx or json><one space><Switch 12><one space><Switch n2>

1 Typical installation path is “C:\Program Files\COPERT 5”

1 optional, see description below

E.g.: "C:\Program Files\COPERT 5\COPERT.exe" -i "D:\COPERT_CLI\JRC COPERT CLI example.xlsx" -oEF “D:\COPERT_CLI\JRC_results.xlsx"

Examples of software use

Example 1: Provide a function for the user defined vehicle’s speed

One of the CLI’s major advantages is the ability to integrate in the same file COPERT and non-COPERT vehicle types and their respective emissions. To facilitate emission calculation the user defines an implied emission factors per drive profile (Urban Peak, Urban off peak, Rural and Highway mode) for non COPERT vehicles. Alternatively, the user can define a function for the emission factor which is speed dependent, provide custom vehicle speed in the respective sheet, and link the cells (Figure 9). In this way different scenarios can be performed by using different speeds, even for the non-COPERT vehicle types.

Example 2: How to introduce multiple powertrains (or fuels) for the same vehicle

New vehicles may use more than one motor to operate. Moreover, these motors may consume different fuels provided by external sources. Moreover, it is possible that the fuel consumed may be a blend (e.g. fossil and biofuels), requiring two emission or consumption factors to simulate engine behavior. To model these vehicles the user can “split up” the vehicle according to operation and consumption modes, provide separate emission or consumption factors and calculate results for each part (Figure 10). The model will treat each individual part as a separate vehicle, allowing the user to sum the results into one vehicle type. A good example is the plug-in hybrid vehicle. The user can provide 3 vehicles to the model as in the example in Figure 10.

To simulate the percentage, use for the different operating conditions a split to the activity will be provided. If a 30/70 split exists between electric and internal combustion engine operation and a fuel blend E10 is used, this can be approximated by splitting mean vehicle activity, e.g. 15.000 km per year, into:

30% x 15.000 km = 4.500 km of pure electric propulsion,

and the remaining 10.500 km will be further subsplit 90/10 into petrol and biofuel (Figure 11).

Separate emission or energy consumption factors must be provided by the user for each fuel type. Energy consumption factors are treated in COPERT the same way as emission factors. COPERT will calculate emissions and consumption for all vehicles. The user can at a later stage sum up results in a single row.

Example 3: Provide own emission factors for COPERT vehicle types

It is not possible to provide own emission factor for COPERT vehicle types using the CLI functionality. However, there is a workaround if the user wishes to do so. The user can define a custom vehicle along with the respective input data (stock, activity, custom emission factors etc) with a description matching almost exactly the description of the COPERT vehicle (Figure 12). This way the input information will not be used in the COPERT algorithm but will be treated as a non-COPERT vehicle, allowing for the custom emission factors to be used.

Glossary

List of abbreviations

Annex