Little updates

This commit is contained in:
Piotr Kopycki 2022-01-24 10:14:52 +01:00
parent 062a4f804a
commit 1390b7fe8c
4 changed files with 69 additions and 122 deletions

27
main.py
View File

@ -326,13 +326,13 @@ class LeagueController:
self.league_system = ctrl.ControlSystemSimulation(self.league_ctrl) self.league_system = ctrl.ControlSystemSimulation(self.league_ctrl)
def getScore(self, values): def getScore(self, values):
self.league_system.input['clubs'] = values['clubs'] self.league_system.input['clubs'] = int(values['clubs'])
self.league_system.input['goals'] = values['goalsPerMatch'] self.league_system.input['goals'] = float(values['goalsPerMatch'])
self.league_system.input['avgValue'] = values['avgMarketValueInMln'] self.league_system.input['avgValue'] = float(values['avgMarketValueInMln'])
self.league_system.input['players'] = values['famousPlayers'] self.league_system.input['players'] = int(values['famousPlayers'])
self.league_system.input['teamsChL'] = values['teamsInChampionsLeague'] self.league_system.input['teamsChL'] = int(values['teamsInChampionsLeague'])
self.league_system.input['teamsEuL'] = values['teamsInEuropaLeague'] self.league_system.input['teamsEuL'] = int(values['teamsInEuropaLeague'])
self.league_system.input['teamsCfL'] = values['teamsInConferenceLeague'] self.league_system.input['teamsCfL'] = int(values['teamsInConferenceLeague'])
self.league_system.compute() self.league_system.compute()
@ -421,17 +421,18 @@ if __name__ == "__main__":
view_plot = input('Wpisz 1 jeżeli chcesz obejrzeć wykresy funkcji i reguł dla ostatnio sprawdzanej ligi lub dowolny klawisz żeby kontynuować:\n') view_plot = input('Wpisz 1 jeżeli chcesz obejrzeć wykresy funkcji i reguł dla ostatnio sprawdzanej ligi lub dowolny klawisz żeby kontynuować:\n')
if view_plot == '1': if view_plot == '1':
while (function_rule_result != '0'): while (function_rule_result != '0'):
function_rule_result = input('Wybierz rodzaj wykresu:\n1 - wykresy funkcji przynależności\n2 - wykresy reguł\n3 - wykres wyniku kontrolera\n0 - skończ wizualizację\n') #function_rule_result = input('Wybierz rodzaj wykresu:\n1 - wykresy funkcji przynależności\n2 - wykresy reguł\n3 - wykres wyniku kontrolera\n0 - skończ wizualizację\n')
function_rule_result = input('Wybierz rodzaj wykresu:\n1 - wykresy funkcji przynależności\n2 - wykres wyniku kontrolera\n0 - skończ wizualizację\n')
if function_rule_result == "1": if function_rule_result == "1":
while (function_id != '8'): while (function_id != '8'):
function_id = input('Wybierz funkcje przynależności:\n0 - funkcje punktów atrakcyjności ligi\n1 - funkcje klubów w lidze\n2 - funkcje średniej ilości golów\n3 - funkcje średniej wartości rynkowej\n4 - funkcje ilości słynnych zawodników\n5 - funkcje drużyn w lidze mistrzów\n6 - funkcję drużyn w lidze europy\n7 - funkcję drużyn w lidze konfederacji\n8 - powrót do poprzedniego menu\n') function_id = input('Wybierz funkcje przynależności:\n0 - funkcje punktów atrakcyjności ligi\n1 - funkcje klubów w lidze\n2 - funkcje średniej ilości golów\n3 - funkcje średniej wartości rynkowej\n4 - funkcje ilości słynnych zawodników\n5 - funkcje drużyn w lidze mistrzów\n6 - funkcję drużyn w lidze europy\n7 - funkcję drużyn w lidze konfederacji\n8 - powrót do poprzedniego menu\n')
if function_id == "0" or function_id == "1" or function_id == "2" or function_id == "3" or function_id == "4" or function_id == "5" or function_id == "6" or function_id == "7": if function_id == "0" or function_id == "1" or function_id == "2" or function_id == "3" or function_id == "4" or function_id == "5" or function_id == "6" or function_id == "7":
controller.displayMembershipFunctionPlot(int(function_id)) controller.displayMembershipFunctionPlot(int(function_id))
# elif function_rule_result == "2":
# while (rule_id != '6'):
# rule_id = input('Wybierz regułę:\n1 - reguła dla tragicznych lig\n2 - reguła dla słabych lig\n3 - reguła dla przeciętnych lig\n4 - reguła dla dobrych lig\n5 - reguła dla najlepszych lig\n6 - powrót do poprzedniego menu\n')
# if rule_id == "1" or rule_id == "2" or rule_id == "3" or rule_id == "4" or rule_id == "5":
# controller.displayRulePlot(int(rule_id))
elif function_rule_result == "2": elif function_rule_result == "2":
while (rule_id != '6'):
rule_id = input('Wybierz regułę:\n1 - reguła dla tragicznych lig\n2 - reguła dla słabych lig\n3 - reguła dla przeciętnych lig\n4 - reguła dla dobrych lig\n5 - reguła dla najlepszych lig\n6 - powrót do poprzedniego menu\n')
if rule_id == "1" or rule_id == "2" or rule_id == "3" or rule_id == "4" or rule_id == "5":
controller.displayRulePlot(int(rule_id))
elif function_rule_result == "3":
controller.displayControllerResultPlot() controller.displayControllerResultPlot()
#plt.show() #plt.show()

