[Coin-symphony] How to dump to MPS?

Ted Ralphs tkralphs at lehigh.edu
Thu Oct 6 00:07:29 EDT 2005


francois dionne wrote:
> Dear mailing list,
> 
> I'm working on a series of four mixed integer problems. Some of the
> variables are continuous, some
> of them are zeros and ones and some of the variables are integers other
> than zero and one. I'm
> using Symphony in combination with several software packages.
> 
> According to my model, at least one problem should be feasible, but the
> Symphony solver never
> gets past the root node in any problem.
> 
> The problems are all generated by C++ software that I wrote using the
> Symphony API. What I'd like
> to do is to dump the problem to an MPS text file using the function:
> 
> void write_mps(LPdata *lp_data, char *fname)
> 
> , as suggested in the Symphony manual. Then I can examine it by hand or
> with another solver.
> So here's my question: where do I get this LPdata object? The Symphony
> manual is unclear about this.

To write out the MPS file for debugging purposes, the easiest thing to
do is just to modify the SYMPHONY source itself. Edit LP/lp_genfunc.c
and look for the dual_simplex() call around line 263 (I'm not sure of
exactly what version of SYMPHONY you're using). On the next few lines, put

   char name[50] = "";
   printf("####### Dumping current LP to MPS file and exiting.\n\n");
   sprintf(name, "matrix.%i.%i", p->bc_index, p->iter_num);
   write_mps(lp_data, name);

This will write out the current LP relaxation to an MPS file every
iteration with the name matrix.*.*, where the first "*" is the node
index and the second "*" is the iteration number. Looking at these,
especially the first one (before any cuts are added), should give you an
idea of what is happening. Careful with this, as it can fill up your
hard drive fast if you let it run for long! Let me know if this helps.

Cheers,

Ted
-- 
Dr. Ted Ralphs
Assistant Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2


-- 
Dr. Ted Ralphs
Assistant Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2



More information about the Symphony mailing list