uxsim.ResultGUIViewer.ResultGUIViewer

Interactive viewer for UXsim simulation results using PyQt5. After running the simulation, you can launch this viewer to visualize the simulation results interactively. GUI part was mainly written by Claude 3 Opus under supervision of Toru Seo.

Examples

Usage:
>>> ... #define the World object W
>>> W.exec_simulation()     #you run the simulation.
>>> from uxsim.ResultGUIViewer import launch_World_viewer
>>> launch_World_viewer(W)

Functions

launch_World_viewer(W[, return_app_window])

Launch the interactive viewer for the simulation result of the given World object.

Classes

DataFrameViewer(data, title[, parent])

EdgeItem(name, start_node, end_node, ...)

GraphWidget(nodes, edges, vehicle_list)

MainWindow(W, nodes, edges, vehicle_list, ...)

NodeItem(name, x, y, Node)

PandasModel(data)

VehicleItem(x, y)

class uxsim.ResultGUIViewer.ResultGUIViewer.DataFrameViewer(data, title, parent=None)[source]
class uxsim.ResultGUIViewer.ResultGUIViewer.EdgeItem(name, start_node, end_node, density_list, Link)[source]
boundingRect(self) QRectF[source]
contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent | None)[source]
paint(self, painter: QPainter | None, option: QStyleOptionGraphicsItem | None, widget: QWidget | None = None)[source]
shape(self) QPainterPath[source]
class uxsim.ResultGUIViewer.ResultGUIViewer.GraphWidget(nodes, edges, vehicle_list)[source]
wheelEvent(self, event: QWheelEvent | None)[source]
class uxsim.ResultGUIViewer.ResultGUIViewer.MainWindow(W, nodes, edges, vehicle_list, tmax, dt)[source]
class uxsim.ResultGUIViewer.ResultGUIViewer.NodeItem(name, x, y, Node)[source]
boundingRect(self) QRectF[source]
paint(self, painter: QPainter | None, option: QStyleOptionGraphicsItem | None, widget: QWidget | None = None)[source]
class uxsim.ResultGUIViewer.ResultGUIViewer.PandasModel(data)[source]
columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
data(self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole) Any[source]
headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.ItemDataRole.DisplayRole) Any[source]
rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
class uxsim.ResultGUIViewer.ResultGUIViewer.VehicleItem(x, y)[source]
boundingRect(self) QRectF[source]
paint(self, painter: QPainter | None, option: QStyleOptionGraphicsItem | None, widget: QWidget | None = None)[source]
uxsim.ResultGUIViewer.ResultGUIViewer.launch_World_viewer(W, return_app_window=False)[source]

Launch the interactive viewer for the simulation result of the given World object.

Parameters:
  • W (World) – The World object to visualize.

  • return_app_window (bool, optional) – If True, this function returns the QApplication and MainWindow objects. Default is False.