[Cgl] cgl, cpx, mir, error

Ted Ralphs tkralphs at lehigh.edu
Wed Apr 11 17:57:27 EDT 2007


That was basically what I was suggesting.

Cheers,

Ted

Matthew Galati wrote:
> As a temp fix, can't you just have a base implementation of getRowActivity( ) = Ax* in the base Osi class? Then, in things like OsiCpx, where it will otherwise fail - check for errors, if it fails, use the base implementation? It's slow, since you have to calculate Ax* each time you call that. But, its better than not working at all.
> 
> Matt
> 
> 
> 
> -----Original Message-----
> From: Ted Ralphs [mailto:tkralphs at Lehigh.EDU] 
> Sent: Wednesday, April 11, 2007 5:45 PM
> To: cgl at list.coin-or.org
> Cc: Matthew Galati
> Subject: Re: [Cgl] cgl, cpx, mir, error
> 
> One workaround is not to use OsiCpx :). I guess it wouldn't be that difficult to patch OsiCpx it so that it uses cached info. Or patch
> CglMixedIntegerRounding2 so that it doesn't make that call. But someone has to take the time to do it. If someone does, I'll try to get the matches in.
> 
> Cheers,
> 
> Ted
> 
> Ted Ralphs wrote:
>> 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


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


More information about the Cgl mailing list