Skip to content

Commit

Permalink
Various improvements (#4)
Browse files Browse the repository at this point in the history
 - Adding some tests
 - Using numpy arrays in some places instead of python lists
 - Add an abstraction for duration generators
 - Add an output structure
 - Add Mersenne-Twister algo for RNG
 - Update pyproject

Main author: ChouaneLouis <[email protected]>
Co-authored-by: ChouaneLouis <[email protected]>
Co-authored-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl authored Jul 27, 2024
1 parent 6b5cf67 commit 0beb82d
Show file tree
Hide file tree
Showing 20 changed files with 535 additions and 182 deletions.
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[project]
name = "antares-timeseries-generation"
version = "0.0.1"
license = {text="MPL-2.0"}
dependencies = [ "numpy", "pandas", "PyYAML" ]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)"
]
9 changes: 6 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
pytest~=7.0.0
mypy~=1.7.1
black~=23.7.0
isort~=5.12.0
pytest-cov
matplotlib>=3.5.1
mypy~=1.7.1
pandas-stubs
pytest-cov
pytest~=7.0.0
types-PyYAML
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
numpy==1.24.4
matplotlib==3.5.1
pandas
PyYAML
48 changes: 48 additions & 0 deletions src/cluster_parsing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

from pathlib import Path
from typing import Iterable, Optional, TextIO, Tuple

import pandas as pd
from pydantic import BaseModel, Field
from yaml import safe_load


def _to_kebab(snake: str) -> str:
return snake.replace("_", "-")


class InputCluster(BaseModel):
unit_count: int
nominal_power: float
fo_law: str
fo_volatility: float
po_law: str
po_volatility: float

class Config:
alias_generator = _to_kebab
extra = "forbid"


def parse_yaml_cluster(input_cluster: TextIO) -> InputCluster:
tree = safe_load(input_cluster)
return InputCluster.model_validate(tree["cluster"])


def parse_cluster_ts(
file: Path, shape: Optional[Tuple[int, int]] = None
) -> pd.core.frame.DataFrame:
ts = pd.read_csv(file)
assert shape is None or ts.shape == shape
return ts
39 changes: 39 additions & 0 deletions src/cluster_resolve.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.

import pandas as pd

from cluster_parsing import InputCluster
from ts_generator import ProbilityLaw, ThermalCluster


def resolve_thermal_cluster(
parsed_yaml: InputCluster,
parameters_ts: pd.core.frame.DataFrame,
modulation: pd.core.frame.DataFrame,
) -> ThermalCluster:
law_dict = {"UNIFORM": ProbilityLaw.UNIFORM, "GEOMETRIC": ProbilityLaw.GEOMETRIC}
return ThermalCluster(
unit_count=parsed_yaml.unit_count,
nominal_power=parsed_yaml.nominal_power,
modulation=modulation["modulation"].to_list(),
fo_law=law_dict[parsed_yaml.fo_law],
fo_volatility=parsed_yaml.fo_volatility,
po_law=law_dict[parsed_yaml.po_law],
po_volatility=parsed_yaml.po_volatility,
fo_duration=parameters_ts["FOD"].to_list(),
fo_rate=parameters_ts["FOR"].to_list(),
po_duration=parameters_ts["POD"].to_list(),
po_rate=parameters_ts["POR"].to_list(),
npo_min=parameters_ts["POMax"].to_list(),
npo_max=parameters_ts["POMin"].to_list(),
)
42 changes: 42 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.
import argparse
from pathlib import Path
from typing import List, Optional


def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument(
"--study", type=Path, help="path to the root directory of the study"
)
parser.add_argument(
"--models", nargs="+", type=Path, help="list of path to model file, *.yml"
)
parser.add_argument(
"--component", type=Path, help="path to the component file, *.yml"
)
parser.add_argument(
"--timeseries", type=Path, help="path to the timeseries directory"
)
parser.add_argument(
"--duration", type=int, help="duration of the simulation", default=1
)
parser.add_argument(
"--scenario", type=int, help="number of scenario of the simulation", default=1
)

args = parser.parse_args()


if __name__ == "__main__":
main()
92 changes: 92 additions & 0 deletions src/mersenne_twister.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. The names of its contributors may not be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from typing import List, Tuple


class MersenneTwister:
periodN: int = 624
periodM: int = 397
MATRIX_A: int = 0x9908B0DF
UPPER_MASK: int = 0x80000000
LOWER_MASK: int = 0x7FFFFFFF

