dodanie 3 algorytmów fuzzy logic, P.S najważniejszy to nr.2#35
Open
OlciXs wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Dodaje trzy nowe warianty kontrolera RailHeatingController oparte o logikę rozmytą (Sugeno) do katalogu algorytmów benchmarku, aby można je było podmieniać w symulatorze (main_test.py) poprzez zmianę importu.
Changes:
- Dodanie FL1: wyjście „płynne” z obcięciem <10% → 0% oraz >90% → 100%.
- Dodanie FL2: wyjście binarne na podstawie progu 50% (najważniejszy wariant wg opisu PR).
- Dodanie FL3: wyjście binarne realizowane jako PWM w oknie 60 s z obcięciem <15 s → 0 oraz >45 s → 60 s.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| Benchmark/benchmark/Algorytmy/Fuzzy_Logic_1.py | Nowy kontroler fuzzy (ciągły), z obcięciami 0/100 w skrajnych zakresach. |
| Benchmark/benchmark/Algorytmy/Fuzzy_Logic_2.py | Nowy kontroler fuzzy z progowaniem wyniku do 0/100 przy 50%. |
| Benchmark/benchmark/Algorytmy/Fuzzy_Logic_3.py | Nowy kontroler fuzzy z generowaniem wyjścia PWM w cyklu 60 s. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2
to
+3
| def __init__(self, t_zadana=3.0, max_switches_per_day=12, **kwargs): | ||
| self.T_ZADANA = t_zadana |
Comment on lines
+38
to
+40
| # Progi odcięcia małych opadów | ||
| jest_snieg = snow > 0.0 | ||
| jest_deszcz = precip > 0.2 |
| jest_snieg = snow > 0.0 | ||
| jest_deszcz = precip > 0.2 | ||
|
|
||
| # 1. Nowe obliczenie mocy rozmytej wykonywane RAZ na początku każdego cyklu (co 60s) |
Comment on lines
+2
to
+3
| def __init__(self, t_zadana=3.0, max_switches_per_day=12, **kwargs): | ||
| self.T_ZADANA = t_zadana |
Comment on lines
+38
to
+40
| # Progi odcięcia małych opadów | ||
| jest_snieg = snow > 0.0 | ||
| jest_deszcz = precip > 0.2 |
| jest_snieg = snow > 0.0 | ||
| jest_deszcz = precip > 0.2 | ||
|
|
||
| # 1. Nowe obliczenie mocy rozmytej wykonywane RAZ na początku każdego cyklu (co 60s) |
Comment on lines
+2
to
+8
| def __init__(self, t_zadana=3.0, max_switches_per_day=12, **kwargs): | ||
| self.T_ZADANA = t_zadana | ||
| self.OKRES_CYKLU = 60 # Okno czasowe PWM w sekundach (np. 1 minuta) | ||
|
|
||
| # Liczniki wewnętrzne do symulowania pracy czasowej | ||
| self.sekunda_cyklu = 0 | ||
| self.wyliczona_moc = 0.0 |
Comment on lines
+43
to
+45
| # Progi odcięcia małych opadów | ||
| jest_snieg = snow > 0.0 | ||
| jest_deszcz = precip > 0.2 |
Comment on lines
+72
to
+73
| if czas_wlaczenia > 45.0: | ||
| czas_wlaczenia = 60.0 |
|
|
||
| # 1. Nowe obliczenie mocy rozmytej wykonywane RAZ na początku każdego cyklu (co 60s) | ||
| blad_T = self.T_ZADANA - hrt | ||
| t_ok, t_chlodno, t_mrozno, t_lodowato = self._fuzzifikuj_temperature(blad_T, hrt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dodanie pierwszych algorytmów fuzzy logic
Opis
FL1:
FL2:
FL3:
Jak zostało to przetestowane?
suwalki_2010.docx
suwalki_2023.docx
wroclaw.docx