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

Add charging strategies #21

Open
Omar-Usmani opened this issue Jul 8, 2024 · 3 comments
Open

Add charging strategies #21

Omar-Usmani opened this issue Jul 8, 2024 · 3 comments
Assignees

Comments

@Omar-Usmani
Copy link
Collaborator

Basic, adaptive, price (?), preference (?)

@Omar-Usmani Omar-Usmani self-assigned this Jul 8, 2024
@Omar-Usmani
Copy link
Collaborator Author

Do it via a modulation function
Read that value at each step
Then
Drawn power = modulation * available power

Modulation function
max_
available_power
comes from trip (in define) and run mobility matrix

time_modulation: pd.Dataframe = pd.DataFrame(
index=HOURS_IN_A_DAY, columns=scenario.Locations)
for location_name in scenario.Locations:
time_modulation[location_name] =
scenario.Locations.location_name.time_modulation

def modulation(time_tag: datetime.datetime, location_name: str, available_power: pd.DataFrame, scenario: Box, time_modulation: of.DataFrame, location_price_factor: tu.Dict[str, float], location_desirability: tu.Dict[str, float]) -> float:

modulation: float = 1
strategies: Box = scenario.charging.strategies

modulation *= time_modution.loc[time_tag.hour][location_name]

if strategies.adaptive:
    next_day_start_time_tag: datetime.datetime = xxxx
    power_for_rest_of_day: float = available_power.loc[time_tag:
                                                              next_day_start_time_tag].sum()
    modulation *= available_power.loc[time_tag] 
        / power_for_rest_of_day
  
 if strategies.price:
     modulation *= location_price_factor[location_name]       

 if strategies.desirability:
      modulation *= location_deisrability_factor[location_name]   


 return modulation                                  

@Omar-Usmani
Copy link
Collaborator Author

Possibly add scales such as seasons for time modulation

@Omar-Usmani
Copy link
Collaborator Author

Add adaptive (either at location or at all remaining locations)
Time at location (parked) for adaptive at location and cumulative power

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

No branches or pull requests

1 participant