| 1 | // Copyright (C) 2000, International Business Machines |
| 2 | // Corporation and others. All Rights Reserved. |
| 3 | // This code is licensed under the terms of the Eclipse Public License (EPL). |
| 4 | |
| 5 | #ifndef OsiSolverParameters_H |
| 6 | #define OsiSolverParameters_H |
| 7 | |
| 8 | enum OsiIntParam { |
| 9 | /** The maximum number of iterations (whatever that means for the given |
| 10 | solver) the solver can execute in the OsiSolverinterface::initialSolve() |
| 11 | and the OsiSolverinterface::resolve() methods before terminating. */ |
| 12 | OsiMaxNumIteration = 0, |
| 13 | /** The maximum number of iterations (whatever that means for the given |
| 14 | solver) the solver can execute in the |
| 15 | OsiSolverinterface::solveFromHotStart() method before terminating. */ |
| 16 | OsiMaxNumIterationHotStart, |
| 17 | /** The name discipline; specifies how the solver will handle row and |
| 18 | column names. |
| 19 | - 0: Auto names: Names cannot be set by the client. Names of the form |
| 20 | Rnnnnnnn or Cnnnnnnn are generated on demand when a name for a |
| 21 | specific row or column is requested; nnnnnnn is derived from the row |
| 22 | or column index. Requests for a vector of names return a vector with |
| 23 | zero entries. |
| 24 | - 1: Lazy names: Names supplied by the client are retained. Names of the |
| 25 | form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been |
| 26 | supplied by the client. Requests for a vector of names return a |
| 27 | vector sized to the largest index of a name supplied by the client; |
| 28 | some entries in the vector may be null strings. |
| 29 | - 2: Full names: Names supplied by the client are retained. Names of the |
| 30 | form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been |
| 31 | supplied by the client. Requests for a vector of names return a |
| 32 | vector sized to match the constraint system, and all entries will |
| 33 | contain either the name specified by the client or a generated name. |
| 34 | */ |
| 35 | OsiNameDiscipline, |
| 36 | /** Just a marker, so that OsiSolverInterface can allocate a static sized |
| 37 | array to store parameters. */ |
| 38 | OsiLastIntParam |
| 39 | }; |
| 40 | |
| 41 | enum OsiDblParam { |
| 42 | /** Dual objective limit. This is to be used as a termination |
| 43 | criteria in methods where the dual objective monotonically changes |
| 44 | (e.g., dual simplex, the volume algorithm) */ |
| 45 | OsiDualObjectiveLimit = 0, |
| 46 | /** Primal objective limit. This is to be used as a termination |
| 47 | criteria in methods where the primal objective monotonically changes |
| 48 | (e.g., primal simplex) */ |
| 49 | OsiPrimalObjectiveLimit, |
| 50 | /** The maximum amount the dual constraints can be violated and still be |
| 51 | considered feasible. */ |
| 52 | OsiDualTolerance, |
| 53 | /** The maximum amount the primal constraints can be violated and still be |
| 54 | considered feasible. */ |
| 55 | OsiPrimalTolerance, |
| 56 | /** The value of any constant term in the objective function. */ |
| 57 | OsiObjOffset, |
| 58 | /** Just a marker, so that OsiSolverInterface can allocate a static sized |
| 59 | array to store parameters. */ |
| 60 | OsiLastDblParam |
| 61 | }; |
| 62 | |
| 63 | |
| 64 | enum OsiStrParam { |
| 65 | /** Name of the problem. This is the found on the Name card of |
| 66 | an mps file. */ |
| 67 | OsiProbName = 0, |
| 68 | /** Name of the solver. This parameter is not settable. */ |
| 69 | OsiSolverName, |
| 70 | /** Just a marker, so that OsiSolverInterface can allocate a static sized |
| 71 | array to store parameters. */ |
| 72 | OsiLastStrParam |
| 73 | }; |
| 74 | |
| 75 | enum OsiHintParam { |
| 76 | /** Whether to do a presolve in initialSolve */ |
| 77 | OsiDoPresolveInInitial = 0, |
| 78 | /** Whether to use a dual algorithm in initialSolve. |
| 79 | The reverse is to use a primal algorithm */ |
| 80 | OsiDoDualInInitial, |
| 81 | /** Whether to do a presolve in resolve */ |
| 82 | OsiDoPresolveInResolve, |
| 83 | /** Whether to use a dual algorithm in resolve. |
| 84 | The reverse is to use a primal algorithm */ |
| 85 | OsiDoDualInResolve, |
| 86 | /** Whether to scale problem */ |
| 87 | OsiDoScale, |
| 88 | /** Whether to create a non-slack basis (only in initialSolve) */ |
| 89 | OsiDoCrash, |
| 90 | /** Whether to reduce amount of printout, e.g., for branch and cut */ |
| 91 | OsiDoReducePrint, |
| 92 | /** Whether we are in branch and cut - so can modify behavior */ |
| 93 | OsiDoInBranchAndCut, |
| 94 | /** Just a marker, so that OsiSolverInterface can allocate a static sized |
| 95 | array to store parameters. */ |
| 96 | OsiLastHintParam |
| 97 | }; |
| 98 | |
| 99 | enum OsiHintStrength { |
| 100 | /** Ignore hint (default) */ |
| 101 | OsiHintIgnore = 0, |
| 102 | /** This means it is only a hint */ |
| 103 | OsiHintTry, |
| 104 | /** This means do hint if at all possible */ |
| 105 | OsiHintDo, |
| 106 | /** And this means throw an exception if not possible */ |
| 107 | OsiForceDo |
| 108 | }; |
| 109 | |
| 110 | #endif |
| 111 | |