Skip to content

Commit

Permalink
projects folder template
Browse files Browse the repository at this point in the history
  • Loading branch information
SongminYu committed Feb 20, 2024
1 parent fb88a6d commit 8b08355
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 119 deletions.
109 changes: 0 additions & 109 deletions projects/analysis/calculator.py

This file was deleted.

2 changes: 2 additions & 0 deletions projects/analysis/plotter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

# This file holds the plotting functions for the projects
2 changes: 2 additions & 0 deletions projects/analysis/processor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

# This file holds the functions for processing results of the projects
15 changes: 5 additions & 10 deletions projects/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import os
import random

from models.operation.main import run_operation_model
from models.operation.main import run_operation_model_parallel
from plotters.operation import household_load_balance
from utils.config import Config
from utils.db import init_project_db
from projects.analysis import calculator as calc


def get_config(project_name: str):
Expand All @@ -17,18 +15,15 @@ def get_config(project_name: str):

def run_flex_operation_model(config: "Config"):
init_project_db(config)
# run_operation_model(config=config, save_hour=True, scenario_ids=[1])
run_operation_model_parallel(config=config, task_num=8, save_hour=True)
run_operation_model(config=config, save_hour=True, scenario_ids=[1])


def run_flex_operation_plotter(config: "Config"):
household_load_balance(config, scenario_ids=random.sample(range(1, 4375), 100))
household_load_balance(config, scenario_ids=[1])


if __name__ == "__main__":

cfg = get_config("DEU_2020")
cfg = get_config("PROJECT_FOLDER_NAME")
run_flex_operation_model(cfg)
# run_flex_operation_plotter(cfg)
calc.merge_scenario(cfg)
calc.calc_electricity_profiles(cfg)
run_flex_operation_plotter(cfg)

0 comments on commit 8b08355

Please sign in to comment.