Changeset 716


Ignore:
Timestamp:
Feb 1, 2006 5:14:47 PM (15 years ago)
Author:
forrest
Message:

to force correct algorithm for QP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpSolve.cpp

    r707 r716  
    519519      abort();
    520520    }
     521  }
     522#ifndef NO_RTTI
     523  ClpQuadraticObjective * quadraticObj = (dynamic_cast< ClpQuadraticObjective*>(objectiveAsObject()));
     524#else
     525  ClpQuadraticObjective * quadraticObj = NULL;
     526  if (objective_->type()==2)
     527    quadraticObj = (static_cast< ClpQuadraticObjective*>(objective_));
     528#endif
     529  // If quadratic then primal or barrier or slp
     530  if (quadraticObj) {
     531    doSprint=0;
     532    doIdiot=0;
     533    // off
     534    if (method==ClpSolve::useBarrier)
     535      method=ClpSolve::useBarrierNoCross;
     536    else if (method!=ClpSolve::useBarrierNoCross)
     537      method=ClpSolve::usePrimal;
    521538  }
    522539#ifdef COIN_HAS_VOL
     
    15361553      scale=true;
    15371554    }
    1538     // If quadratic force KKT
    1539 #ifndef NO_RTTI
    1540     ClpQuadraticObjective * quadraticObj = (dynamic_cast< ClpQuadraticObjective*>(barrier.objectiveAsObject()));
    1541 #else
    1542     ClpQuadraticObjective * quadraticObj = NULL;
    1543     if (objective_->type()==2)
    1544       quadraticObj = (static_cast< ClpQuadraticObjective*>(objective_));
    1545 #endif
    15461555#ifndef FAST_BARRIER
    15471556    if (!numberBarrier)
     
    15501559    numberBarrier++;
    15511560#endif
     1561    // If quadratic force KKT
    15521562    if (quadraticObj) {
    15531563      doKKT=true;
Note: See TracChangeset for help on using the changeset viewer.