def __init__(self, agent, kb, env): super(GraphNeuralSession, self).__init__(agent, kb, env) self.graph = GraphBatch([Graph(kb)]) self.utterances = None self.context = None self.graph_data = None self.init_checklists = None
def build_graph(self): graph = Graph() for edge in self.graph_edges: edge = edge.strip() node_source = edge[0] node_destination = edge[1] edge_weight = edge[2] graph.add_edge(node_source, node_destination, edge_weight) return graph
def find_envelope(self, alt: float, plot=False, line=1): if plot: self.visualization.initialize_plot() td = self.makedata.td_all(alt) tr = self.makedata.tr_all(alt) graph = Graph(line1=td, line2=tr, abscissa=self.makedata.airplane.velocities) intersections = self.intersection.intersections(graph=graph) self.add_intersections(line=line, alt=alt, inter=intersections, debug=True) if plot: self.visualization.show_envelope(alt)
def create_graph(self): assert not hasattr(self, 'graphs') self.graphs = [Graph(kb) for kb in self.kbs]