2
0
forked from s444420/AL-2020

Compare commits

..

15 Commits

Author SHA1 Message Date
shaaqu
670f16b83f zaliczone 2020-06-10 12:16:28 +02:00
shaaqu
fdeecfcbf0 zaliczone 2020-06-10 12:13:24 +02:00
shaaqu
273aaa45fc Merge remote-tracking branch 'origin/master' 2020-06-10 11:58:32 +02:00
shaaqu
f5b45dc7db levels method 2020-06-10 11:58:27 +02:00
3c2c69a19b Merge branch 'master' of s444428/AL-2020 into master 2020-06-10 09:52:47 +00:00
92c06d9bda Zaktualizuj 'Raporty/final-evaluation.md' 2020-06-09 23:51:35 +00:00
shaaqu
10548ec900 Digit reco w raporcie 2020-06-10 01:14:02 +02:00
shaaqu
217057456f Digit reco w raporcie 2020-06-10 01:12:30 +02:00
shaaqu
1463e10a33 Merge remote-tracking branch 'origin/master' 2020-06-10 01:06:49 +02:00
shaaqu
8442924577 1 2020-06-10 01:06:01 +02:00
Tomek
9dae531fd6 Stworzenie raportu 2020-06-10 00:22:20 +02:00
shaaqu
7eadd83803 getting name 2020-06-10 00:09:14 +02:00
shaaqu
238355d785 dziala! 2020-06-10 00:03:58 +02:00
shaaqu
1864443980 ogarnia co gdzie polozyc 2020-06-09 23:23:49 +02:00
2b1b66f3b3 Merge branch 'master' of s444428/AL-2020 into master 2020-06-09 20:56:57 +00:00
21 changed files with 27 additions and 12 deletions

View File

@ -3,5 +3,5 @@
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (AL-2020)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (AL-2020)" project-jdk-type="Python SDK" />
</project>

View File

@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.7 (AL-2020)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.8 (AL-2020)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,10 @@
# Raport final-evaluation
### Algorytm mcda w projekcie
Do magazynu przyjerzdza dostawa 20 produktów, które są selekcjonowane przez algorytm mcda(Multiple Criteria Decision Analysis) i zwracane za pomocą listy przez funkcję `selectedSupply()`.
### Rozpoznawanie produktów
Przy wykorzystaniu drzewa decyzyjnego, Agent rozpoznaje produkty pochodzące z dostawy na podstawie ich cech (kolor, kształt, masa, rozmiar), a następnie nadaje im unikalny kod produktu tworzony na podstawie tych cech.
### Digit recognizer
Każdemu produktowi przydzielany jest kod produktu i zapisywany w formacie .png. Recognizer rozpoznaje ciag cyfr, a nastepnie przekazyje go do metody `assigning.py`, która przydziela produkty do odpowiednich półek.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -5,14 +5,16 @@ from codes_recognizer.rocognizer import recognizer
def assigning(product_code_path, shelfs):
c = None
code = recognizer(product_code_path)
print(code)
code = product_code_path[0]
# code = recognizer(product_code_path)
product_color = str(code[0]) + str(code[1])
print(product_color)
for shelf in shelfs:
if shelf.color == product_color:
shelf.add_product(code)
c = shelf.get_field()
print("Product", product_code_path, "is on", c)
name = product_code_path[1].split("/")
name = name[2][:len(name[2])-4]
print("Product:", name, "is on", c.x, c.y)
return c

View File

@ -72,5 +72,6 @@ def create_image(product):
d.text((28, 28), string, font=fnt, fill=(0, 0, 0))
path = 'img/codes/' + product.name + '.png'
img.save(path)
return path
r = [string, path]
return r

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -79,13 +79,15 @@ def run():
'''
# list [x, y]
dest_shelf = new_product.shelf(shelfs)
path = functions.a_star(board[agent.y][agent.x], dest_shelf.get_field(), board)
dest_field = board[dest_shelf.y+1][dest_shelf.x]
path = functions.a_star(board[agent.y][agent.x], dest_field, board)
print(path)
''''''
agent.item = new_product
path.pop(len(path) - 1)
next_step = path.pop(len(path) - 1)
agent.is_busy = True
# agent.is_busy = True
if board[agent.y][agent.x] == dest_field:
agent.is_busy = False
@ -114,5 +116,4 @@ def run():
pygame.display.flip()
run()

View File

@ -103,6 +103,6 @@ def selectedSupply():
supply = []
for i in range(len(products)):
supply.append([products[i].color, products[i].shape, products[i].mass, products[i].size, '-'])
supply.append(['-', '-', 0, '-', '-'])
# supply.append(['-', '-', 0, '-', '-'])
print(supply)
return supply

View File

@ -32,5 +32,4 @@ class FinalProduct:
self.img = create_image(self)
def shelf(self, shelfs):
print(self.img)
return assigning(self.img, shelfs);

View File

@ -20,7 +20,9 @@ class Shelf:
self.level3.append(product)
def get_field(self):
return self.field
def get_color(self):
return self.color