dziala!
This commit is contained in:
parent
1864443980
commit
238355d785
@ -5,7 +5,7 @@ from codes_recognizer.rocognizer import recognizer
|
||||
|
||||
def assigning(product_code_path, shelfs):
|
||||
c = None
|
||||
code = product_code_path
|
||||
code = product_code_path[0]
|
||||
# code = recognizer(product_code_path)
|
||||
product_color = str(code[0]) + str(code[1])
|
||||
for shelf in shelfs:
|
||||
|
3
coder.py
3
coder.py
@ -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 string
|
||||
r = [string, path]
|
||||
return r
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
6
main.py
6
main.py
@ -79,11 +79,13 @@ def run():
|
||||
'''
|
||||
# list [x, y]
|
||||
dest_shelf = new_product.shelf(shelfs)
|
||||
path = functions.a_star(board[agent.y][agent.x], dest_shelf, 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)
|
||||
path.pop(len(path) - 1)
|
||||
next_step = path.pop(len(path) - 1)
|
||||
# agent.is_busy = True
|
||||
|
||||
|
2
mcda.py
2
mcda.py
@ -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
|
@ -32,5 +32,4 @@ class FinalProduct:
|
||||
self.img = create_image(self)
|
||||
|
||||
def shelf(self, shelfs):
|
||||
print(self.img)
|
||||
return assigning(self.img, shelfs);
|
||||
|
Loading…
Reference in New Issue
Block a user