Changeset 406


Ignore:
Timestamp:
Aug 18, 2004 6:10:00 AM (16 years ago)
Author:
forrest
Message:

bugs

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpSimplexDual.cpp

    r402 r406  
    24082408{
    24092409  bool normalType=true;
     2410  int numberPivots = factorization_->pivots();
    24102411  double realDualInfeasibilities=0.0;
    24112412  if (type==2) {
     
    29132914  if (tentativeStatus!=-2&&unflagVariables) {
    29142915    int iRow;
     2916    int numberFlagged=0;
    29152917    for (iRow=0;iRow<numberRows_;iRow++) {
    29162918      int iPivot=pivotVariable_[iRow];
     2919      if (flagged(iPivot))
     2920        numberFlagged++;
    29172921      clearFlagged(iPivot);
     2922    }
     2923    unflagVariables = numberFlagged>0;
     2924    if (numberFlagged&&!numberPivots) {
     2925      /* looks like trouble as we have not done any iterations.
     2926         Try changing pivot tolerance then give it a few goes and give up */
     2927      if (factorization_->pivotTolerance()<0.9) {
     2928        factorization_->pivotTolerance(0.99);
     2929      } else if (numberTimesOptimal_<10) {
     2930        numberTimesOptimal_++;
     2931      } else {
     2932        unflagVariables=false;
     2933        changeMade_=false;
     2934      }
    29182935    }
    29192936  }
  • trunk/Clp_C_Interface.cpp

    r399 r406  
    982982  return model->model_->getObjValue();
    983983}
    984 
     984/* Get variable basis info */
     985CLPLIBAPI const int CLPLINKAGE
     986Clp_getColumnStatus(Clp_Simplex * model,int sequence)
     987{
     988  return (int) model->model_->getColumnStatus(sequence);
     989}
     990/* Get row basis info */
     991CLPLIBAPI const int CLPLINKAGE
     992Clp_getRowStatus(Clp_Simplex * model,int sequence)
     993{
     994  return (int) model->model_->getRowStatus(sequence);
     995}
     996/* Small element value - elements less than this set to zero,
     997   default is 1.0e-20 */
     998CLPLIBAPI double CLPLINKAGE
     999Clp_getSmallElementValue(Clp_Simplex * model)
     1000{
     1001  return model->model_->getSmallElementValue();
     1002}
     1003CLPLIBAPI void CLPLINKAGE
     1004Clp_setSmallElementValue(Clp_Simplex * model,double value)
     1005{
     1006  model->model_->setSmallElementValue(value);
     1007}
     1008
  • trunk/include/Clp_C_Interface.h

    r279 r406  
    173173  /** Copy in status vector */
    174174  CLPLIBAPI void CLPLINKAGE Clp_copyinStatus(Clp_Simplex * model, const unsigned char * statusArray);
     175  /* Get variable basis info */
     176  CLPLIBAPI const int CLPLINKAGE Clp_getColumnStatus(Clp_Simplex * model,int sequence);
     177  /* Get row basis info */
     178  CLPLIBAPI const int CLPLINKAGE Clp_getRowStatus(Clp_Simplex * model,int sequence);
    175179 
    176180  /** User pointer for whatever reason */
     
    338342  /** Objective value */
    339343  CLPLIBAPI double CLPLINKAGE Clp_getObjValue(Clp_Simplex * model);
     344  /* Small element value - elements less than this set to zero,
     345     default is 1.0e-20 */
     346  CLPLIBAPI double CLPLINKAGE Clp_getSmallElementValue(Clp_Simplex * model);
     347  CLPLIBAPI void CLPLINKAGE Clp_setSmallElementValue(Clp_Simplex * model,double value);
    340348  /*@}*/
    341349#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.