Skip to content

Commit 5914e80

Browse files
committed
trying mermaid
1 parent 119ac93 commit 5914e80

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

src/__init__.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,46 @@
1414
- InputLoader: Loads generator data from user input or a CSV file.
1515
- ELDCalculator: Performs the ELD calculation using the lambda iteration method.
1616
- Main: The main script to run the ELD calculation and display results.
17+
18+
19+
```mermaid
20+
classDiagram
21+
class Generator {
22+
+gen_id: str
23+
+min_capacity: float
24+
+max_capacity: float
25+
+a: float
26+
+b: float
27+
+c: float
28+
+calculate_cost(power: float) -> float
29+
+validate_power(power: float) -> float
30+
}
31+
32+
class InputLoader {
33+
+generators: List[Generator]
34+
+load_data_from_user() -> None
35+
+load_data_from_file(file_path: str) -> None
36+
+get_generators() -> List[Generator]
37+
+display_generators() -> pd.DataFrame
38+
}
39+
40+
class ELDCalculator {
41+
+gen_lambda: float
42+
+gen_array: List[Generator]
43+
+num_generators: int
44+
+tot_demand: float
45+
+tolerance: float
46+
+max_iterations: int
47+
+lambda_iteration() -> Tuple[List[float], float, int]
48+
}
49+
50+
class Main {
51+
+main() -> None
52+
}
53+
54+
Relationships:
55+
InputLoader "1" -- "many" Generator : contains
56+
ELDCalculator "1" -- "many" Generator : uses
57+
Main "1" -- "1" InputLoader : uses
58+
Main "1" -- "1" ELDCalculator : uses
1759
"""

0 commit comments

Comments
 (0)