Changeset 633


Ignore:
Timestamp:
May 31, 2005 4:29:51 AM (15 years ago)
Author:
forrest
Message:

Cadd setStatsuVS: ----------------------------------------------------------------------

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp_C_Interface.cpp

    r441 r633  
    10431043{
    10441044  return (int) model->model_->getRowStatus(sequence);
     1045}
     1046/* Set variable basis info */
     1047COINLIBAPI void COINLINKAGE
     1048Clp_setColumnStatus(Clp_Simplex * model,int sequence, int value)
     1049{
     1050  if (value>=0&&value<=5) {
     1051    model->model_->setColumnStatus(sequence,(ClpSimplex::Status) value );
     1052    if (value==3||value==5)
     1053      model->model_->primalColumnSolution()[sequence]=
     1054        model->model_->columnLower()[sequence];
     1055    else if (value==2)
     1056      model->model_->primalColumnSolution()[sequence]=
     1057        model->model_->columnUpper()[sequence];
     1058  }
     1059}
     1060/* Set row basis info */
     1061COINLIBAPI void COINLINKAGE
     1062Clp_setRowStatus(Clp_Simplex * model,int sequence, int value)
     1063{
     1064  if (value>=0&&value<=5) {
     1065    model->model_->setRowStatus(sequence,(ClpSimplex::Status) value );
     1066    if (value==3||value==5)
     1067      model->model_->primalRowSolution()[sequence]=
     1068        model->model_->rowLower()[sequence];
     1069    else if (value==2)
     1070      model->model_->primalRowSolution()[sequence]=
     1071        model->model_->rowUpper()[sequence];
     1072  }
    10451073}
    10461074/* Small element value - elements less than this set to zero,
  • trunk/include/Clp_C_Interface.h

    r429 r633  
    194194  /** Copy in status vector */
    195195  COINLIBAPI void COINLINKAGE Clp_copyinStatus(Clp_Simplex * model, const unsigned char * statusArray);
     196  /* status values are as in ClpSimplex.hpp i.e. 0 - free, 1 basic, 2 at upper,
     197     3 at lower, 4 superbasic, (5 fixed) */
    196198  /* Get variable basis info */
    197199  COINLIBAPI const int COINLINKAGE Clp_getColumnStatus(Clp_Simplex * model,int sequence);
    198200  /* Get row basis info */
    199201  COINLIBAPI const int COINLINKAGE Clp_getRowStatus(Clp_Simplex * model,int sequence);
     202  /* Set variable basis info (and value if at bound) */
     203  COINLIBAPI void COINLINKAGE Clp_setColumnStatus(Clp_Simplex * model,
     204                                                  int sequence, int value);
     205  /* Set row basis info (and value if at bound) */
     206  COINLIBAPI void COINLINKAGE Clp_setRowStatus(Clp_Simplex * model,
     207                                               int sequence, int value);
    200208 
    201209  /** User pointer for whatever reason */
Note: See TracChangeset for help on using the changeset viewer.