Ignore:
Timestamp:
Jan 29, 2010 9:25:07 AM (10 years ago)
Author:
forrest
Message:

moving sandbox stuff to trunk

File:
1 edited

Legend:

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

    r1370 r1502  
    1010*/
    1111enum ClpIntParam {
    12    /** The maximum number of iterations Clp can execute in the simplex methods
     12    /** The maximum number of iterations Clp can execute in the simplex methods
     13     */
     14    ClpMaxNumIteration = 0,
     15    /** The maximum number of iterations Clp can execute in hotstart before
     16        terminating */
     17    ClpMaxNumIterationHotStart,
     18    /** The name discipline; specifies how the solver will handle row and
     19        column names.
     20      - 0: Auto names: Names cannot be set by the client. Names of the form
     21       Rnnnnnnn or Cnnnnnnn are generated on demand when a name for a
     22       specific row or column is requested; nnnnnnn is derived from the row
     23       or column index. Requests for a vector of names return a vector with
     24       zero entries.
     25      - 1: Lazy names: Names supplied by the client are retained. Names of the
     26       form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been
     27       supplied by the client. Requests for a vector of names return a
     28       vector sized to the largest index of a name supplied by the client;
     29       some entries in the vector may be null strings.
     30      - 2: Full names: Names supplied by the client are retained. Names of the
     31       form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been
     32       supplied by the client. Requests for a vector of names return a
     33       vector sized to match the constraint system, and all entries will
     34       contain either the name specified by the client or a generated name.
    1335    */
    14   ClpMaxNumIteration = 0,
    15   /** The maximum number of iterations Clp can execute in hotstart before
    16       terminating */
    17   ClpMaxNumIterationHotStart,
    18   /** The name discipline; specifies how the solver will handle row and
    19       column names.
    20     - 0: Auto names: Names cannot be set by the client. Names of the form
    21          Rnnnnnnn or Cnnnnnnn are generated on demand when a name for a
    22          specific row or column is requested; nnnnnnn is derived from the row
    23          or column index. Requests for a vector of names return a vector with
    24          zero entries.
    25     - 1: Lazy names: Names supplied by the client are retained. Names of the
    26          form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been
    27          supplied by the client. Requests for a vector of names return a
    28          vector sized to the largest index of a name supplied by the client;
    29          some entries in the vector may be null strings.
    30     - 2: Full names: Names supplied by the client are retained. Names of the
    31          form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been
    32          supplied by the client. Requests for a vector of names return a
    33          vector sized to match the constraint system, and all entries will
    34          contain either the name specified by the client or a generated name.
    35   */
    36   ClpNameDiscipline,
    37   /** Just a marker, so that we can allocate a static sized array to store
    38       parameters. */
    39   ClpLastIntParam
     36    ClpNameDiscipline,
     37    /** Just a marker, so that we can allocate a static sized array to store
     38        parameters. */
     39    ClpLastIntParam
    4040};
    4141
    4242enum ClpDblParam {
    43   /** Set Dual objective limit. This is to be used as a termination criteria
    44       in methods where the dual objective monotonically changes (dual
    45       simplex). */
    46   ClpDualObjectiveLimit,
    47   /** Primal objective limit. This is to be used as a termination
    48       criteria in methods where the primal objective monotonically changes
    49       (e.g., primal simplex) */
    50   ClpPrimalObjectiveLimit,
    51   /** The maximum amount the dual constraints can be violated and still be
    52       considered feasible. */
    53   ClpDualTolerance,
    54   /** The maximum amount the primal constraints can be violated and still be
    55       considered feasible. */
    56   ClpPrimalTolerance,
    57   /** Objective function constant. This the value of the constant term in
    58       the objective function. */
    59   ClpObjOffset,
    60   /// Maximum time in seconds - after this action is as max iterations
    61   ClpMaxSeconds,
    62   /// Tolerance to use in presolve
    63   ClpPresolveTolerance,
    64   /** Just a marker, so that we can allocate a static sized array to store
    65       parameters. */
    66   ClpLastDblParam
     43    /** Set Dual objective limit. This is to be used as a termination criteria
     44        in methods where the dual objective monotonically changes (dual
     45        simplex). */
     46    ClpDualObjectiveLimit,
     47    /** Primal objective limit. This is to be used as a termination
     48        criteria in methods where the primal objective monotonically changes
     49        (e.g., primal simplex) */
     50    ClpPrimalObjectiveLimit,
     51    /** The maximum amount the dual constraints can be violated and still be
     52        considered feasible. */
     53    ClpDualTolerance,
     54    /** The maximum amount the primal constraints can be violated and still be
     55        considered feasible. */
     56    ClpPrimalTolerance,
     57    /** Objective function constant. This the value of the constant term in
     58        the objective function. */
     59    ClpObjOffset,
     60    /// Maximum time in seconds - after this action is as max iterations
     61    ClpMaxSeconds,
     62    /// Tolerance to use in presolve
     63    ClpPresolveTolerance,
     64    /** Just a marker, so that we can allocate a static sized array to store
     65        parameters. */
     66    ClpLastDblParam
    6767};
    6868
    6969
    7070enum ClpStrParam {
    71   /** Name of the problem. This is the found on the Name card of
    72       an mps file. */
    73   ClpProbName = 0,
    74   /** Just a marker, so that we can allocate a static sized array to store
    75       parameters. */
    76   ClpLastStrParam
     71    /** Name of the problem. This is the found on the Name card of
     72        an mps file. */
     73    ClpProbName = 0,
     74    /** Just a marker, so that we can allocate a static sized array to store
     75        parameters. */
     76    ClpLastStrParam
    7777};
    7878
     
    8181ClpDisjointCopyN( const T * array, const int size, T * newArray)
    8282{
    83   memcpy(reinterpret_cast<void *> (newArray),array,size*sizeof(T));
     83    memcpy(reinterpret_cast<void *> (newArray), array, size*sizeof(T));
    8484}
    8585/// And set
     
    8787ClpFillN( T * array, const int size, T value)
    8888{
    89   int i;
    90   for (i=0;i<size;i++)
    91     array[i]=value;
     89    int i;
     90    for (i = 0; i < size; i++)
     91        array[i] = value;
    9292}
    9393/// This returns a non const array filled with input from scalar or actual array
     
    9595ClpCopyOfArray( const T * array, const int size, T value)
    9696{
    97   T * arrayNew = new T[size];
    98   if (array)
    99     ClpDisjointCopyN(array,size,arrayNew);
    100   else
    101     ClpFillN ( arrayNew, size,value);
    102   return arrayNew;
     97    T * arrayNew = new T[size];
     98    if (array)
     99        ClpDisjointCopyN(array, size, arrayNew);
     100    else
     101        ClpFillN ( arrayNew, size, value);
     102    return arrayNew;
    103103}
    104104
     
    107107ClpCopyOfArray( const T * array, const int size)
    108108{
    109   if (array) {
    110     T * arrayNew = new T[size];
    111     ClpDisjointCopyN(array,size,arrayNew);
    112     return arrayNew;
    113   } else {
    114     return NULL;
    115   }
     109    if (array) {
     110        T * arrayNew = new T[size];
     111        ClpDisjointCopyN(array, size, arrayNew);
     112        return arrayNew;
     113    } else {
     114        return NULL;
     115    }
    116116}
    117117/// For a structure to be used by trusted code
    118118typedef struct {
    119   int typeStruct; // allocated as 1,2 etc
    120   int typeCall;
    121   void * data;
     119    int typeStruct; // allocated as 1,2 etc
     120    int typeCall;
     121    void * data;
    122122} ClpTrustedData;
    123123#endif
Note: See TracChangeset for help on using the changeset viewer.