[Coin-discuss] getDualRays
Matthew Galati
magh at lehigh.edu
Wed Sep 25 22:13:14 EDT 2002
hi folks - for OsiCpx has anyone written the call for getDualRays?
i wrote an app using BCP that bumped into it along this path...
my code works fine with Osl, not Cpx (the function has not been written
yet)
---------------
BCP_lp_main_loop.cpp:
// If we get here then we either
// - do not generate columns AND the lp value is below the ub
// - generate columns
if (tc & BCP_ProvenPrimalInf) {
if (p.param(BCP_lp_par::LpVerb_FathomInfo))
printf("LP: Primal feasibility lost.\n");
if (BCP_lp_fathom(p, from_repricing)) {
return;
}
---------------
BCP_lp_fathom.cpp
case BCP_GenerateColumns:
BCP_lp_check_ub(p);
if (p.param(BCP_lp_par::LpVerb_ColumnGenerationInfo))
printf("LP: Generating columns before fathoming/resolving\n");
BCP_vec<BCP_col*> cols_to_add;
BCP_vec<BCP_var*> vars_to_add;
if (lpres.termcode() & BCP_ProvenPrimalInf) { //##############
infeasible
// *FIXME* : change the hardcoded 10 into a parameter
std::vector<double*> dual_rays = p.lp_solver->getDualRays(10);
if (dual_rays.size() > 0) {
BCP_restore_feasibility(p, dual_rays, vars_to_add, cols_to_add);
for (i = dual_rays.size() - 1; i >= 0; --i) {
delete[] dual_rays[i];
}
Thanks,
Matt
--
Matthew Galati
Lehigh University, Bethlehem, PA - Operations Research, M.S.
Stetson University, Deland, FL - Mathematics, B.S.
Office Phone: 610-758-4042
Email: magh at lehigh.edu, magal11 at us.ibm.com
URL: http://www.lehigh.edu/~magh/magh.html
More information about the Coin-discuss
mailing list