Skip to content

Commit

Permalink
Merge pull request #11 from NREL/update-readme
Browse files Browse the repository at this point in the history
Update readme and docs
  • Loading branch information
panne027 authored Sep 23, 2024
2 parents c3df642 + 7dfbfb2 commit f133e9c
Show file tree
Hide file tree
Showing 33 changed files with 2,456 additions and 1,690 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
[![homepage](https://img.shields.io/badge/homepage-t3co-blue)](https://www.nrel.gov/transportation/t3co.html) [![github](https://img.shields.io/badge/github-t3co-blue.svg)](https://github.com/NREL/T3CO) [![PyPI version](https://badge.fury.io/py/t3co.svg)](https://badge.fury.io/py/t3co) ![GitHub License](https://img.shields.io/github/license/NREL/T3CO) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/t3co)








# **T3CO** : Transportation Technology Total Cost of Ownership Tool
## Description

Expand All @@ -21,6 +15,12 @@ To start, go to the [Overview](https://github.com/NREL/T3CO-private/blob/264a730
**T3CO** is a general framework allowing a user to determine the total cost of ownership (TCO) of a FASTSim vehicle (paired with a FASTSim DriveCycle(s) for determining fuel efficiency). The user can also determine performance of gradability, acceleration, and range. In addition to straight TCO computation there is also the option to optimize a vehicle powertrain such that it meets performance optional targets while also optionally minimizing TCO.

## Installation
**From PyPI**
```bash
pip install t3co
```

**From Github**

First, clone the repository from **NREL** GitHub:

Expand All @@ -42,14 +42,14 @@ This will install t3co with minimal dependencies such that t3co files can be edi
to be compatible with the current code in T3CO.

## Demo
**Using the T3CO Config file**
**Using the [T3CO Config](https://github.com/NREL/T3CO/blob/c3df6421033cef7d35b7d7cd575ab94e85fcd9a9/t3co/resources/T3COConfig.csv) file**

```bash
cd t3co
python sweep.py --analysis-id 0
```

** or get some quick TCO results**
**Or get some quick TCO results**

```bash
cd t3co
Expand All @@ -76,18 +76,17 @@ pipx ensurepath
Then from T3CO root directory
```bash
pipx install pydoc-markdown
pydoc-markdown -I . -p . --render-toc > ../docs/content/CodeReference.md
pydoc-markdown -I . -p t3co --render-toc > docs/functions/CodeReference.md
```
for specific modules, specify the module name after `-m`:
`pydoc-markdown -I . -m sweep --render-toc > ../docs/content/sweep.md`
`pydoc-markdown -I . -m t3co/sweep --render-toc > docs/functions/sweep.md`

This generates CodeReference.md including a Table of Contents from all python docstrings in the T3CO package

## Generate MKDocs server for documentation website (For Developers)
Use the `mkdocs.yml` file to configure the documentation website on localhost. `mkdocs` and `mkdocstrings` should get installed along with other dependencies when running `pip install -e .` from the root directory. In case it throws an error, these packages can be installed separately:
```bash
pip install mkdocs
pip install mkdocstrings-python
pip install mkdocs mkdocstrings-python
```
**On Mac**

Expand Down
22 changes: 11 additions & 11 deletions docs/T3CO_Overview.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@

- [T3CO Introduction ](#t3co-introduction-)
- [Code Flow ](#code-flow-)
- [T3CO Introduction ](#t3co-introduction)
- [Code Flow ](#code-flow)
- [**Generating TCO and performance**](#generating-tco-and-performance)
- [T3CO Input Files ](#t3co-input-files-)
- [Optimization Flow ](#optimization-flow-)
- [Performance Objectives ](#performance-objectives-)
- [T3CO Input Files ](#t3co-input-files)
- [Optimization Flow ](#optimization-flow)
- [Performance Constraints ](#performance-constraints)



## T3CO Introduction <a name="introduction"></a>
## <a name="t3co-introduction"></a> T3CO Introduction

[NREL's Transportation Technology Total Cost of Ownership](https://www.nrel.gov/transportation/t3co.html) (T3CO) tool enables levelized assessments of the full life cycle costs of advanced technology commercial vehicles.

## Code Flow <a name="codeflow"></a>
## Code Flow <a name="code-flow"></a>

Generally speaking, T3CO can be used in two ways. The first way is generating total cost of ownership (TCO) metrics and performance metrics for a vehicle. The second way is optimizing a vehicle's specifications to achieve the lowest total cost of ownership possible. Since optimization requires gathering TCO and performance metrics during each step of optimization, it essentially is an expanded version of the first way of using T3CO. So we'll look at the first way first.

### **Generating TCO and performance**
### **Generating TCO and performance** <a name="generating-tco-and-performance"></a>

When generating [TCO](https://github.com/NREL/T3CO-private/blob/65cb44929caff7b6e10959364f4f18d10f888d1e/docs/models/TCO_calculations.md), there are a few main components of a vehicle's total cost of ownership:
- MSRP, the cost of the vehicle at time of purchase
Expand All @@ -33,19 +33,19 @@ The [Performance Constraints](#performance-constraints) determined for the vehic

More on that below.

## T3CO Input Files <a name="T3CO_Input_Files"></a>
## T3CO Input Files <a name="t3co-input-files)"></a>

There are three main files that form the basis of T3CO TCO calculations and T3CO optimizations. The first is the vehicle file, which is a [FASTSim input file](https://docs.rs/fastsim-core/0.1.6/fastsim_core/vehicle/struct.RustVehicle.html). The second type of file is the T3CO file, or [Scenario File](https://github.com/NREL/T3CO-private/blob/61aff5700c16ff54d69aa2c238f63553ec31f1da/docs/scenario_inputs_descriptions.md), which specifies the operating conditions that make up the TCO calculation for the vehicle. These are conditions such as $ per kilowatt for engine or motor size, operating years, operating regions, whether to optimize the vehicle or not, range, grade and acceleration performance targets, etc. The third file is the [Config File](https://github.com/NREL/T3CO-private/blob/61aff5700c16ff54d69aa2c238f63553ec31f1da/docs/config_inputs_descriptions.md), which provides an easier way to manage analyses with minimal command line inputs, containing overrides for major scenario input parameters.

T3CO provides some readily available Vehicle and Scenario models to run. There are demo versions of the [Vehicle file](https://github.com/NREL/T3CO-private/blob/264a730de942671eb2345a5afca7e1afd6d67666/t3co/resources/inputs/demo/Demo_FY22_vehicle_model_assumptions.csv), [Scenario file](https://github.com/NREL/T3CO-private/blob/264a730de942671eb2345a5afca7e1afd6d67666/t3co/resources/inputs/demo/Demo_FY22_scenario_assumptions.csv), and the [Config file](https://github.com/NREL/T3CO-private/blob/264a730de942671eb2345a5afca7e1afd6d67666/t3co/resources/T3COConfig.csv) available in the `/t3co/resources/` folder.

## Optimization Flow <a name="Optimization_Flow"></a>
## Optimization Flow <a name="optimization-flow"></a>

The **TCO & Performance** metrics described above are the core of the [optimization loop](https://github.com/NREL/T3CO-private/blob/7b56eb37bf5a57e6cd0ce761fc1708ee151c956f/docs/models/optimization.md). T3CO has the capability to take vehicle specifications, such as engine size, motor size, battery size, area of drag, vehicle weight, etc. and modify them in order to find the set of specifications that yields the lowest TCO while still meeting minimum performance requirements in acceleration, grade and range.

Optimization is handled in the [optimization module](https://github.com/NREL/T3CO-private/blob/74a494bc783c1d0d5794d605584e9843b3a4cb2d/t3co/moopack/moo.py#L80), inheriting from the PyMoo module.

## Performance Constraints <a name="Performance_Constraints"></a>
## Performance Constraints <a name="performance-constraints"></a>

- [Gradability](https://github.com/NREL/T3CO-private/blob/7b56eb37bf5a57e6cd0ce761fc1708ee151c956f/docs/models/acceleration_and_grade_tests.mdd) is the measure of the vehicle's max speed achieved at 1.25 and 6 percent grades, while the vehicle is operating at max allowable weight (including EV weight credit kilograms)
- [Acceleration](https://github.com/NREL/T3CO-private/blob/7b56eb37bf5a57e6cd0ce761fc1708ee151c956f/docs/models/acceleration_and_grade_tests.md) is the measure of the seconds the vehicle takes to reach 30 miles per hour and 60 miles per hour, which can be at max allowable weight or just current vehicle weight.
Expand Down
Loading

0 comments on commit f133e9c

Please sign in to comment.