[Dip] Printing Underlying Formulation

Kipp Martin kmartin at chicagobooth.edu
Mon Aug 9 22:34:47 EDT 2010


Hi:
> 
> But, you can use the LogDumpModel=2 option. 

Is there a way to set this option inside the C++ code as opposed to 
reading a parameter file? It looks like

    DecompParam m_param;

is a protected member of DecompAlgo so I am trying to figure out how to 
work with this inside the code. Is there someway to do this through the 
UtilParameters class?

It looks like if I apply price and cut and it does, say 10 iterations then

PRICE_AND_CUT_masterProbRootIP.n0.c0.p10.lp

will  be the restricted master at the end and

PRICE_AND_CUT_masterProbRootIP.n0.c0.p10.lp

will be the initial restricted master. Is this correct?


Thanks



> 
> For PRICE_AND_CUT, this will print (.mps and .lp) - the master problem (reformulation - over A'') and the subproblem (original formulation - over A') for every iteration (cut=c/price=p/node=n/block=b).
> 
> For example:
> [magala at orclus71 MILPBlock]$ ls *.mps
> PRICE_AND_CUT_masterProb.n0.c0.p0.mps
> PRICE_AND_CUT_masterProb.n0.c0.p1.mps
> PRICE_AND_CUT_masterProbRootIP.n0.c0.p0.mps
> PRICE_AND_CUT_masterProbRootIP.n0.c0.p1.mps
> PRICE_AND_CUT_masterProb_switchItoII.n0.c0.p0.mps
> PRICE_AND_CUT_subProb_relax0.n0.c0.p0.b0.mps
> PRICE_AND_CUT_subProb_relax0.n0.c0.p1.b0.mps
> PRICE_AND_CUT_subProb_relax10.n0.c0.p0.b10.mps
> PRICE_AND_CUT_subProb_relax10.n0.c0.p1.b10.mps
> PRICE_AND_CUT_subProb_relax11.n0.c0.p0.b11.mps
> PRICE_AND_CUT_subProb_relax11.n0.c0.p1.b11.mps
> PRICE_AND_CUT_subProb_relax12.n0.c0.p0.b12.mps
> PRICE_AND_CUT_subProb_relax12.n0.c0.p1.b12.mps
> PRICE_AND_CUT_subProb_relax13.n0.c0.p0.b13.mps
> ...
> 
> If you want the full model (A' and A'') all in the original space - you can't really easily do that while running PRICE_AND_CUT. To do that from within that session, you'd probably have to manually create a separate OSI object with the full original model and then use the writeMps or writeLp OSI functions yourself. Alternatively, if this is just for debugging, you can first run CUT, instead of PRICE_AND_CUT with the LogDumpModel=2 option. In that case, you would get the standard branch-and-cut algorithm and the intermediate MPS files for each iteration. Just change doCut=1 (use DecompAlgoC object) and doPriceCut=0 (don't use DecompAlgoPC object).
> 
> Then, you would get something like:
> CUT_masterProb.n0.c0.p0.mps   CUT_masterProb.n33.c0.p0.mps
> CUT_masterProb.n0.c1.p0.mps   CUT_masterProb.n33.c1.p0.mps
> CUT_masterProb.n0.c2.p0.mps   CUT_masterProb.n3.c0.p0.mps
> CUT_masterProb.n0.c3.p0.mps   CUT_masterProb.n3.c1.p0.mps
> CUT_masterProb.n0.c4.p0.mps   CUT_masterProb.n4.c0.p0.mps
> CUT_masterProb.n10.c0.p0.mps  CUT_masterProb.n4.c1.p0.mps
> CUT_masterProb.n10.c1.p0.mps  CUT_masterProb.n5.c0.p0.mps
> CUT_masterProb.n11.c0.p0.mps  CUT_masterProb.n5.c1.p0.mps
> CUT_masterProb.n11.c1.p0.mps  CUT_masterProb.n5.c2.p0.mps
> CUT_masterProb.n12.c0.p0.mps  CUT_masterProb.n6.c0.p0.mps
> ...
> 
> 
>> -----Original Message-----
>> From: dip-bounces at list.coin-or.org [mailto:dip-bounces at list.coin-or.org]
>> On Behalf Of Kipp Martin
>> Sent: Monday, August 09, 2010 2:43 AM
>> To: dip at list.coin-or.org
>> Subject: [Dip] Printing Underlying Formulation
>>
>> Hi:
>>
>> For debugging purposes, after creating an object in the DecompApp I would
>> like to print our the underlying formulation, preferably in Lp format. Then
>> after, solving the problem, print out the final restricted master in Lp format
>> (and perhaps the master at each step). Is there an easy way to do this? I
>> have poked around the code and see the method
>> printCurrentProblem() but am not sure how to use it. I cannot find it
>> illustrated in the examples folder. Evidently you pass it a pointer to an
>> OsiSolverInterface, but how does one get this pointer for the underlying
>> formulation in the original space and for the restricted master?
>>
>> Thanks
>>
>>
>> --
>> Kipp Martin
>> Professor of Operations Research
>> and Computing Technology
>> Booth School of Business
>> University of Chicago
>> 5807 South Woodlawn Avenue
>> Chicago, IL 60637
>> 773-702-7456
>> kmartin at chicagobooth.edu
>> http://www.chicagobooth.edu/faculty/bio.aspx?person_id=12825325568
>> http://projects.coin-or.org/OS
>>
>> _______________________________________________
>> Dip mailing list
>> Dip at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/dip
> 


-- 
Kipp Martin
Professor of Operations Research
and Computing Technology
Booth School of Business
University of Chicago
5807 South Woodlawn Avenue
Chicago, IL 60637
773-702-7456
kmartin at chicagobooth.edu
http://www.chicagobooth.edu/faculty/bio.aspx?person_id=12825325568
http://projects.coin-or.org/OS



More information about the Dip mailing list