class Vertex:
    def __init__(self, name, duration):
        self.id = name
        self.name = name
        self.duration = duration
        self.adjacent = {}

    def __str__(self):
        return str(self.id) + ' adjacent: ' + str([x for x in self.adjacent])

    def add_neighbor(self, neighbor, weight=0):
        self.adjacent[neighbor] = weight

    def get_connections(self):
        return self.adjacent.keys()

    def get_id(self):
        return self.id

    def get_weight(self, neighbor):
        return self.adjacent[neighbor]
