As a part of this thesis, we have developed a software application called FLND Visu-alizer that allows the user to work with FLND problems. The application can read a problem instance from a file or generate one randomly according to user-supplied parameters. Problem instances may be solved using a variety of heuristics, and the solutions can be viewed graphically as well as saved to a file.
The application was written in Java and therefore runs on any platform for which there is a Java virtual machine. It has been tested under Windows XP and SUSE Linux.
Figure 8.1 shows a screenshot of FLND Visualizer. The File menu has choices for starting a new problem instance; opening a problem instance from a file; saving the current instance to a file; exporting the current instance to various formats including pdf, e. g., for printing; and exiting the program. On the right are the controls for working with the problem instance, and the instance itself is displayed as a graph on the large white canvas. A status bar at the bottom displays the name of the problem instance as well as node information for the node that the mouse pointer is currently hovering over, if any.
The top set of controls on the right-hand side allows the user to set the display characteristics of the graph: whether node labels are shown, whether potential edges are shown (if there are many, they can clutter the graph making other elements difficult to see), the diameter of the nodes, and the zoom level.
At the very bottom of the right-hand control panel, information about the graph is displayed, including the number of nodes, edges, and potential edges. The controls displayed in the middle of the panel depend on the user’s current task.
8.1 Creating Problem Instances
The user can select the current “view” of the problem instance: “problem” or “solu-tion.” The view affects how the problem instance is displayed as well as the available controls for manipulating the problem instance. In problem view, the user can edit the problem instance. In solution view, the user can solve using heuristic methods and view the solutions. When in problem view, as shown in Figure 8.1, the creation controls are
99
Figure 8.1: FLND Visualizer screenshot: creating a problem instance (under Windows).
8.2. SOLVING AND VIEWING SOLUTIONS 101 shown, with separate tabs for adding nodes, edges, and potentials edges. The nodes tab allows the user to select whether a node is a client or not, and if so, its demand, as well as a node’s facility status: no facility, existing facility, or potential facility. The client demands, as well as the construction costs associated with potential facilities, may be set by the user or determined randomly from a specified range. Nodes may be generated manually one at a time by clicking on the canvas, or automatically by randomly placing a user-specified number of nodes at the click of a button.
Likewise edges may be generated one-by-one by selecting two nodes, or automat-ically. Figure 8.2 shows a screenshot where the user is in the middle of adding edges manually. Automatic generation of edges includes an option for allowing edges to cross each other or not. There is also a “Connect Graph” button that adds the minimal nec-essary additional edges to connect the graph. The travel cost of an edge is proportional to the length of the edge: the Euclidean length of the edge is multiplied by a “travel cost factor,” which the user may specify.
When generating potential edges, the user may generate a specific number, or may click the “Generate All” button to generate all that satisfy certain criteria. The criteria include a user-specified maximum length, not crossing any existing edges, and not passing through a third node. The maximum length is given either as a multiple (e. g., 1.2) of the longest existing edge, or as a percentage of the diagonal of the drawing area.
The construction cost of a potential edge is proportional to the length of the edge, being the product of the length of the edge and a “construction cost factor” specified by the user, which may vary by edge.
8.2 Solving and Viewing Solutions
Figure 8.3 shows a screenshot from FLND Visualizer in solution view. On the right-hand control panel the user may select from a variety of heuristic solvers and enter the budget for the problem. Upon clicking the “Solve” button, the problem is solved and the solution displayed on the graph. Elements selected to be in the solution are highlighted. Additionally, solution information is displayed just above the graph information at the bottom on the right: the total travel cost of the solution, total construction cost, and the number of facilities and edges to be built.
The ability to visualize an FLND problem instance can be a great help in under-standing and drawing conclusions about the instance. Heuristically solving the instance is a quick way to get a feasible solution and immediately see what it looks like. FLND Visualizer is also an easy way to quickly generate problem instances with desired char-acteristics. It has been a very handy tool in our own work on FLND problems and could be useful to others working in this area as well.
Figure 8.2: FLND Visualizer screenshot: creating a problem instance, adding edges (under Linux).
8.2. SOLVING AND VIEWING SOLUTIONS 103
Figure 8.3: FLND Visualizer screenshot: solving a problem instance.