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/AbcSimplexPrimal.hpp

    r1910 r2385  
    2424
    2525public:
    26 
    27      /**@name Description of algorithm */
    28      //@{
    29      /** Primal algorithm
     26  /**@name Description of algorithm */
     27  //@{
     28  /** Primal algorithm
    3029
    3130         Method
     
    113112     */
    114113
    115      int primal(int ifValuesPass = 0, int startFinishOptions = 0);
    116      //@}
    117 
    118      /**@name For advanced users */
    119      //@{
    120      /// Do not change infeasibility cost and always say optimal
    121      void alwaysOptimal(bool onOff);
    122      bool alwaysOptimal() const;
    123      /** Normally outgoing variables can go out to slightly negative
     114  int primal(int ifValuesPass = 0, int startFinishOptions = 0);
     115  //@}
     116
     117  /**@name For advanced users */
     118  //@{
     119  /// Do not change infeasibility cost and always say optimal
     120  void alwaysOptimal(bool onOff);
     121  bool alwaysOptimal() const;
     122  /** Normally outgoing variables can go out to slightly negative
    124123         values (but within tolerance) - this is to help stability and
    125124         and degeneracy.  This can be switched off
    126125     */
    127      void exactOutgoing(bool onOff);
    128      bool exactOutgoing() const;
    129      //@}
    130 
    131      /**@name Functions used in primal */
    132      //@{
    133      /** This has the flow between re-factorizations
     126  void exactOutgoing(bool onOff);
     127  bool exactOutgoing() const;
     128  //@}
     129
     130  /**@name Functions used in primal */
     131  //@{
     132  /** This has the flow between re-factorizations
    134133
    135134         Returns a code to say where decision to exit was made
     
    143142         valuesOption has original value of valuesPass
    144143      */
    145      int whileIterating(int valuesOption);
    146 
    147      /** Do last half of an iteration.  This is split out so people can
     144  int whileIterating(int valuesOption);
     145
     146  /** Do last half of an iteration.  This is split out so people can
    148147         force incoming variable.  If solveType_ is 2 then this may
    149148         re-factorize while normally it would exit to re-factorize.
     
    163162         Returns ray in ray_
    164163     */
    165      int pivotResult(int ifValuesPass = 0);
    166      int pivotResult4(int ifValuesPass = 0);
    167 
    168 
    169      /** The primals are updated by the given array.
     164  int pivotResult(int ifValuesPass = 0);
     165  int pivotResult4(int ifValuesPass = 0);
     166
     167  /** The primals are updated by the given array.
    170168         Returns number of infeasibilities.
    171169         After rowArray will have cost changes for use next iteration
    172170     */
    173      int updatePrimalsInPrimal(CoinIndexedVector * rowArray,
    174                                double theta,
    175                                double & objectiveChange,
    176                                int valuesPass);
    177      /** The primals are updated by the given array.
     171  int updatePrimalsInPrimal(CoinIndexedVector *rowArray,
     172    double theta,
     173    double &objectiveChange,
     174    int valuesPass);
     175  /** The primals are updated by the given array.
    178176         costs are changed
    179177     */
    180      void updatePrimalsInPrimal(CoinIndexedVector & rowArray,
    181                                 double theta,bool valuesPass);
    182      /** After rowArray will have cost changes for use next iteration
    183      */
    184      void createUpdateDuals(CoinIndexedVector & rowArray,
    185                            const double * originalCost,
    186                             const double extraCost[4],
    187                            double & objectiveChange,
    188                            int valuesPass);
    189      /** Update minor candidate vector - new reduced cost returned
     178  void updatePrimalsInPrimal(CoinIndexedVector &rowArray,
     179    double theta, bool valuesPass);
     180  /** After rowArray will have cost changes for use next iteration
     181     */
     182  void createUpdateDuals(CoinIndexedVector &rowArray,
     183    const double *originalCost,
     184    const double extraCost[4],
     185    double &objectiveChange,
     186    int valuesPass);
     187  /** Update minor candidate vector - new reduced cost returned
    190188         later try and get change in reduced cost (then may not need sequence in)*/
    191      double updateMinorCandidate(const CoinIndexedVector & updateBy,
    192                                  CoinIndexedVector & candidate,
    193                                 int sequenceIn);
    194      /// Update partial Ftran by R update
    195      void updatePartialUpdate(CoinIndexedVector & partialUpdate);
     189  double updateMinorCandidate(const CoinIndexedVector &updateBy,
     190    CoinIndexedVector &candidate,
     191    int sequenceIn);
     192  /// Update partial Ftran by R update
     193  void updatePartialUpdate(CoinIndexedVector &partialUpdate);
    196194  /// Do FT update as separate function for minor iterations (nonzero return code on problems)
    197   int doFTUpdate(CoinIndexedVector * vector[4]);
    198      /**
     195  int doFTUpdate(CoinIndexedVector *vector[4]);
     196  /**
    199197         Row array has pivot column
    200198         This chooses pivot row.
     
    204202         If valuesPass non-zero then compute dj for direction
    205203     */
    206      void primalRow(CoinIndexedVector * rowArray,
    207                     CoinIndexedVector * rhsArray,
    208                     CoinIndexedVector * spareArray,
    209                     int valuesPass);
     204  void primalRow(CoinIndexedVector *rowArray,
     205    CoinIndexedVector *rhsArray,
     206    CoinIndexedVector *spareArray,
     207    int valuesPass);
    210208  typedef struct {
    211209    double theta_;
     
    227225    int valuesPass_;
    228226  } pivotStruct;
    229      void primalRow(CoinIndexedVector * rowArray,
    230                     CoinIndexedVector * rhsArray,
    231                     CoinIndexedVector * spareArray,
    232                     pivotStruct & stuff);
    233      /**
     227  void primalRow(CoinIndexedVector *rowArray,
     228    CoinIndexedVector *rhsArray,
     229    CoinIndexedVector *spareArray,
     230    pivotStruct &stuff);
     231  /**
    234232         Chooses primal pivot column
    235233         updateArray has cost updates (also use pivotRow_ from last iteration)
     
    238236         For easy problems we can just choose one of the first columns we look at
    239237     */
    240      void primalColumn(CoinPartitionedVector * updateArray,
    241                        CoinPartitionedVector * spareRow2,
    242                        CoinPartitionedVector * spareColumn1);
    243 
    244      /** Checks if tentative optimal actually means unbounded in primal
     238  void primalColumn(CoinPartitionedVector *updateArray,
     239    CoinPartitionedVector *spareRow2,
     240    CoinPartitionedVector *spareColumn1);
     241
     242  /** Checks if tentative optimal actually means unbounded in primal
    245243         Returns -3 if not, 2 if is unbounded */
    246      int checkUnbounded(CoinIndexedVector * ray, CoinIndexedVector * spare,
    247                         double changeCost);
    248      /**  Refactorizes if necessary
     244  int checkUnbounded(CoinIndexedVector *ray, CoinIndexedVector *spare,
     245    double changeCost);
     246  /**  Refactorizes if necessary
    249247          Checks if finished.  Updates status.
    250248          lastCleaned refers to iteration at which some objective/feasibility
     
    256254     */
    257255  void statusOfProblemInPrimal(int type);
    258      /// Perturbs problem (method depends on perturbation())
    259      void perturb(int type);
    260      /// Take off effect of perturbation and say whether to try dual
    261      bool unPerturb();
    262      /// Unflag all variables and return number unflagged
    263      int unflag();
    264      /** Get next superbasic -1 if none,
     256  /// Perturbs problem (method depends on perturbation())
     257  void perturb(int type);
     258  /// Take off effect of perturbation and say whether to try dual
     259  bool unPerturb();
     260  /// Unflag all variables and return number unflagged
     261  int unflag();
     262  /** Get next superbasic -1 if none,
    265263         Normal type is 1
    266264         If type is 3 then initializes sorted list
    267265         if 2 uses list.
    268266     */
    269      int nextSuperBasic(int superBasicType, CoinIndexedVector * columnArray);
    270 
    271      /// Create primal ray
    272      void primalRay(CoinIndexedVector * rowArray);
    273      /// Clears all bits and clears rowArray[1] etc
    274      void clearAll();
    275 
    276      /// Sort of lexicographic resolve
    277      int lexSolve();
    278 
    279      //@}
     267  int nextSuperBasic(int superBasicType, CoinIndexedVector *columnArray);
     268
     269  /// Create primal ray
     270  void primalRay(CoinIndexedVector *rowArray);
     271  /// Clears all bits and clears rowArray[1] etc
     272  void clearAll();
     273
     274  /// Sort of lexicographic resolve
     275  int lexSolve();
     276
     277  //@}
    280278};
    281279#endif
    282280
     281/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     282*/
Note: See TracChangeset for help on using the changeset viewer.