55
res.csv Normal file
View File

@ -0,0 +1,55 @@
League,Score
Premier League,89.79166666666667
LaLiga,87.99305555555551
Serie A,69.99999999999997
Bundesliga,69.99999999999997
Ligue 1,70.0
Liga Bwin,50.0
Eredivisie,50.0
Bundesliga,50.0
Premiership,50.0
Premier Liga,50.0
Premier Liga,50.0
Super liga Srbije,16.06985926699488
Jupiler Pro League,50.0
Super League,16.720238095238116
Protathlima Cyta,37.46376811594203
1.HNL,19.502537932480898
Fortuna Liga,50.0
Super Lig,50.0
Super League 1,16.72023809523811
Superligaen,50.0
Eliteserien,18.708853030574293
Ligat ha'Al,18.452797318931577
Allsvenskan,16.373584957387074
efbet Liga,18.30879493889046
Premyer Liqa,16.513252197430706
Liga 1,16.563786394400363
Ekstraklasa,17.799929815326582
NB I.,16.607555033649284
Fortuna Liga,17.47128703953887
Premier Liga,17.017969510028376
Prva Liga,18.027979553403277
Vysheyshaya Liga,16.92098939265932
Divizia Nationala,17.47128703953887
A Lyga,16.945442256089507
Premijer Liga,18.93687055144107
Veikkausliiga,18.118481435127244
BGL Ligue,13.732949223788575
Virsliga,17.81954033134955
BKT Superliga e Kosovës,40.104166666666664
Premier Division,12.170932536120004
Premiership,14.77821484228063
Kategoria Superiore,17.47128703953886
Bardzragujn khumb,18.027979553403277
Betri-deildin,40.104166666666664
Premium Liiga,40.104166666666664
Premier League,17.576907528891994
Crystalbet Erovnuli Liga,17.384648906569666
Prva liga,16.993931364085164
Cymru Premier,10.990792282448856
Gibraltar National League,10.208333333333334
Pepsi Max deild,13.976944727639466
1. CFL,16.945442256089507
Primera Divisió,40.104166666666664
Camp. Sammarinese,40.104166666666664
1 League Score
2 Premier League 89.79166666666667
3 LaLiga 87.99305555555551
4 Serie A 69.99999999999997
5 Bundesliga 69.99999999999997
6 Ligue 1 70.0
7 Liga Bwin 50.0
8 Eredivisie 50.0
9 Bundesliga 50.0
10 Premiership 50.0
11 Premier Liga 50.0
12 Premier Liga 50.0
13 Super liga Srbije 16.06985926699488
14 Jupiler Pro League 50.0
15 Super League 16.720238095238116
16 Protathlima Cyta 37.46376811594203
17 1.HNL 19.502537932480898
18 Fortuna Liga 50.0
19 Super Lig 50.0
20 Super League 1 16.72023809523811
21 Superligaen 50.0
22 Eliteserien 18.708853030574293
23 Ligat ha'Al 18.452797318931577
24 Allsvenskan 16.373584957387074
25 efbet Liga 18.30879493889046
26 Premyer Liqa 16.513252197430706
27 Liga 1 16.563786394400363
28 Ekstraklasa 17.799929815326582
29 NB I. 16.607555033649284
30 Fortuna Liga 17.47128703953887
31 Premier Liga 17.017969510028376
32 Prva Liga 18.027979553403277
33 Vysheyshaya Liga 16.92098939265932
34 Divizia Nationala 17.47128703953887
35 A Lyga 16.945442256089507
36 Premijer Liga 18.93687055144107
37 Veikkausliiga 18.118481435127244
38 BGL Ligue 13.732949223788575
39 Virsliga 17.81954033134955
40 BKT Superliga e Kosovës 40.104166666666664
41 Premier Division 12.170932536120004
42 Premiership 14.77821484228063
43 Kategoria Superiore 17.47128703953886
44 Bardzragujn khumb 18.027979553403277
45 Betri-deildin 40.104166666666664
46 Premium Liiga 40.104166666666664
47 Premier League 17.576907528891994
48 Crystalbet Erovnuli Liga 17.384648906569666
49 Prva liga 16.993931364085164
50 Cymru Premier 10.990792282448856
51 Gibraltar National League 10.208333333333334
52 Pepsi Max deild 13.976944727639466
53 1. CFL 16.945442256089507
54 Primera Divisió 40.104166666666664
55 Camp. Sammarinese 40.104166666666664

