[Coin-discuss] Symphony: how do I

Ted Ralphs tkralphs at lehigh.edu
Fri Jan 14 14:35:34 EST 2005


Michael Hennebry wrote:
> On Wed, 12 Jan 2005, Ted Ralphs wrote:
> 
> 
>>Could you clarify your question? Do you want to print out the initial LP
>>relaxation to a file in MPS format? Or do you just want the solution to
>>the initial LP relaxation?
> 
> 
> I want to know the initial relaxation,
> though its solution would be good too.

You can get the solution itself by turning up the verbosity of the 
solver try

bin.LINUX/OSI_GLPK/match   -F sample.mat -v 11

To print the relaxation to a file add a call to the "write_mps" function 
after the call to dual_simplex around line 260 of the file 
LP/lp_genfunc.c, like this


       PRINT(p->par.verbosity, 2,
	    ("\n\n**** Starting iteration %i ****\n\n", p->iter_num));

       termcode = dual_simplex(lp_data, &iterd);

       if (p->bc_index == 0 && p->iter_num == 0){
          write_mps(lp_data, "initial_matrix.mps");
       }

This will print out the initial LP relaxation in the root node. If you 
want to get other relaxations, just make sure you include the node index 
and the iteration number in the file name, such as

	    char name[50] = "";
	    printf("######## Recovery failed. %s%s",
		   "LP solver is having numerical difficulties :(.\n",
		   "######## Dumping current LP to MPS file and exiting.\n\n");
	    sprintf(name, "matrix.%i.%i.mps", p->bc_index, p->iter_num);
	    write_mps(lp_data, name);

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

"An optimist is someone who thinks
'It doesn't get any better than this.'
A pessimist is someone who's afraid that's true."



More information about the Coin-discuss mailing list