Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dmuldrew/smart calculate charging #324

Conversation

dmuldrew
Copy link
Collaborator

Pull Request doc

Purpose

Moves the daily smart charging optimization into a function similar to the immediate charging. This will allow both strategies to share a common loop over days of year.

Adds a mermaid architecture diagram a goal for the refactor.

What the code is doing

  1. Use modular arithmetic to simplify adjusted load updates
  2. Move smart charging optimization into into function calculate_daily_smart_charging_trips

Testing

Automated testing

Time estimate

~15min

isond and others added 30 commits November 14, 2022 15:46
``` mermaid
graph TD
A[Vehicle Demand Interface Function] -->|choose vehicle type, vehicle range, model year, charging strategy| B(Load Data)
I --> |evaluate whether charging is available| C{calculate charging over \n given trip window}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe we are trying to roll into a new line by \n here but I don't see this deployed properly in the preview. Not sure what is the right way to do so in mermaid.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, this is what I see in the diagram:
image

daily_vmt_total,
kwh,
bev_vmt,
):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm still adding doc strings to this function and might remove a couple parameters

@dmuldrew dmuldrew marked this pull request as draft November 29, 2022 19:26
@dmuldrew
Copy link
Collaborator Author

dmuldrew commented Dec 2, 2022

Last commit makes implements the following changes:
#325
which breaks the existing integration tests.

The current ratio of total yearly BEV demand for immediate and smart charging is:
immediate_BEV_demand.sum()/smart_BEV_demand.sum() = 1170.520679

@dmuldrew
Copy link
Collaborator Author

dmuldrew commented Dec 2, 2022

Looks like there are definitely optimization failures in smart charging affecting the results:
Screen Shot 2022-12-02 at 3 10 36 PM

@rouille rouille force-pushed the transportation_electrification branch 2 times, most recently from bcc38ef to a80e79e Compare January 12, 2023 23:04
@rouille rouille force-pushed the transportation_electrification branch 2 times, most recently from 31ead30 to 24cde85 Compare January 20, 2023 08:05
@rouille rouille force-pushed the transportation_electrification branch 2 times, most recently from 20d6e17 to 3404d1c Compare February 1, 2023 23:36
@dmuldrew dmuldrew closed this Feb 16, 2023
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.

4 participants