MAG: Tuple[int, int] = (0, MATRIX_A)

mt: List[int] = [0] * periodN

mti: int = 0

@classmethod
def seed(self, seed: int) -> None:
self.mt[0] = seed & 0xFFFFFFFF
for i in range(1, self.periodN):
self.mt[i] = 1812433253 * (self.mt[i - 1] ^ (self.mt[i - 1] >> 30)) + i
self.mt[i] &= 0xFFFFFFFF # to be under 32 bits

self.mti = self.periodN

@classmethod
def next(self) -> float:
if self.mti == self.periodN:
for j in range(self.periodN - self.periodM):
y = (self.mt[j] & self.UPPER_MASK) | (self.mt[j + 1] & self.LOWER_MASK)
self.mt[j] = self.mt[j + self.periodM] ^ (y >> 1) ^ self.MAG[y & 1]

for j in range(self.periodN - self.periodM, self.periodN - 1):
y = (self.mt[j] & self.UPPER_MASK) | (self.mt[j + 1] & self.LOWER_MASK)
self.mt[j] = (
self.mt[j + self.periodM - self.periodN]
^ (y >> 1)
^ self.MAG[y & 1]
)

y = (self.mt[self.periodN - 1] & self.UPPER_MASK) | (
self.mt[0] & self.LOWER_MASK
)
self.mt[self.periodN - 1] = (
self.mt[self.periodM - 1] ^ (y >> 1) ^ self.MAG[y & 1]
)

self.mti = 0

y = self.mt[self.mti]
self.mti += 1

y ^= y >> 11
y ^= (y << 7) & 0x9D2C5680
y ^= (y << 15) & 0xEFC60000
y ^= y >> 18

return y / 4294967295

@classmethod
def reset(self) -> None:
self.seed(5489)
16 changes: 9 additions & 7 deletions src/ts_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@
from typing import Any, List, Optional, Tuple

import numpy as np
from numpy.typing import ArrayLike

from mersenne_twister import MersenneTwister

# probabilities above FAILURE_RATE_EQ_1 are considered certain (equal to 1)
FAILURE_RATE_EQ_1 = 0.999


class rndgenerator:
class PythonGenerator:
@classmethod
def next(self) -> float:
return random()


rndgenerator = MersenneTwister
rndgenerator.seed(1)


class ProbilityLaw(Enum):
UNIFORM = "UNIFORM"
GEOMETRIC = "GEOMETRIC"
Expand Down Expand Up @@ -80,7 +87,7 @@ def generate_duration(self, day: int) -> int:
generation of random outage duration
"""
rnd_nb = rndgenerator.next()
return min(int(1 + self.a[day] + self.b[day] * log(rnd_nb)), 1999) ## to change
return min(int(1 + self.a[day] + self.b[day] * log(rnd_nb)), 1999)


@dataclass
Expand Down Expand Up @@ -127,7 +134,6 @@ class ThermalDataGenerator:
def __init__(self, days_per_year: int = 365) -> None:
self.days_per_year = days_per_year

## explain that ??
self.log_size = 4000 # >= 5 * (max(df) + max(dp))
# the number of starting (if positive)/ stopping (if negative) units (due to FO and PO) at a given time
self.LOG = [0] * self.log_size
Expand Down Expand Up @@ -242,10 +248,6 @@ def generate_time_series(
hour = 0

for day in range(self.days_per_year):
if cur_nb_AU > 100: ## it was like that in c++, i'm not shure why
# maybe it's for the pow (FPOW, PPOW) calculation, if so it might not be the right place to do
raise ValueError("avalaible unit number out of bound (> 100)")

# = return of units wich were in outage =
cur_nb_PO -= self.LOGP[now]
self.LOGP[
Expand Down
7 changes: 7 additions & 0 deletions tests/data/cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cluster:
unit-count : 1
nominal-power : 500
fo-law : UNIFORM
fo-volatility : 0
po-law : UNIFORM
po-volatility : 0
14 changes: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21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.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7,7,7,7,7,7,7,7
25 changes: 25 additions & 0 deletions tests/data/modulation.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
modulation
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
11 changes: 11 additions & 0 deletions tests/data/ts_param.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
POR,POD,FOR,FOD,POMax,POMin
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
0.1,1,0.2,2,0,1
Loading

0 comments on commit 0beb82d

Please sign in to comment.