GithubHelp home page GithubHelp logo

romainsacchi / carculator Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 14.0 132.64 MB

Prospective environmental and economic life cycle assessment of vehicles made blazing fast.

Home Page: http://carculator.psi.ch

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

carculator's Issues

Return type hint in EnergyConsumptionModel.motive_energy_per_km breaks python < 3.9

Current

Tests with python 3.7 and 3.8 don't pass because of:

...
../../../../miniconda3/envs/premise-dev/lib/python3.8/site-packages/carculator/energy_consumption.py:135: in EnergyConsumptionModel
) -> tuple[Union[float, Any], Any, Union[float, Any]]:
E   TypeError: 'type' object is not subscriptable
/opt/conda/envs/py37/lib/python3.7/site-packages/carculator/energy_consumption.py:135: in EnergyConsumptionModel
) -> tuple[Union[float, Any], Any, Union[float, Any]]:
E   TypeError: 'type' object is not subscriptable

Expected

The readme of the repo says carculator is compatible with python 3.7 and onwards. If this is still the case, a fix for this bug is necessary.

Double defined parameters

86 parameters are defined twice in the file "default_parameters.json"

For example: ('Large', 'BEV', 'lightweighting', 2000) is defined here:

"355-2000-lightweighting": {

and here:

"1035-2000-lightweighting": {

The double-defined parameters cause the following problem in carculator 1.9.0.dev1 with carculator_utils 1.2.0.dev6:
Error

I have attached a file with all double defined parameters. Do you have a convenient way to remove the double defined parameters or is it necessary to remove them manually.
Double defined paramters.txt

Override calculated parameters caused ValueError

Hi Romain,
While I played with the custom parameters, I encountered such error as shown below:

Bildschirmfoto 2021-02-04 um 10 04 09 AM

I tried to fix it by restarting terminal and it works but again when after I restart notebook, the error comes again.

It seems that I cannot override the parameters in array (6,1) as they do not match the other elements.
Any lead or tip would be appreciated. Sorry if the question is not relevant and technical.

Best regards,
Rena

[webtool feature idea] Grouping midpoint indicator graphs by year/car type/

An idea while exploring the graphs of the midpoint indicators in the webtool: it might be handy to be able to (maybe hiërarchically?) group the presented graph by either year, car size or car type, for easier comparison over time for a specific group/year/car size.

Is it possible to go through / contribute to the webtool graphs? I could not find (yet) a reference in the domentation or in this repository, but if it is possible, I might be interested to look at it. I have some experience with R, Javascript, Dash/Plotly and Highcharts, if any of those (or something similar) has been used.

Thanks again for your work!

tank-to-wheel E consumption ICEV-p's

Hey,

I'm (starting to) exploring your rrreally cool LCA-modelling project (congratulations and thank you for developing this, this is what everybody needs!).

I don't know if this is the right place to ask these types of questions (I also tried on Twitter, but I have the impression that that medium is not the most frequently visited ;)), but:

On page 21 of your preprint, you mention that the tank-to-wheel E consumption of petrol fuelled ICEVs might decrease with 48 % by 2050 (180 gCO2/km -> 91 gCO2/km) due to decrease in curb mass (-8.5 %) and increase in powertrain and engine efficiency (+50%). I'm not sufficiently qualified in ICE combustion engine technology, but I was wondering on which paper/database/forecast this projection is based on (especially the powertrain/engine efficiency evolution) ? Intuitively, I would expect a rather constant engine efficiency, considering decades of ICE development. Or am I too naive and are carmakers only now starting to consider the fuel efficiency of their cars? :p

If you have time, I would be happy to get to know a bit more about this assumption, as I am intrigued by the forecast (at least for some countries) that in the long term ICEVs emission intensity might converge with those from BEV (as indicated in Figure 9 on p. 22 of the preprint):

Screenshot 2021-06-04 at 23 10 23

Need for improving values filling in xarray

99.7% of the time consumed by fill_xarray_from_input_parameters is spent on:

for param in cip:
    for size in cip.metadata[param]["sizes"]:
        for powertrain in cip.metadata[param]["powertrain"]:
            array[
                size_dict[size],
                powertrain_dict[powertrain],
                parameter_dict[cip.metadata[param]["name"]],
                year_dict[cip.metadata[param]["year"]],
                :,
            ] = cip.values[param]

ValueError: unsupported pickle protocol: 5

@romainsacchi
Good day Mr. Sacchi,
after installing the new version of carculator (1.8), unfortunately I get the value error "unsupported pickle protocol: 5" directly right after import carculator command.

The package from conda install -c romainsacchi carculator looks like has some version control problem, then I decided to install the package from PyPi but looks like the problem is still there.

I would appreciate any help regarding this issue

quick results for Belgium seem way off for EVs

Hello

Impressive tool which can really be helpful!
I didn't do a dive in the data or code, but the quick results for Belgium (new cars), give only a 20% advantages for EVs compared to Diesel:
https://carculator.psi.ch/display_quick_results/BE

image

This would contradict other recent estimates like:
https://www.transportenvironment.org/what-we-do/electric-cars/how-clean-are-electric-cars
image

or:
https://www.carbonbrief.org/factcheck-how-electric-vehicles-help-to-tackle-climate-change

and also this tool:

https://climobil.connecting-project.lu/
image

remove pytest from dependencies

Current

Installing carculator with pip requires "pytest"

Expected

Installing carculator doesn't bring a testing dependency

Importing carculator database to Activity Browser

Hi there,

Currently, I am trying to import a Carculator excel file into Activity Browser (which runs on Brightway 2). However, when I try to import the excel file as a database, the whole AB environment shuts down. It might be that it's due to missing biosphere flows? @marc-vdm mentioned I could perhaps post the issue here. The reason I am trying to import the file is to get a relevant database to perform an LCA on EV technologies, as evoinvent does not include all EV related data.

What I did:

  • I picked the advanced configurator on the Carculator website.
  • I made two comparisons between electric and petrol vehicle for a 2022 and 2030 scenario.
  • I calculated the results and exported the inventory database to an excel file (and did not modify the file).
  • Then, I tried importing the file to the AB environment, however, then it shuts down and does not import the excel file.

A link to the excel file that I am trying to import to AB:
carculator_inventory_2022-04-13_for_ei_3.8_brightway2.xlsx

Do you know what I can do to fix this?

Thanks in advance!

Better definition of annual mileage per year of age

Currently, it is assumed that the annual mileage is constant through time.
This assumption is quite important as it influences the lifetime-weighted electricity mix used to charge batteries or produce hydrogen.
But we know from data (for example here) that the annual mileage goes up after the first year of use, culminates between year 2 and 8 and slightly fades until the vehicle disposal.

It would be much better to adopt such distribution.

Waste treatment for glider and engine

All activities "Car, …" (e.g., Car, diesel, Large, 2030, Euro-7) include “treatment of used glider” and “treatment of used internal combustion engine”. However, this waste treatment is already included in “glider production, passenger car” and in “internal combustion engine production, passenger car”. I would suggest to remove it from the activity "Car, …".
To be precise, you could consider "treatment of waste plastic" for the fuel tank and you could considered the reduced demand of “treatment of used glider” due to glider lightweighting directly in the activity "glider lightweighting".

Glider base masses

I was wondering if it wouldn't make sense to consider equal glider base masses for all powertrains because all powertrain specific masses are considered separately.

In particular, I was wondering about the following weights:

  • Large vehicle: PHEV-e weights 1650 kg all others 1550 kg
  • Mini vehicle: PHEV-e weights 810 kg all others 700 kg
  • Medium SUV: BEV and PHEV-e weight 1400 kg all others 1200 kg.
Weights

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.