Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoly committed Apr 18, 2020
2 parents a9e6855 + f895408 commit 0460104
Show file tree
Hide file tree
Showing 455 changed files with 29 additions and 4,411 deletions.
Binary file modified .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@ dmypy.json
.pyre/

# data
*.csv
*.csv

Binary file modified geneticOptimizer/.DS_Store
Binary file not shown.
21 changes: 14 additions & 7 deletions geneticOptimizer/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class gaGUI():
def __init__(self):
self.root = Tk()
self.root.title("Settings")
self.root.geometry('500x250+100+100')
self.root.geometry('550x300+100+100')
self.root.configure(bg='white')
# photo = PhotoImage(file = "logo.png")
# w = Label(self.root, image=photo)
Expand All @@ -23,6 +23,7 @@ def __init__(self):
self.generations_number = IntVar()
self.optimizer = StringVar()
self.mutation = BooleanVar()
self.mutation_range = IntVar()
self.statistics = BooleanVar()
self.save = BooleanVar()
self.plot = BooleanVar()
Expand All @@ -31,6 +32,7 @@ def __init__(self):
self.generations_number.set(10)
self.optimizer.set('min')
self.mutation.set(1)
self.mutation_range.set(2)
self.statistics.set(1)
self.plot.set(1)
self.save.set(0)
Expand All @@ -43,26 +45,30 @@ def __init__(self):
self.f_label = Label(text="Input f(x, y) in python format:", font='arial 13')
self.chromosomes_number_label = Label(text="Input individs number (multiple of 4):", font='arial 13')
self.generations_number_label = Label(text="Input generations number:", font='arial 13')
self.mutation_range_label = Label(text="Input mutation range:", font='arial 13')
self.optimizer_label = Label(text="Input optimizer (min or max):", font='arial 13')

self.f_label.grid(row=0, column=0, sticky="w")
self.chromosomes_number_label.grid(row=1, column=0, sticky="w")
self.generations_number_label.grid(row=2, column=0, sticky="w")
self.optimizer_label.grid(row=3, column=0, sticky="w")

self.mutation_range_label.grid(row=5, column=0, sticky="w")

self.f_entry = Entry(textvariable=self.f)
self.chromosomes_number_entry = Entry(textvariable=self.chromosomes_number)
self.generations_number_entry = Entry(textvariable=self.generations_number)
self.mutation_range_entry = Entry(textvariable=self.mutation_range)
self.optimizer_entry = Entry(textvariable=self.optimizer)

self.f_entry.grid(row=0,column=1, padx=5, pady=5)
self.chromosomes_number_entry.grid(row=1,column=1, padx=5, pady=5)
self.generations_number_entry.grid(row=2,column=1, padx=5, pady=5)
self.optimizer_entry.grid(row=3,column=1, padx=5, pady=5)
self.chk1.grid(row=5, column=0, padx=1, pady=1)
self.chk2.grid(row=5, column=1, padx=1, pady=1)
self.chk3.grid(row=6, column=0, padx=1, pady=1)
self.chk4.grid(row=6, column=1, padx=1, pady=1)
self.chk1.grid(row=6, column=0, padx=1, pady=1)
self.mutation_range_entry.grid(row=5, column=1, padx=5, pady=5)
self.chk2.grid(row=6, column=1, padx=1, pady=1)
self.chk3.grid(row=7, column=1, padx=1, pady=1)
self.chk4.grid(row=7, column=0, padx=1, pady=1)


self.submit_button = Button(text=" calculate ", command=self.gaInfo, font='arial 17',
Expand All @@ -79,7 +85,8 @@ def gaInfo(self):
optimizer = OptimizerGA(function)
optimizer.startGA( chromosomes_number=int(self.chromosomes_number_entry.get()),
generations_number=int(self.generations_number_entry.get()),
mutation=self.mutation.get(), optimizer=self.optimizer_entry.get(),
mutation=self.mutation.get(), mutation_range=self.mutation_range.get(),
optimizer=self.optimizer_entry.get(),
statistics=self.statistics.get(), save=self.save.get(), plot=self.plot.get())

if self.statistics.get():
Expand Down
5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_501.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_502.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_503.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_504.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_505.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_506.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_507.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_508.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_509.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_510.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_511.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_512.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_513.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_514.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_515.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_516.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_517.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_518.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_519.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_520.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_521.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_522.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_523.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_524.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_525.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_526.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_527.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_528.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_529.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_530.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_531.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_532.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_533.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_534.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_535.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_536.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_537.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_538.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_539.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_540.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_541.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_542.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_543.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_544.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_545.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_546.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_547.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_548.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_549.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_550.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_551.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_552.csv

This file was deleted.

5 changes: 0 additions & 5 deletions geneticOptimizer/generations/generation_553.csv

This file was deleted.

Loading

0 comments on commit 0460104

Please sign in to comment.