Changeset 2467


Ignore:
Timestamp:
May 2, 2019 11:52:43 PM (3 weeks ago)
Author:
stefan
Message:

replace some huge param value bounds by actual INT_MAX or DBL_MAX

  • so user has a better chance to recognize unbounded parameters
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/CbcOrClpParam.cpp

    r2466 r2467  
    15391539    CbcOrClpParam p("allow!ableGap", "Stop when gap between best possible and \
    15401540best less than this",
    1541       0.0, 1.0e20, CBC_PARAM_DBL_ALLOWABLEGAP);
     1541      0.0, COIN_DBL_MAX, CBC_PARAM_DBL_ALLOWABLEGAP);
    15421542    p.setDoubleValue(0.0);
    15431543    p.setLonghelp(
     
    15601560  {
    15611561    CbcOrClpParam p("artif!icialCost", "Costs >= this treated as artificials in feasibility pump",
    1562       0.0, 1.0e100, CBC_PARAM_DBL_ARTIFICIALCOST, 1);
     1562      0.0, COIN_DBL_MAX, CBC_PARAM_DBL_ARTIFICIALCOST, 1);
    15631563    p.setDoubleValue(0.0);
    15641564    p.setLonghelp(
     
    18461846      "Interior point algorithms do not obtain a basic solution.\
    18471847 This option will crossover to a basic solution suitable for ranging or branch and cut.  With the current state \
    1848 of quadratic it may be a good idea to switch off crossover for quadratic (and maybe \
     1848of the solver for quadratic programs it may be a good idea to switch off crossover for this case (and maybe \
    18491849presolve as well) - the option 'maybe' does this.");
    18501850    parameters.push_back(p);
     
    18631863  {
    18641864    CbcOrClpParam p("cutD!epth", "Depth in tree at which to do cuts",
    1865       -1, 999999, CBC_PARAM_INT_CUTDEPTH);
     1865      -1, COIN_INT_MAX, CBC_PARAM_INT_CUTDEPTH);
    18661866    p.setLonghelp(
    18671867      "Cut generators may be off, on, on only at the root node, or on if they look useful. \
     
    18841884  {
    18851885    CbcOrClpParam p("cuto!ff", "Bound on the objective value for all solutions",
    1886       -1.0e100, 1.0e100, CBC_PARAM_DBL_CUTOFF);
     1886      -COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_CUTOFF);
    18871887    p.setDoubleValue(1.0e50);
    18881888    p.setLonghelp(
     
    19581958  {
    19591959    CbcOrClpParam p("dextra3", "Extra double parameter 3",
    1960       -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA3, 0);
     1960      -COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_DEXTRA3, 0);
    19611961    p.setDoubleValue(0.0);
    19621962    parameters.push_back(p);
     
    19641964  {
    19651965    CbcOrClpParam p("dextra4", "Extra double parameter 4",
    1966       -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA4, 0);
     1966      -COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_DEXTRA4, 0);
    19671967    p.setDoubleValue(0.0);
    19681968    parameters.push_back(p);
     
    19701970  {
    19711971    CbcOrClpParam p("dextra4", "Extra double parameter 5",
    1972       -1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA5, 0);
     1972      -COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_DEXTRA5, 0);
    19731973    p.setDoubleValue(0.0);
    19741974    parameters.push_back(p);
     
    22042204    CbcOrClpParam p("dualT!olerance", "For an optimal solution \
    22052205no dual infeasibility may exceed this value",
    2206       1.0e-20, 1.0e12, CLP_PARAM_DBL_DUALTOLERANCE);
     2206      1.0e-20, COIN_DBL_MAX, CLP_PARAM_DBL_DUALTOLERANCE);
    22072207    p.setLonghelp(
    22082208      "Normally the default tolerance is fine, but one may want to increase it a\
     
    23962396    CbcOrClpParam p("fix!OnDj", "Try heuristic based on fixing variables with \
    23972397reduced costs greater than this",
    2398       -1.0e20, 1.0e20, CBC_PARAM_DBL_DJFIX, 1);
     2398      -COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_DJFIX, 1);
    23992399    p.setLonghelp(
    24002400      "If this is set integer variables with reduced costs greater than this will be fixed \
     
    25452545  {
    25462546    CbcOrClpParam p("hOp!tions", "Heuristic options",
    2547       -9999999, 9999999, CBC_PARAM_INT_HOPTIONS, 1);
     2547      -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_HOPTIONS, 1);
    25482548    p.setIntValue(0);
    25492549    p.setLonghelp(
     
    25642564  {
    25652565    CbcOrClpParam p("idiot!Crash", "Whether to try idiot crash",
    2566       -1, 99999999, CLP_PARAM_INT_IDIOT);
     2566      -1, COIN_INT_MAX, CLP_PARAM_INT_IDIOT);
    25672567
    25682568    p.setLonghelp(
     
    25892589    CbcOrClpParam p("inc!rement", "A valid solution must be at least this \
    25902590much better than last integer solution",
    2591       -1.0e20, 1.0e20, CBC_PARAM_DBL_INCREMENT);
     2591      -COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_INCREMENT);
    25922592
    25932593    p.setLonghelp(
     
    26022602    CbcOrClpParam p("inf!easibilityWeight", "Each integer infeasibility is expected \
    26032603to cost this much",
    2604       0.0, 1.0e20, CBC_PARAM_DBL_INFEASIBILITYWEIGHT, 1);
     2604      0.0, COIN_DBL_MAX, CBC_PARAM_DBL_INFEASIBILITYWEIGHT, 1);
    26052605    p.setLonghelp(
    26062606      "A primitive way of deciding which node to explore next.  Satisfying each integer infeasibility is \
     
    27352735#ifndef COIN_HAS_CBC
    27362736    CbcOrClpParam p("log!Level", "Level of detail in Solver output",
    2737       -1, 999999, CLP_PARAM_INT_SOLVERLOGLEVEL);
     2737      -1, COIN_INT_MAX, CLP_PARAM_INT_SOLVERLOGLEVEL);
    27382738    parameters.push_back(p);
    27392739#else
     
    27592759    CbcOrClpParam p("maxF!actor", "Maximum number of iterations between \
    27602760refactorizations",
    2761       1, 999999, CLP_PARAM_INT_MAXFACTOR);
     2761      1, COIN_INT_MAX, CLP_PARAM_INT_MAXFACTOR);
    27622762    p.setLonghelp(
    27632763      "If this is left at its default value of 200 then CLP will guess a\
     
    27682768    CbcOrClpParam p("maxIt!erations", "Maximum number of iterations before \
    27692769stopping",
    2770       0, 2147483647, CLP_PARAM_INT_MAXITERATION);
     2770      0, COIN_INT_MAX, CLP_PARAM_INT_MAXITERATION);
    27712771    p.setLonghelp(
    27722772      "This can be used for testing purposes.  The corresponding library call\n\
     
    27792779  {
    27802780    CbcOrClpParam p("maxN!odes", "Maximum number of nodes to do",
    2781       -1, 2147483647, CBC_PARAM_INT_MAXNODES);
     2781      -1, COIN_INT_MAX, CBC_PARAM_INT_MAXNODES);
    27822782    p.setLonghelp(
    27832783      "This is a repeatable way to limit search.  Normally using time is easier \
     
    27872787  {
    27882788    CbcOrClpParam p("maxSaved!Solutions", "Maximum number of solutions to save",
    2789       0, 2147483647, CBC_PARAM_INT_MAXSAVEDSOLS);
     2789      0, COIN_INT_MAX, CBC_PARAM_INT_MAXSAVEDSOLS);
    27902790    p.setLonghelp(
    27912791      "Number of solutions to save.");
     
    27942794  {
    27952795    CbcOrClpParam p("maxSo!lutions", "Maximum number of feasible solutions to get",
    2796       1, 2147483647, CBC_PARAM_INT_MAXSOLS);
     2796      1, COIN_INT_MAX, CBC_PARAM_INT_MAXSOLS);
    27972797    p.setLonghelp(
    27982798      "You may want to stop after (say) two solutions or an hour.  \
     
    29302930  {
    29312931    CbcOrClpParam p("multiple!RootPasses", "Do multiple root passes to collect cuts and solutions",
    2932       0, 100000000, CBC_PARAM_INT_MULTIPLEROOTS, 0);
     2932      0, COIN_INT_MAX, CBC_PARAM_INT_MULTIPLEROOTS, 0);
    29332933    p.setIntValue(0);
    29342934    p.setLonghelp(
     
    30523052  {
    30533053    CbcOrClpParam p("objective!Scale", "Scale factor to apply to objective",
    3054       -1.0e20, 1.0e20, CLP_PARAM_DBL_OBJSCALE, 1);
     3054      -COIN_DBL_MAX, COIN_DBL_MAX, CLP_PARAM_DBL_OBJSCALE, 1);
    30553055    p.setLonghelp(
    30563056      "If the objective function has some very large values, you may wish to scale them\
     
    31333133  {
    31343134    CbcOrClpParam p("passC!uts", "Number of rounds that cut generators are applied in the root node",
    3135       -9999999, 9999999, CBC_PARAM_INT_CUTPASS);
     3135      -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_CUTPASS);
    31363136
    31373137    p.setIntValue(20);
     
    31633163  {
    31643164    CbcOrClpParam p("passT!reeCuts", "Number of rounds that cut generators are applied in the tree",
    3165       -9999999, 9999999, CBC_PARAM_INT_CUTPASSINTREE);
     3165      -COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_CUTPASSINTREE);
    31663166    p.setIntValue(1);
    31673167    p.setLonghelp("The default is to do one pass. A negative value -n means that n passes are also applied if the objective does not drop.");
     
    32823282  {
    32833283    CbcOrClpParam p("preT!olerance", "Tolerance to use in presolve",
    3284       1.0e-20, 1.0e12, CLP_PARAM_DBL_PRESOLVETOLERANCE);
     3284      1.0e-20, COIN_DBL_MAX, CLP_PARAM_DBL_PRESOLVETOLERANCE);
    32853285    p.setLonghelp(
    32863286      "One may want to increase this tolerance if presolve says the problem is \
     
    33273327    CbcOrClpParam p("primalT!olerance", "For a feasible solution \
    33283328no primal infeasibility, i.e., constraint violation, may exceed this value",
    3329       1.0e-20, 1.0e12, CLP_PARAM_DBL_PRIMALTOLERANCE);
     3329      1.0e-20, COIN_DBL_MAX, CLP_PARAM_DBL_PRIMALTOLERANCE);
    33303330    p.setLonghelp(
    33313331      "Normally the default tolerance is fine, but one may want to increase it a\
     
    33373337    CbcOrClpParam p("primalW!eight", "Initially algorithm acts as if it \
    33383338costs this much to be infeasible",
    3339       1.0e-20, 1.0e20, CLP_PARAM_DBL_PRIMALWEIGHT);
     3339      1.0e-20, COIN_DBL_MAX, CLP_PARAM_DBL_PRIMALWEIGHT);
    33403340    p.setLonghelp(
    33413341      "The primal algorithm in Clp is a single phase algorithm as opposed to a two phase\
     
    34643464  {
    34653465    CbcOrClpParam p("pumpC!utoff", "Fake cutoff for use in feasibility pump",
    3466       -1.0e100, 1.0e100, CBC_PARAM_DBL_FAKECUTOFF);
     3466      -COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_FAKECUTOFF);
    34673467    p.setDoubleValue(0.0);
    34683468    p.setLonghelp(
     
    34733473  {
    34743474    CbcOrClpParam p("pumpI!ncrement", "Fake increment for use in feasibility pump",
    3475       -1.0e100, 1.0e100, CBC_PARAM_DBL_FAKEINCREMENT, 1);
     3475      -COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_FAKEINCREMENT, 1);
    34763476    p.setDoubleValue(0.0);
    34773477    p.setLonghelp(
     
    35443544    CbcOrClpParam p("ratio!Gap", "Stop when gap between best possible and \
    35453545best known is less than this fraction of larger of two",
    3546       0.0, 1.0e20, CBC_PARAM_DBL_GAPRATIO);
     3546      0.0, COIN_DBL_MAX, CBC_PARAM_DBL_GAPRATIO);
    35473547    p.setDoubleValue(0.0);
    35483548    p.setLonghelp(
     
    35733573  {
    35743574    CbcOrClpParam p("reallyO!bjectiveScale", "Scale factor to apply to objective in place",
    3575       -1.0e20, 1.0e20, CLP_PARAM_DBL_OBJSCALE2, 0);
     3575      -COIN_DBL_MAX, COIN_DBL_MAX, CLP_PARAM_DBL_OBJSCALE2, 0);
    35763576    p.setLonghelp("You can set this to -1.0 to test maximization or other to stress code");
    35773577    p.setDoubleValue(1.0);
     
    36463646  {
    36473647    CbcOrClpParam p("rhs!Scale", "Scale factor to apply to rhs and bounds",
    3648       -1.0e20, 1.0e20, CLP_PARAM_DBL_RHSSCALE, 0);
     3648      -COIN_DBL_MAX, COIN_DBL_MAX, CLP_PARAM_DBL_RHSSCALE, 0);
    36493649    p.setLonghelp(
    36503650      "If the rhs or bounds have some very large meaningful values, you may wish to scale them\
     
    37363736  {
    37373737    CbcOrClpParam p("sec!onds", "Maximum seconds",
    3738       -1.0, 1.0e12, CLP_PARAM_DBL_TIMELIMIT);
     3738      -1.0, COIN_DBL_MAX, CLP_PARAM_DBL_TIMELIMIT);
    37393739
    37403740    p.setLonghelp("After this many seconds clp will act as if maximum iterations had been reached \
     
    37453745  {
    37463746    CbcOrClpParam p("sec!onds", "maximum seconds",
    3747       -1.0, 1.0e100, CBC_PARAM_DBL_TIMELIMIT_BAB);
     3747      -1.0, COIN_DBL_MAX, CBC_PARAM_DBL_TIMELIMIT_BAB);
    37483748    p.setLonghelp(
    37493749      "After this many seconds coin solver will act as if maximum nodes had been reached.");
     
    38643864  {
    38653865    CbcOrClpParam p("sprint!Crash", "Whether to try sprint crash",
    3866       -1, 5000000, CLP_PARAM_INT_SPRINT);
     3866      -1, COIN_INT_MAX, CLP_PARAM_INT_SPRINT);
    38673867    p.setLonghelp(
    38683868      "For long and thin problems this method may solve a series of small problems\
     
    39603960    CbcOrClpParam p("tighten!Factor", "Tighten bounds using this times largest \
    39613961activity at continuous solution",
    3962       1.0e-3, 1.0e20, CBC_PARAM_DBL_TIGHTENFACTOR, 0);
     3962      1.0e-3, COIN_DBL_MAX, CBC_PARAM_DBL_TIGHTENFACTOR, 0);
    39633963    p.setLonghelp(
    39643964      "This sleazy trick can help on some problems.");
     
    39863986  {
    39873987    CbcOrClpParam p("trust!PseudoCosts", "Number of branches before we trust pseudocosts",
    3988       -3, 2000000000, CBC_PARAM_INT_NUMBERBEFORE);
     3988      -3, COIN_INT_MAX, CBC_PARAM_INT_NUMBERBEFORE);
    39893989    p.setLonghelp(
    39903990      "Using strong branching computes pseudo-costs.  This parameter determines after how many branches for a variable we just \
     
    39973997  {
    39983998    CbcOrClpParam p("tune!PreProcess", "Dubious tuning parameters",
    3999       0, 2000000000, CLP_PARAM_INT_PROCESSTUNE, 1);
     3999      0, COIN_INT_MAX, CLP_PARAM_INT_PROCESSTUNE, 1);
    40004000    p.setLonghelp(
    40014001      "Format aabbcccc - \n If aa then this is number of major passes (i.e. with presolve) \n \
Note: See TracChangeset for help on using the changeset viewer.