Skip to content

Commit

Permalink
Merge pull request #140 from RAMP-project/review/paper-figure-code
Browse files Browse the repository at this point in the history
Code to reproduce JOSS figure
  • Loading branch information
Bachibouzouk authored May 15, 2024
2 parents ef010ae + 2e868f9 commit fbf77bd
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 6 deletions.
151 changes: 151 additions & 0 deletions docs/notebooks/example_figure_joss.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/notebooks/plot_class.ipynb

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions ramp/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ def initialize(
# format datetimeindex in minutes
self.__datetimeindex = pd.date_range(
start=self.days[0],
end=self.days[-1] + pd.Timedelta(1, "d") - pd.Timedelta(1, "T"),
freq="T",
end=self.days[-1] + pd.Timedelta(1, "d") - pd.Timedelta(1, "min"),
freq="min",
)

@property
Expand Down Expand Up @@ -1399,10 +1399,14 @@ def windows(
) # same as above for window3

self.random_var_1 = int(
random_var_w * np.diff(self.window_1)
random_var_w * np.diff(self.window_1)[0]
) # calculate the random variability of window1, i.e. the maximum range of time they can be enlarged or shortened
self.random_var_2 = int(random_var_w * np.diff(self.window_2)) # same as above
self.random_var_3 = int(random_var_w * np.diff(self.window_3)) # same as above
self.random_var_2 = int(
random_var_w * np.diff(self.window_2)[0]
) # same as above
self.random_var_3 = int(
random_var_w * np.diff(self.window_3)[0]
) # same as above

# automatically appends the appliance to the user's appliance list
self.user._add_appliance_instance(self)
Expand Down

0 comments on commit fbf77bd

Please sign in to comment.