qgym.envs.routing.routing_visualiser module
This module contains a class used for rendering a
Routing
environment.
- class qgym.envs.routing.routing_visualiser.RoutingVisualiser(render_mode, connection_graph)[source]
Bases:
Visualiser
Visualiser class for the
Routing
environment.- __init__(render_mode, connection_graph)[source]
Init of the
RoutingVisualiser
.
- render(state)[source]
Render the current state using
pygame
.- Parameters:
state (
RoutingState
) – State to render.- Raises:
ValueError – When an invalid mode is provided.
- Return type:
- Returns:
If render_mode is ‘human’ returns show the current step at using a
pygame
screen. If render_mode is ‘rgb_array’ returns a RGB array encoding of the rendered image.