# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# Scene Writer tests cases:
#     
#     -5 years, 365 days, hourly
#     -5 years, 365 days, 2-hourly
#     -5 years, 365 days, selectec hours
#     -20 years, 12 subperiods, 7 day-superiods
#     -20 years, 4 selected days, 2 selected hours
#     
#     

# %load_ext autoreload

# %autoreload 2

import ModelWriters.Scenes.SceneBuilder as SB

# Case 1: 5 years, 365 days, hourly

# +
s = SB.SceneBuilder(years = 5, growth_rate = 0.1, discount_rate = 0.05)

scenes = s.build_scenes()

scenes
# -

# Case 2: 5 years, 365 days, 2-hourly

# +
s = SB.SceneBuilder(years = 5, dt = 2.0, growth_rate = 0.1, discount_rate = 0.05)

scenes = s.build_scenes()

scenes
# -

# Case 3: 5 years, 365 days, selectec hours

s = SB.SceneBuilder(years = 5, dt = 5.0, selected_hours = [6.0, 12.0, 18.0, 20.0], growth_rate = 0.1, discount_rate = 0.05)
scenes = s.build_scenes()
scenes

scenes[40:60]

# Case 4: 20 years, 12 subperiods, 7 day-superiods

# + tags=[]
s = SB.SceneBuilder(years = 20, subperiods = 12, days_in_subperiods=7, subperiod_start=10, dt=24.0, growth_rate = 0.1, discount_rate = 0.05)
scenes = s.build_scenes()
scenes
# -

scenes[50:90]

# Case 5: 20 years, 4 selected days, 3 selected hours

s = SB.SceneBuilder(years = 20, selected_days = [81, 81+90, 81+180, 81+270], dd = 90, selected_hours = [0.0, 13.0], 
                    dt = 12, growth_rate = 0.1, discount_rate = 0.05)
scenes = s.build_scenes()
scenes

StarcoderdataJupyterScriptsDedupFiltered