TCO Calculations module¶
t3co.tco.tcocalc
¶
calculate_dollar_cost(veh: fastsim.vehicle.Vehicle, scenario: run_scenario.Scenario) -> dict
¶
This helper method calculates the MSRP breakdown dictionary from - Glider - Fuel converter - Fuel Storage - Motor & power electronics - Plug - Battery - Battery replacement - Purchase tax
Parameters:
Name | Type | Description | Default |
---|---|---|---|
veh
|
fastsim.vehicle.Vehicle
|
FASTSim vehicle object of analysis vehicle |
required |
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
Returns:
Name | Type | Description |
---|---|---|
cost_set |
dict
|
Dictionary containing MSRP breakdown |
Source code in t3co/tco/tcocalc.py
Python | |
---|---|
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
|
calculate_opp_costs(vehicle: fastsim.vehicle.Vehicle, scenario: run_scenario.Scenario, range_dict: dict) -> dict
¶
This helper method calculates opportunity costs and generates veh_opp_cost_set from - Payload Lost Capacity Cost/Multiplier - Fueling Downtime - Maintenance and Repair Downtime
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle
|
fastsim.vehicle.Vehicle
|
FASTSim vehicle object of analysis vehicle |
required |
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
range_dict
|
dict
|
Dictionary containing range values from fueleconomy.get_range_mi() |
required |
Returns:
Name | Type | Description |
---|---|---|
veh_opp_cost_set |
dict
|
Dictionary containing opportunity cost results |
Source code in t3co/tco/tcocalc.py
fill_annual_tsv(scenario: run_scenario.Scenario) -> pd.DataFrame
¶
This helper method generates a dataframe of annual vehicle miles traveled (vmt) - Annual Travel [mi/yr]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing Annual Travel [mi/yr] |
Source code in t3co/tco/tcocalc.py
fill_downtimelabor_cost_tsv(scenario: run_scenario.Scenario, oppy_cost_set: dict) -> pd.DataFrame
¶
This helper method generates a dataframe containing fueling downtime and M&R downtime costs in Cost [$/Yr]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
oppy_cost_set
|
dict
|
Dictionary containing fueling_downtime_oppy_cost_dol_per_yr,fueling_dwell_labor_cost_dol_per_yr and mr_downtime_oppy_cost_dol_per_yr |
required |
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing fueling and MR downtime costs in Cost [$/Yr] |
Source code in t3co/tco/tcocalc.py
fill_fuel_eff_file(vehicle: fastsim.vehicle.Vehicle, scenario: run_scenario.Scenario, mpgge_dict: dict) -> pd.DataFrame
¶
This helper method generates a dataframe of Fuel Efficiency [mi/gge] For PHEV, cd_grid_electric_mpgge, cd_fuel_mpgge, and cs_fuel_mpgge For BEV, grid_mpgge For HEV and CONV, mpgge
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle
|
fastsim.vehicle.Vehicle
|
FASTSim vehicle object of analysis vehicle |
required |
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
mpgge_dict
|
dict
|
MPGGE dictionary from fueleconomy.get_mpgge() |
required |
Returns:
Name | Type | Description |
---|---|---|
fefdata |
pd.DataFrame
|
Dictionary containing Fuel Efficiency [mi/gge] |
Source code in t3co/tco/tcocalc.py
Python | |
---|---|
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
|
fill_fuel_expense_tsv(vehicle: fastsim.vehicle.Vehicle, scenario: run_scenario.Scenario) -> pd.DataFrame
¶
This helper method generates a dataframe of fuel operating costs in Cost [$/gge]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle
|
fastsim.vehicle.Vehicle
|
FASTSim vehicle object of analysis vehicle |
required |
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
Raises:
Type | Description |
---|---|
Exception
|
Invalid fuel_type type |
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing fuel operating costs in Cost [$/gge] |
Source code in t3co/tco/tcocalc.py
Python | |
---|---|
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 |
|
fill_fuel_split_tsv(vehicle: fastsim.vehicle.Vehicle, scenario: run_scenario.Scenario, mpgge: dict) -> pd.DataFrame
¶
This helper method generates a dataframe of fraction of travel in each fuel type as Fraction of Travel [mi/mi]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle
|
fastsim.vehicle.Vehicle
|
FASTSim vehicle object of analysis vehicle |
required |
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
mpgge
|
dict
|
MPGGE dictionary from fueleconomy.get_mpgge() |
required |
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing fraction of travel in each fuel type as Fraction of Travel [mi/mi] |
Source code in t3co/tco/tcocalc.py
fill_insurance_tsv(scenario: run_scenario.Scenario, veh_cost_set: dict) -> pd.DataFrame
¶
This helper method generates a dataframe containing vehicle insurance costs as Cost [$/Yr]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
veh_cost_set
|
dict
|
Dictionary containing MSRP costs |
required |
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing insurance costs in Cost [$/Yr] |
Source code in t3co/tco/tcocalc.py
fill_market_share_tsv(scenario: run_scenario.Scenario, num_vs: int = 1) -> pd.DataFrame
¶
This helper method generates a dataframe containing market share of current vehicle selection per vehicle sold
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
num_vs
|
int
|
Number of vehicles. Defaults to 1. |
1
|
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing market share of current vehicle in Market Share [veh/veh] |
Source code in t3co/tco/tcocalc.py
fill_reg_sales_tsv(scenario: run_scenario.Scenario, num_vs: int = 1) -> pd.DataFrame
¶
This helper method generates a dataframe containing vehicle sales per year - Sales [veh]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
num_vs
|
int
|
Number of vehicles. Defaults to 1. |
1
|
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing vehicle sales in Sales [veh] |
Source code in t3co/tco/tcocalc.py
fill_residual_cost_tsc(vehicle: fastsim.vehicle.Vehicle, scenario: run_scenario.Scenario, veh_cost_set: dict) -> pd.DataFrame
¶
This helper method generates a dataframe of residual costs as Cost [$/Yr]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle
|
fastsim.vehicle.Vehicle
|
FASTSim vehicle object of analysis vehicle |
required |
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
veh_cost_set
|
dict
|
Dictionary containing MSRP costs |
required |
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing vehicle residual costs as Cost [$/Yr] |
Source code in t3co/tco/tcocalc.py
fill_survival_tsv(scenario: run_scenario.Scenario, num_vs=1) -> pd.DataFrame
¶
This helper method generates a dataframe containing surviving vehicles as Surviving Vehicles [veh/veh]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
num_vs
|
int
|
Number of vehicles. Defaults to 1. |
1
|
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing number of surviving vehicles on road in Surviving Vehicles [veh/veh] |
Source code in t3co/tco/tcocalc.py
fill_trav_exp_tsv(vehicle: fastsim.vehicle.Vehicle, scenario: run_scenario.Scenario) -> pd.DataFrame
¶
This helper method generates a dataframe containing maintenance costs in Cost [$/mi]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle
|
fastsim.vehicle.Vehicle
|
FASTSim vehicle object of analysis vehicle |
required |
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
Returns:
Name | Type | Description |
---|---|---|
df |
pd.DataFrame
|
Dataframe containing maintenance costs in Cost [$/mi] |
Source code in t3co/tco/tcocalc.py
fill_veh_expense_file(scenario: run_scenario.Scenario, cost_set: dict) -> pd.DataFrame
¶
This helper method generates a dataframe of MSRP breakdown costs as Cost [$/veh]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
cost_set
|
dict
|
Dictionary containing MSRP breakdown cost components |
required |
Returns:
Name | Type | Description |
---|---|---|
vexpdf |
pd.DataFrame
|
Dataframe containing MSRP components costs as Cost [$/veh] |
Source code in t3co/tco/tcocalc.py
find_residual_rates(vehicle: fastsim.vehicle.Vehicle, scenario: run_scenario.Scenario) -> float
¶
This helper method gets the residual rates from ResidualValues.csv
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle
|
fastsim.vehicle.Vehicle
|
FASTSim vehicle object of analysis vehicle |
required |
scenario
|
run_scenario.Scenario
|
Scenario object of current selection |
required |
Returns:
Name | Type | Description |
---|---|---|
residual_rates |
float
|
Residual rate as percentage of MSRP |