diff --git a/CHANGELOG.md b/CHANGELOG.md index 63ac244..731187e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,18 @@ Changelog ========= +v0.1.3 (2023-08-05) +------------------- + +* Remove unused imports +* Use 8760 values for `cluster.modulation` instead of 24. + v0.1.2 (2023-08-02) ------------------- * Add `py.typed` file to avoid mypy issue in projects importing the code * Fix little typo inside `README.md` file. - v0.1.1 (2023-08-02) ------------------- diff --git a/pyproject.toml b/pyproject.toml index 3986756..2f7a501 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "antares-timeseries-generation" -version = "0.1.2" +version = "0.1.3" license = {text="MPL-2.0"} description = 'Timeseries generation library aiming at creating input data for Antares simulator studies.' readme = "README.md" diff --git a/sonar-project.properties b/sonar-project.properties index 9f6ca12..6b64429 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,4 @@ -sonar.projectVersion=0.1.2 +sonar.projectVersion=0.1.3 sonar.organization=antaressimulatorteam sonar.projectKey=AntaresSimulatorTeam_antares-timeseries-generation sonar.sources=src diff --git a/src/antares/tsgen/random_generator.py b/src/antares/tsgen/random_generator.py index b705ed0..9bd3416 100644 --- a/src/antares/tsgen/random_generator.py +++ b/src/antares/tsgen/random_generator.py @@ -21,7 +21,8 @@ class RNG(ABC): """ @abstractmethod - def next(self) -> float: ... + def next(self) -> float: + ... class PythonRNG(ABC): diff --git a/src/antares/tsgen/ts_generator.py b/src/antares/tsgen/ts_generator.py index a78de97..05f8942 100644 --- a/src/antares/tsgen/ts_generator.py +++ b/src/antares/tsgen/ts_generator.py @@ -307,9 +307,9 @@ def generate_time_series( for day in range(self.days): # = return of units wich were in outage = current_planned_outages -= logp[now] - logp[now] = ( - 0 # set to 0 because this cell will be use again later (in self.log_size days) - ) + logp[ + now + ] = 0 # set to 0 because this cell will be use again later (in self.log_size days) current_available_units += log[now] log[now] = 0 @@ -419,6 +419,8 @@ def generate_time_series( now = (now + 1) % log_size hourly_available_units = _daily_to_hourly(output.available_units) - output.available_power = hourly_available_units * cluster.nominal_power * cluster.modulation + output.available_power = ( + hourly_available_units * cluster.nominal_power * cluster.modulation + ) return output