Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Oct 25, 2021
2 parents 3c502ed + 1176f80 commit 2c709ac
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion carculator_truck/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import numpy as np
import xarray as xr
from scipy import sparse
from pypardiso import spsolve
from scipy import sparse

from . import DATA_DIR
from .background_systems import BackgroundSystemModel
Expand Down
16 changes: 12 additions & 4 deletions carculator_truck/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def __init__(
if s in self.array.coords["size"].values
],
)
] *= (1 - 0.67)
] *= (
1 - 0.67
)

if any(
s in self.array.coords["size"].values for s in ["32t", "40t", "60t"]
Expand All @@ -148,7 +150,9 @@ def __init__(
if s in self.array.coords["size"].values
],
)
] *= (1 - 0.33)
] *= (
1 - 0.33
)

if self.cycle == "Urban delivery":
self.array.loc[dict(parameter="kilometers per year")] *= 1 - 0.39
Expand All @@ -166,7 +170,9 @@ def __init__(
if s in self.array.coords["size"].values
],
)
] *= (1 - 0.67)
] *= (
1 - 0.67
)

if any(
s in self.array.coords["size"].values for s in ["32t", "40t", "60t"]
Expand All @@ -180,7 +186,9 @@ def __init__(
if s in self.array.coords["size"].values
],
)
] *= (1 - 0.33)
] *= (
1 - 0.33
)

def __call__(self, key):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def package_files(directory):
"prettytable",
"wurst",
"pycountry",
"pypardiso"
"pypardiso",
],
url="https://github.com/romainsacchi/carculator_truck",
description="Prospective environmental and economic life cycle assessment"
Expand Down

0 comments on commit 2c709ac

Please sign in to comment.