Learn R Programming

warehouseTools (version 0.1.2)

chart_warehouse_route: Plot Warehouse Route with Coordinates and Arcs usually returned by heuristic

Description

This function visualizes a warehouse layout and the corresponding route with arcs representing connections between different coordinates (locations). It allows customization of point markers, line colors, line widths, and text labels.

Usage

chart_warehouse_route(
  coordinates,
  arcs,
  pch = 18,
  col_warehouse_lines = "gray",
  lwd_warehouse_lines = 1,
  col_arcs_lines = "darkblue",
  lwd_arcs_lines = 2.5,
  text_cex = 0.7,
  text_col = "darkorange",
  ...
)

Value

The function produces a plot of the warehouse layout with arcs representing connections between locations. It does not return any value.

Arguments

coordinates

A matrix or data frame representing the coordinates (x, y) of the warehouse locations.

arcs

A matrix or data frame representing the arcs (connections) between locations. Each row should contain four columns: x_from, y_from, x_to, and y_to, with an optional fifth column for arc labels.

pch

The plotting character to use for the points in the plot (default is 18).

col_warehouse_lines

The color of the warehouse lines (default is "gray").

lwd_warehouse_lines

The line width for the warehouse lines (default is 1).

col_arcs_lines

The color of the arcs that represent duplicate routes (default is "darkblue").

lwd_arcs_lines

The line width for the arcs representing duplicate routes (default is 2.5).

text_cex

Numeric value indicating the size of the text labels for arcs (default is 0.7).

text_col

The color of the text labels for arcs (default is "darkorange").

...

Additional graphical parameters passed to the underlying plot function.

Details

The function visualizes a route through a warehouse using arcs that connect different coordinates. It highlights duplicate arcs using different line colors and line widths. The function also supports text labels for arcs, with customizable text size and color. The user can pass additional graphical parameters through the `...` argument, which are forwarded to the `plot` function.

#'

References

Le-Duc, T. (2005). *Design and Control of Efficient Order*. Erasmus Research Institute of Management (ERIM).

Ratliff, H. D., & Rosenthal, A. S. (1983). Order-Picking in a Rectangular Warehouse: A Solvable Case of the Traveling Salesman Problem. *Operations Research, 31*(3), 507–521. tools:::Rd_expr_doi("10.1287/opre.31.3.507")

Examples

Run this code
# Example usage
coordinates <- matrix(c(1, 1, 2, 2, 3, 3), ncol = 2)
arcs <- matrix(c(1, 1, 2, 2, 1, 2, 2, 3, 3, 2), ncol = 5, byrow = TRUE)
chart_warehouse_route(coordinates, arcs, pch = 19, col_warehouse_lines = "red",
lwd_warehouse_lines = 2)

Run the code above in your browser using DataLab