discreteoptimization/visualization — pull request #2 by fergemann (2014-04-02 16:09:46+00:00)
Title: Facility Location Problem and error visualization

This probably should have been multiple pull requests, but here's what I've done:

Changed the "warehouse" problem to "facility" and switched the terminology throughout the code. It was also mixing up capacity and demand for the facilities, so I fixed that. This should be ready to deploy on the course site now.

For Coloring, TSP, and Facility problems, I wrote code that reports errors in the solution and adds them to the visualization to aid in debugging. Specifically:

Coloring: If the solution uses more colors than claimed, an error message indicates that, and the violating nodes are colored black. Bad edges are reported and colored red.

Facility: Reports customers who are assigned to a facility that doesn't exist or not assigned at all. Colors them black. Reports facilities that exceed demand. Calculates total cost and reports if claimed objective value doesn't match it.

TSP: Reports invalid nodes in tour. Nodes that aren't visited or are visited more than once are reported and colored red. Total length is calculated and reported if it doesn't match the claimed objective value.