Few days back, there was a discussion on the mailing list about sparse and dense constraint coefficient matrices. I thought it would be nice to be able to visualize matrix A and "see" how much sparse it is. This might help verify, understand and debug LP/MIP models created using MathProg.
Attached is source code of a simple C program written using GLPK API and OpenGL. = Input: The program takes MathProg file as input. = Output: Visualization of matrix A. Nonzero matrix coefficients are colored (BLUE or RED). Coefficient with zero value are BLACK. Last row show is obj. fun. coefficients. LBs and UBs are NOT shown. Note: Program is version 0.1, might contain bugs, might fail for large models. Also attached are some screen shots for input files assign.mod and queens.mod. For more details see README file in the tarball. Comments/ideas are welcome. There might be easier way of visualizing the matrix (Postscript?, MathLab?). Also is this really useful? ---------- $ ./matrix Usage: matrix filename Where filename is MathProg model file name. Color of the cell depends on the its value. BLUE = Positive value. RED = Negative value. BLACK = Zero. -- Vijay Patil
matrix-0.1.tar.gz
Description: GNU Zip compressed data
<<attachment: assign.mod.png>>
<<attachment: queens.mod.png>>
_______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
