Zaktualizuj 'agent.py'

This commit is contained in:
Daria Vodzinska 2020-06-15 02:29:35 +00:00
parent faba290bda
commit 2bb9f831f2

View File

@ -10,6 +10,8 @@ import pdb
import numpy as np
from package_location_classifier.classifier import PackageLocationClassifier
from genetic_route import genetic_trace_route
from siec import imgSkan, imageClass
from keras.models import Sequential
class Node:
def __init__(self, coord_x, coord_y, package=None, is_rack=False):
@ -205,7 +207,13 @@ class Agent:
break
if dst_package is not None:
return dst_package
nmodel = Sequential()
imageClass(nmodel)
nmodel.load_weights('model_weights.h5')
imgSkan()
def rack_heuristics(self, start, goal, can_place):
heur_can_place = not can_place
diff_x = pow(goal.x - start.x, 2)