jobshoplab.env.rendering package¶
Submodules¶
jobshoplab.env.rendering.gant_dashboard module¶
- class DashboardUtils[source]¶
Bases:
object
Utility class for dashboard operations.
- static map_time(int_time, current_time)[source]¶
Map integer time to real-time representation.
- class DashboardDataMapper[source]¶
Bases:
object
Class responsible for mapping data for dashboard visualization.
- static build_figure(data, current_time, axis)[source]¶
Build Plotly Gantt chart figure from data.
- static map_states_to_schedule_data(last_state, latest_time)[source]¶
Extract schedule data from state machine state.
- static map_transports_to_data(transport, current_time)[source]¶
Map transport data to visualization format.
- static make_transport_data(transports)[source]¶
Generate transport data in visualization-ready format.
- static map_states_to_transport_data(history, latest_time)[source]¶
Extract transport data from state machine history.
- static map_states_to_buffer_data(history, latest_time)[source]¶
Extract buffer data from state machine history.
- static get_latest_time(last_state)[source]¶
Get the latest time from the state machine state.
- class JobShopDashboard[source]¶
Bases:
object
Main dashboard class for visualizing job shop scheduling data.
- data¶
Dictionary containing schedule, transport, and buffer data.
- num_machines¶
Tuple containing the number of machines.
- num_jobs¶
Number of jobs in the instance.
- current_time¶
Current time reference.
- has_transports¶
Boolean indicating if transport data is present.
- debug¶
Boolean flag for debug mode.
- port¶
Port number for the dashboard server.
- logger¶
Logger instance.
- app¶
Dash application instance.
- __init__(data, num_machines, num_jobs, current_time, has_transports, debug, port)[source]¶
Initialize the JobShopDashboard.
- Parameters:¶
- data : Dict[str, Any]¶
Dictionary containing schedule, transport, and buffer data.
- num_machines : Tuple[int]¶
Tuple containing the number of machines.
- num_jobs : int¶
Number of jobs in the instance.
- current_time : Any¶
Current time reference.
- has_transports : bool¶
Boolean indicating if transport data is present.
- debug : bool¶
Boolean flag for debug mode.
- port : int¶
Port number for the dashboard server.
- Return type:¶
None
- update_fig(data, current_time, show_transport, show_schedules, show_buffer, axis)[source]¶
Update the Gantt chart figure based on user selections.
- Parameters:¶
- data : Dict[str, List[Dict[str, Any]]]¶
Dictionary containing schedule, transport, and buffer data.
- current_time : int¶
Current time reference.
- show_transport : bool¶
Whether to display transport data.
- show_schedules : bool¶
Whether to display schedule data.
- show_buffer : bool¶
Whether to display buffer data.
- axis : bool¶
If True, use components as y-axis; if False, use jobs as y-axis.
- Returns:¶
Updated Plotly Figure object.
- Return type:¶
Figure
- download_db(data, current_time, num_jobs, num_machines, n_clicks)[source]¶
Prepare dashboard data for download in binary format.
- Parameters:¶
- data : Dict[str, Any]¶
Dictionary containing schedule, transport, and buffer data.
- current_time : int¶
Current time reference.
- num_jobs : int¶
Number of jobs in the instance.
- num_machines : Tuple[int]¶
Tuple containing the number of machines.
- n_clicks : int¶
Number of times the download button has been clicked.
- Returns:¶
Dictionary containing download data or None if an error occurs.
- Return type:¶
-
render_in_dashboard(loglevel, history, instance, debug=
False
, port=8050
, *args, **kwargs)[source]¶ Render state machine results in a dashboard.
- Parameters:¶
- loglevel : int | str¶
Log level for the dashboard.
- history : Tuple[StateMachineResult, ...]¶
Tuple of state machine results.
- instance : InstanceConfig¶
Instance configuration.
- debug : bool¶
Flag to enable debug mode.
- port : int¶
Port number for the dashboard server.
- *args¶
Additional positional arguments.
- **kwargs¶
Additional keyword arguments.
- Return type:¶
None
jobshoplab.env.rendering.simulation module¶
- dummy_sim(log_level, config, state_history)[source]¶