View File

@ -1,54 +0,0 @@
Premier League score is, 0.6041054792357513
LaLiga score is, 0.8
Serie A score is, 0.5403828197945849
Bundesliga score is, 0.531043470166621
Ligue 1 score is, 0.6926977372958362
Liga Bwin score is, 1.0
Eredivisie score is, 1.0
Bundesliga score is, 0.5057471264367834
Premiership score is, 0.5057471264367834
Premier Liga score is, 0.8734130372900716
Premier Liga score is, 0.8734130372900716
Super liga Srbije score is, 0.7140096618357546
Jupiler Pro League score is, 1.0
Super League score is, 1.0
Protathlima Cyta score is, 0.5057471264367834
1.HNL score is, 0.5403828197945835
Fortuna Liga score is, 0.8734130372900716
Super Lig score is, 1.0
Super League 1 score is, 0.5057471264367834
Superligaen score is, 0.5057471264367834
Eliteserien score is, 0.8434674958254214
Ligat ha'Al score is, 0.5057471264367834
Allsvenskan score is, 0.7140096618357546
efbet Liga score is, 0.5057471264367834
Premyer Liqa score is, 0.97034078807242
Liga 1 score is, 0.7140096618357546
Ekstraklasa score is, 1.0
NB I. score is, 0.9248363528865283
Fortuna Liga score is, 0.5057471264367834
Premier Liga score is, 0.5057471264367834
Prva Liga score is, 0.6908378245957848
Vysheyshaya Liga score is, 0.7140096618357546
Divizia Nationala score is, 0.8463231347289373
A Lyga score is, 0.6908378245957848
Premijer Liga score is, 0.5057471264367834
Veikkausliiga score is, 0.5057471264367834
BGL Ligue score is, 1.0
Virsliga score is, 0.5321408915795232
BKT Superliga e Kosovës score is, 0.5057471264367834
Premier Division score is, 0.6908378245957848
Premiership score is, 0.5057471264367834
Kategoria Superiore score is, 0.6908378245957848
Bardzragujn khumb score is, 0.6908378245957848
Betri-deildin score is, 1.0
Premium Liiga score is, 1.0
Premier League score is, 0.5057471264367834
Crystalbet Erovnuli Liga score is, 0.6908378245957848
Prva liga score is, 0.5057471264367834
Cymru Premier score is, 0.5057471264367834
Gibraltar National League score is, 1.0
Pepsi Max deild score is, 0.5057471264367834
1. CFL score is, 0.6908378245957848
Primera Divisió score is, 0.5057471264367834
Camp. Sammarinese score is, 0.5057471264367834
1 Premier League score is 0.6041054792357513
2 LaLiga score is 0.8
3 Serie A score is 0.5403828197945849
4 Bundesliga score is 0.531043470166621
5 Ligue 1 score is 0.6926977372958362
6 Liga Bwin score is 1.0
7 Eredivisie score is 1.0
8 Bundesliga score is 0.5057471264367834
9 Premiership score is 0.5057471264367834
10 Premier Liga score is 0.8734130372900716
11 Premier Liga score is 0.8734130372900716
12 Super liga Srbije score is 0.7140096618357546
13 Jupiler Pro League score is 1.0
14 Super League score is 1.0
15 Protathlima Cyta score is 0.5057471264367834
16 1.HNL score is 0.5403828197945835
17 Fortuna Liga score is 0.8734130372900716
18 Super Lig score is 1.0
19 Super League 1 score is 0.5057471264367834
20 Superligaen score is 0.5057471264367834
21 Eliteserien score is 0.8434674958254214
22 Ligat ha'Al score is 0.5057471264367834
23 Allsvenskan score is 0.7140096618357546
24 efbet Liga score is 0.5057471264367834
25 Premyer Liqa score is 0.97034078807242
26 Liga 1 score is 0.7140096618357546
27 Ekstraklasa score is 1.0
28 NB I. score is 0.9248363528865283
29 Fortuna Liga score is 0.5057471264367834
30 Premier Liga score is 0.5057471264367834
31 Prva Liga score is 0.6908378245957848
32 Vysheyshaya Liga score is 0.7140096618357546
33 Divizia Nationala score is 0.8463231347289373
34 A Lyga score is 0.6908378245957848
35 Premijer Liga score is 0.5057471264367834
36 Veikkausliiga score is 0.5057471264367834
37 BGL Ligue score is 1.0
38 Virsliga score is 0.5321408915795232
39 BKT Superliga e Kosovës score is 0.5057471264367834
40 Premier Division score is 0.6908378245957848
41 Premiership score is 0.5057471264367834
42 Kategoria Superiore score is 0.6908378245957848
43 Bardzragujn khumb score is 0.6908378245957848
44 Betri-deildin score is 1.0
45 Premium Liiga score is 1.0
46 Premier League score is 0.5057471264367834
47 Crystalbet Erovnuli Liga score is 0.6908378245957848
48 Prva liga score is 0.5057471264367834
49 Cymru Premier score is 0.5057471264367834
50 Gibraltar National League score is 1.0
51 Pepsi Max deild score is 0.5057471264367834
52 1. CFL score is 0.6908378245957848
53 Primera Divisió score is 0.5057471264367834
54 Camp. Sammarinese score is 0.5057471264367834

