Skip to content

189 resstock ev eda - #192

Draft
lmgittoes wants to merge 28 commits into
mainfrom
189-resstock-ev-eda
Draft

189 resstock ev eda#192
lmgittoes wants to merge 28 commits into
mainfrom
189-resstock-ev-eda

Conversation

@lmgittoes

Copy link
Copy Markdown
Collaborator

Added to ev_demand.py:

  • validating trip schedules (departures before arrivals, trips are at least 1 hr, trips are at least 1 hr apart)
  • tracking away from home vs. at home and available to charge for all 8760 hours
  • tracking SoC over all 8760 hours
  • summarize_nhts_match_catalog is used for tracking missing weekend / weekday profiles

Current assumptions:

  • vehicle batteries are discharged uniformly over trip duration
  • vehicles still go on trips even if battery is not sufficiently charged; cap battery charge at 0 and car returns home at originally assigned arrival hour with empty battery

lgittoes and others added 8 commits June 15, 2026 02:23
@lmgittoes lmgittoes linked an issue Jun 22, 2026 that may be closed by this pull request
@lmgittoes
lmgittoes requested a review from alxsmith June 22, 2026 18:05
@lmgittoes
lmgittoes marked this pull request as draft June 22, 2026 18:05
Comment thread utils/ev_demand.py Outdated
hours_base: pl.DataFrame,
*,
kwh_per_mile: float,
ev_adoption_rate: float,

@alxsmith alxsmith Jun 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really a float or is it a bool? I would expect it to be 0 or 1 if not i misunderstand this parameter

As a general comment please expand the docstrings of the functions you added to include arg definitions and what the function returns. here is a template. you dont always need the raises or example but args and returns are very helpful

def function_template(param1: int, param2: str = "default") -> bool:
    """A concise one-line summary of what the function does.

    A longer description explaining the behavior, logic, side effects,
    and any necessary architectural context for the function.

    Args:
        param1 (int): Description of the first parameter.
        param2 (str, optional): Description of the second parameter.
            Defaults to "default".

    Returns:
        bool: Description of the expected return value.

    Raises:
        ValueError: Description of when and why this error is raised.

    Examples:
        >>> function_template(10, "test")
        True
    """

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't incorporated who has been an assigned an EV yet into ev_demand.py (that all still lives in the notebook dev/ev_adoption.ipynb) so right now ev_adoption_rate just scales the amount of discharge. But yes that will move to a boolean 0 or 1 once I incorporate the EV assignments

Comment thread utils/ev_demand.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ResStock EV EDA

3 participants