Ignore:
Timestamp:
Jan 6, 2019 2:43:06 PM (4 months ago)
Author:
unxusr
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/AbcSimplexDual.hpp

    r1910 r2385  
    1616#undef ABC_PARALLEL
    1717#define ABC_PARALLEL 2
    18 #undef cilk_for 
     18#undef cilk_for
    1919#undef cilk_spawn
    2020#undef cilk_sync
     
    4848
    4949class AbcSimplexDual : public AbcSimplex {
    50  
     50
    5151public:
    52  
    5352  /**@name Description of algorithm */
    5453  //@{
     
    141140      for use of exotic parameter startFinishoptions see Abcsimplex.hpp
    142141  */
    143  
     142
    144143  int dual();
    145144  /** For strong branching.  On input lower and upper are new bounds
     
    151150      status and number of iterations
    152151  */
    153   int strongBranching(int numberVariables, const int * variables,
    154                       double * newLower, double * newUpper,
    155                       double ** outputSolution,
    156                       int * outputStatus, int * outputIterations,
    157                       bool stopOnFirstInfeasible = true,
    158                       bool alwaysFinish = false,
    159                       int startFinishOptions = 0);
     152  int strongBranching(int numberVariables, const int *variables,
     153    double *newLower, double *newUpper,
     154    double **outputSolution,
     155    int *outputStatus, int *outputIterations,
     156    bool stopOnFirstInfeasible = true,
     157    bool alwaysFinish = false,
     158    int startFinishOptions = 0);
    160159  /// This does first part of StrongBranching
    161   AbcSimplexFactorization * setupForStrongBranching(char * arrays, int numberRows,
    162                                                     int numberColumns, bool solveLp = false);
     160  AbcSimplexFactorization *setupForStrongBranching(char *arrays, int numberRows,
     161    int numberColumns, bool solveLp = false);
    163162  /// This cleans up after strong branching
    164   void cleanupAfterStrongBranching(AbcSimplexFactorization * factorization);
     163  void cleanupAfterStrongBranching(AbcSimplexFactorization *factorization);
    165164  //@}
    166  
     165
    167166  /**@name Functions used in dual */
    168167  //@{
     
    181180  */
    182181  int whileIteratingSerial();
    183 #if ABC_PARALLEL==1
     182#if ABC_PARALLEL == 1
    184183  int whileIteratingThread();
    185184#endif
    186 #if ABC_PARALLEL==2
     185#if ABC_PARALLEL == 2
    187186  int whileIteratingCilk();
    188187#endif
     
    198197  int getTableauColumnFlipAndStartReplaceSerial();
    199198  void getTableauColumnPart1Serial();
    200 #if ABC_PARALLEL==1
     199#if ABC_PARALLEL == 1
    201200  /// Create dual pricing vector
    202201  void createDualPricingVectorThread();
     
    204203  void getTableauColumnPart1Thread();
    205204#endif
    206 #if ABC_PARALLEL==2
     205#if ABC_PARALLEL == 2
    207206  /// Create dual pricing vector
    208207  void createDualPricingVectorCilk();
     
    237236     Can do all (if tableauRow created)
    238237  */
    239   void dualColumn1(bool doAll=false);
     238  void dualColumn1(bool doAll = false);
    240239  /**
    241240     Array has tableau row (row section)
     
    252251  */
    253252  void dualColumn2();
    254   void dualColumn2Most(dualColumnResult & result);
    255   void dualColumn2First(dualColumnResult & result);
     253  void dualColumn2Most(dualColumnResult &result);
     254  void dualColumn2First(dualColumnResult &result);
    256255  /**
    257256     Chooses part of incoming
     
    259258     If necessary will modify costs
    260259  */
    261   void dualColumn2(dualColumnResult & result);
     260  void dualColumn2(dualColumnResult &result);
    262261  /**
    263262     This sees what is best thing to do in branch and bound cleanup
    264263     If sequenceIn_ < 0 then can't do anything
    265264  */
    266   void checkPossibleCleanup(CoinIndexedVector * array);
     265  void checkPossibleCleanup(CoinIndexedVector *array);
    267266  /**
    268267     Chooses dual pivot row
     
    279278      fills cost of change vector
    280279  */
    281   int changeBounds(int initialize, double & changeCost);
     280  int changeBounds(int initialize, double &changeCost);
    282281  /** As changeBounds but just changes new bounds for a single variable.
    283282      Returns true if change */
    284   bool changeBound( int iSequence);
     283  bool changeBound(int iSequence);
    285284  /// Restores bound to original bound
    286285  void originalBound(int iSequence);
    287286  /** Checks if tentative optimal actually means unbounded in dual
    288287      Returns -3 if not, 2 if is unbounded */
    289   int checkUnbounded(CoinIndexedVector & ray, double changeCost);
     288  int checkUnbounded(CoinIndexedVector &ray, double changeCost);
    290289  /**  Refactorizes if necessary
    291290       Checks if finished.  Updates status.
     
    313312  void perturb(double factor);
    314313  /// Perturbs problem B
    315   void perturbB(double factor,int type);
     314  void perturbB(double factor, int type);
    316315  /// Make non free variables dual feasible by moving to a bound
    317   int makeNonFreeVariablesDualFeasible(bool changeCosts=false);
     316  int makeNonFreeVariablesDualFeasible(bool changeCosts = false);
    318317  int fastDual(bool alwaysFinish = false);
    319318  /** Checks number of variables at fake bounds.  This is used by fastDual
    320319      so can exit gracefully before end */
    321320  int numberAtFakeBound();
    322  
     321
    323322  /** Pivot in a variable and choose an outgoing one.  Assumes dual
    324323      feasible - will not go through a reduced cost.  Returns step length in theta
     
    330329  /// Startup part of dual
    331330  void startupSolve();
    332   /// Ending part of dual 
     331  /// Ending part of dual
    333332  void finishSolve();
    334333  void gutsOfDual();
    335334  //int dual2(int ifValuesPass,int startFinishOptions=0);
    336335  int resetFakeBounds(int type);
    337  
     336
    338337  //@}
    339338};
    340 #if ABC_PARALLEL==1
    341 void * abc_parallelManager(void * simplex);
    342 #endif
    343 #endif
     339#if ABC_PARALLEL == 1
     340void *abc_parallelManager(void *simplex);
     341#endif
     342#endif
     343
     344/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     345*/
Note: See TracChangeset for help on using the changeset viewer.