View File

@ -1,55 +0,0 @@
League,Score
Premier League,61.025119126510795
LaLiga,56.15575447570333
Serie A,60.40382819794585
Bundesliga,60.30366482401773
Ligue 1,58.07302262704164
Liga Bwin,50.0
Eredivisie,50.0
Bundesliga,40.057471264367834
Premiership,40.057471264367834
Premier Liga,43.734130372900715
Premier Liga,43.734130372900715
Super liga Srbije,42.14850588590407
Jupiler Pro League,50.0
Super League,45.29147855530481
Protathlima Cyta,40.057471264367834
1.HNL,39.596171802054165
Fortuna Liga,43.734130372900715
Super Lig,50.0
Super League 1,40.057471264367834
Superligaen,40.057471264367834
Eliteserien,43.44018053492688
Ligat ha'Al,40.057471264367834
Allsvenskan,42.14850588590407
efbet Liga,40.057471264367834
Premyer Liqa,35.30248317573896
Liga 1,42.14850588590407
Ekstraklasa,50.0
NB I.,44.24836352886529
Fortuna Liga,40.057471264367834
Premier Liga,40.057471264367834
Prva Liga,38.10204081632655
Vysheyshaya Liga,42.14850588590407
Divizia Nationala,43.47289117836451
A Lyga,38.10204081632655
Premijer Liga,40.057471264367834
Veikkausliiga,40.057471264367834
BGL Ligue,47.32523094688215
Virsliga,40.33120598591547
BKT Superliga e Kosovës,40.057471264367834
Premier Division,38.10204081632655
Premiership,40.057471264367834
Kategoria Superiore,38.10204081632655
Bardzragujn khumb,38.10204081632655
Betri-deildin,50.0
Premium Liiga,46.40917191914804
Premier League,40.057471264367834
Crystalbet Erovnuli Liga,38.10204081632655
Prva liga,40.057471264367834
Cymru Premier,40.057471264367834
Gibraltar National League,50.0
Pepsi Max deild,40.057471264367834
1. CFL,38.10204081632655
Primera Divisió,40.057471264367834
Camp. Sammarinese,40.057471264367834
1 League Score
2 Premier League 61.025119126510795
3 LaLiga 56.15575447570333
4 Serie A 60.40382819794585
5 Bundesliga 60.30366482401773
6 Ligue 1 58.07302262704164
7 Liga Bwin 50.0
8 Eredivisie 50.0
9 Bundesliga 40.057471264367834
10 Premiership 40.057471264367834
11 Premier Liga 43.734130372900715
12 Premier Liga 43.734130372900715
13 Super liga Srbije 42.14850588590407
14 Jupiler Pro League 50.0
15 Super League 45.29147855530481
16 Protathlima Cyta 40.057471264367834
17 1.HNL 39.596171802054165
18 Fortuna Liga 43.734130372900715
19 Super Lig 50.0
20 Super League 1 40.057471264367834
21 Superligaen 40.057471264367834
22 Eliteserien 43.44018053492688
23 Ligat ha'Al 40.057471264367834
24 Allsvenskan 42.14850588590407
25 efbet Liga 40.057471264367834
26 Premyer Liqa 35.30248317573896
27 Liga 1 42.14850588590407
28 Ekstraklasa 50.0
29 NB I. 44.24836352886529
30 Fortuna Liga 40.057471264367834
31 Premier Liga 40.057471264367834
32 Prva Liga 38.10204081632655
33 Vysheyshaya Liga 42.14850588590407
34 Divizia Nationala 43.47289117836451
35 A Lyga 38.10204081632655
36 Premijer Liga 40.057471264367834
37 Veikkausliiga 40.057471264367834
38 BGL Ligue 47.32523094688215
39 Virsliga 40.33120598591547
40 BKT Superliga e Kosovës 40.057471264367834
41 Premier Division 38.10204081632655
42 Premiership 40.057471264367834
43 Kategoria Superiore 38.10204081632655
44 Bardzragujn khumb 38.10204081632655
45 Betri-deildin 50.0
46 Premium Liiga 46.40917191914804
47 Premier League 40.057471264367834
48 Crystalbet Erovnuli Liga 38.10204081632655
49 Prva liga 40.057471264367834
50 Cymru Premier 40.057471264367834
51 Gibraltar National League 50.0
52 Pepsi Max deild 40.057471264367834
53 1. CFL 38.10204081632655
54 Primera Divisió 40.057471264367834
55 Camp. Sammarinese 40.057471264367834