22
33from Lab2 .backend .algorithmArtificialImmuneSystem import algorithm_artificial_immune_system
44from Lab2 .backend .helper import getMatrixFromList
5- from Lab2 .backend .helper_predicat import isNotEmptyFields ,isNotOutGraphic
5+ from Lab2 .backend .helper_predicat import isNotEmptyFields , isNotOutGraphic , isNotOutGraphicDict
66
77import global_variable as gv
88import frontshow .animation as anim
@@ -16,7 +16,13 @@ def call_AIimmuneSystem(arr_textField) -> None:
1616 max_x = float (arr_textField [1 ].get ())
1717 min_y = float (arr_textField [2 ].get ())
1818 max_y = float (arr_textField [3 ].get ())
19- if isNotOutGraphic (gv .START ,gv .END ,min_x ,max_x ,min_y ,max_y ):
19+ isNotOutGraphic = False
20+ if (type (gv .START ) == dict ):
21+ isNotOutGraphic = isNotOutGraphicDict (gv .START , gv .END , min_x , max_x , min_y , max_y )
22+ else :
23+ isNotOutGraphic = isNotOutGraphic (gv .START , gv .END , min_x , max_x , min_y , max_y )
24+
25+ if isNotOutGraphic :
2026 sizePopulize = int (arr_textField [4 ].get ())
2127 countGenerations = int (arr_textField [5 ].get ())
2228 best_point , points = algorithm_artificial_immune_system (min_x , max_x , min_y , max_y , sizePopulize , gv .current_function , countGenerations )
0 commit comments