[Cgl] cgl, cpx, mir, error

Matthew Galati Matthew.Galati at sas.com
Thu Apr 12 08:29:41 EDT 2007


Matt: In this case, and in the design I was suggesting, there is no SI at all. CGL is just an independent object that finds separating hyperplanes for some real vector and some polyhedron (defined by a matrix and rhs's).  So, yes, the user would have to calculate Ax* for each new x* - if that is something the particular CGL needed (like in the case of MIRs).

Francois: As a temp fix, I agree that an empty Osi class might work. In fact, for my case, I suppose I can derive my own OsiMyApp and have that use the OsiXxx functions when possible and my own functions in other places. This is ugly, but might be sufficient for now. Let me give it a try. I'll get back to you.

It sounds like there is not much motivation to do this wholesale. So, I am fine with hacking something just for my purposes. Hopefully OSI2 will fix some of these design issues in the future.

Thanks,
Matt


 

> -----Original Message-----
> From: Matthew Saltzman [mailto:mjs at clemson.edu] 
> Sent: Thursday, April 12, 2007 4:41 AM
> To: fmargot at andrew.cmu.edu
> Cc: Matthew Galati; cgl
> Subject: RE: [Cgl] cgl, cpx, mir, error
> 
> On Thu, 12 Apr 2007 fmargot at andrew.cmu.edu wrote:
> 
> >
> > Matt:
> >
> > The simplest fix is to have the gentle and kind people at Osi to 
> > implement an "empty" solver interface class. That would get cheaply 
> > the solver independence we discussed a while back. This is only a 
> > temporary fix, as I was told that Osi2 has a concept identical to 
> > CglData. It seems thus a waste of time to convert Cgl to 
> have CglData 
> > and then to convert it again when Osi2 comes out.
> >
> > I know that you would like to have Cgl independent of Osi, but I am 
> > still not convinced that it is worth the work.
> 
> In this particular case, it's not clear to me how independence helps. 
> Wouldn't you then be stuck with computing the matrix-vector 
> product, rather than being able to query the SI for the current value?
> 
> 
> >
> > Francois
> >
> >
> >
> > On Wed, 11 Apr 2007, Matthew Galati wrote:
> >
> >> Any suggestions on a workaround? I don't see any OSI functions for 
> >> setRowActivity.
> >> 
> >> And, it doesn't look like the idea of making CGL 
> independent of OSI worked 
> >> out. Although I do see Francois added CglData - which 
> looks like what I 
> >> wanted. But, most of the CGLs are still using OSI.
> >> 
> >> 
> >> 
> >> -----Original Message-----
> >> From: Ted Ralphs [mailto:tkralphs at Lehigh.EDU]
> >> Sent: Wednesday, April 11, 2007 5:07 PM
> >> To: cgl at list.coin-or.org
> >> Cc: Matthew Galati
> >> Subject: Re: [Cgl] cgl, cpx, mir, error
> >> 
> >> There is a call to getRowActivity() in 
> CglMixedIntegerRounding2. In OsiCpx, 
> >> this call is implemented through a call to CPLEX, which 
> complains that 
> >> there is no solution whenever you have not just finished 
> solving the loaded 
> >> instance (which it looks like you have not. The other cut 
> generators seem 
> >> only to use calls that require returning information cached in the 
> >> interface layer, so you don't get the error.
> >> 
> >> Cheers,
> >> 
> >> Ted
> >> 
> >> Matthew Galati wrote:
> >>> Hi.
> >>> 
> >>> I am creating an OsiCpx object, populating a model, 
> setting the primal 
> >>> solution, and then calling the MIR cut generator.
> >>> 
> >>> OsiSolverInterface * siCgl = new OsiLpSolverInterface();
> >>> 
> >>>   siCgl->loadProblem(*m_modelCore->M,
> >>>                        &m_modelCore->colLB[0],
> >>>                        &m_modelCore->colUB[0],
> >>>                        m_app->m_model.objCoeff,
> >>>                        &m_modelCore->rowLB[0],
> >>>                        &m_modelCore->rowUB[0]);
> >>> 
> >>>    siCgl->setInteger(&m_modelRelax->integerVars[0],
> >>>                       
> static_cast<int>(m_modelRelax->integerVars.size()));
> >>>    siCgl->setColSolution(m_xhat);
> >>> 
> >>>    CglMixedIntegerRounding2 cglMirs;
> >>>    cglMirs.generateCuts(*siCgl, cs);
> >>> 
> >>> And, I get the error from Cplex:
> >>>   CPLEX Error  1217: No solution exists.
> >>> 
> >>> Note: I don't get that error with Cliques/Knap/Flow CGLs.
> >>> 
> >>> Any ideas?
> >>> 
> >>> Thanks,
> >>> Matt
> >>> 
> >>> _______________________________________________
> >>> Cgl mailing list
> >>> Cgl at list.coin-or.org
> >>> http://list.coin-or.org/mailman/listinfo/cgl
> >> 
> >> 
> >> --
> >> Dr. Ted Ralphs
> >> Associate Professor
> >> Industrial and Systems Engineering
> >> Lehigh University
> >> (610)758-4784
> >> tkralphs at lehigh.edu
> >> www.lehigh.edu/~tkr2
> >> 
> >> 
> >> 
> > _______________________________________________
> > Cgl mailing list
> > Cgl at list.coin-or.org
> > http://list.coin-or.org/mailman/listinfo/cgl
> >
> 
> -- 
>  		Matthew Saltzman
> 
> Clemson University Math Sciences
> mjs AT clemson DOT edu
> http://www.math.clemson.edu/~mjs
> 



More information about the Cgl mailing list