Changeset 2468 for stable/1.17/Clp/src/CbcOrClpParam.cpp
 Timestamp:
 May 3, 2019 12:31:14 AM (6 months ago)
 Location:
 stable/1.17
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

stable/1.17
 Property svn:mergeinfo changed
/trunk merged: 2452,24572467
 Property svn:mergeinfo changed

stable/1.17/Clp
 Property svn:mergeinfo changed
/trunk/Clp merged: 2452,24572460,24622464,24662467
 Property svn:mergeinfo changed

stable/1.17/Clp/src
 Property svn:mergeinfo changed
/trunk/Clp/src merged: 2452,24582460,24622464,24662467
 Property svn:mergeinfo changed

stable/1.17/Clp/src/CbcOrClpParam.cpp
r2449 r2468 50 50 static bool doPrinting = true; 51 51 static std::string afterEquals = ""; 52 static char printArray[2 00];52 static char printArray[250]; 53 53 #if COIN_INT_MAX == 0 54 54 #undef COIN_INT_MAX … … 482 482 void CbcOrClpParam::printLongHelp() const 483 483 { 484 if (type_ >= 1 && type_ < 400) {484 if (type_ >= 1 && type_ < 600) { 485 485 CoinReadPrintit(longHelp_.c_str()); 486 486 if (type_ < CLP_PARAM_INT_SOLVERLOGLEVEL) { … … 626 626 case CLP_PARAM_DBL_RHSSCALE: 627 627 value = model>rhsScale(); 628 break; 629 case CLP_PARAM_DBL_PRESOLVETOLERANCE: 630 value = model>presolveTolerance(); 628 631 break; 629 632 default: … … 761 764 #ifdef COIN_HAS_CBC 762 765 double 763 CbcOrClpParam::doubleParameter(OsiSolverInterface * 764 #ifndef NDEBUG 765 model 766 #endif 767 ) const 766 CbcOrClpParam::doubleParameter(OsiSolverInterface *model) const 768 767 { 769 768 double value = 0.0; 770 769 switch (type_) { 771 770 case CLP_PARAM_DBL_DUALTOLERANCE: 772 assert(model>getDblParam(OsiDualTolerance, value));771 model>getDblParam(OsiDualTolerance, value); 773 772 break; 774 773 case CLP_PARAM_DBL_PRIMALTOLERANCE: 775 assert(model>getDblParam(OsiPrimalTolerance, value));774 model>getDblParam(OsiPrimalTolerance, value); 776 775 break; 777 776 default: … … 1496 1495 parameters.push_back(CbcOrClpParam("", "From stdin", CLP_PARAM_ACTION_STDIN, 3, 0)); 1497 1496 1497 // some help strings that repeat for many options 1498 #define CUTS_LONGHELP \ 1499 "Value 'on' enables the cut generator and CBC will try it in the branch and cut tree (see cutDepth on how to fine tune the behavior). " \ 1500 "Value 'root' lets CBC run the cut generator generate only at the root node. " \ 1501 "Value 'ifmove' lets CBC use the cut generator in the tree if it looks as if it is doing some good and moves the objective value. " \ 1502 "Value 'forceon' turns on the cut generator and forces CBC to use it at every node." 1503 #define HEURISTICS_LONGHELP \ 1504 "Value 'on' means to use the heuristic in each node of the tree, i.e. after preprocessing. " \ 1505 "Value 'before' means use the heuristic only if option doHeuristics is used. " \ 1506 "Value 'both' means to use the heuristic if option doHeuristics is used and during solve." 1507 1498 1508 #if defined(ABC_INHERIT)  ABOCA_LITE 1499 1509 CbcOrClpParam paramAboca("abc", "Whether to visit Aboca", "off", CLP_PARAM_STR_ABCWANTED, 7, 0); … … 1529 1539 CbcOrClpParam p("allow!ableGap", "Stop when gap between best possible and \ 1530 1540 best less than this", 1531 0.0, 1.0e20, CBC_PARAM_DBL_ALLOWABLEGAP);1541 0.0, COIN_DBL_MAX, CBC_PARAM_DBL_ALLOWABLEGAP); 1532 1542 p.setDoubleValue(0.0); 1533 1543 p.setLonghelp( 1534 "If the gap between best solution andbest possible solution is less than this \1535 then the search will be terminated. Also see ratioGap.");1544 "If the gap between best known solution and the best possible solution is less than this \ 1545 value, then the search will be terminated. Also see ratioGap."); 1536 1546 parameters.push_back(p); 1537 1547 } … … 1550 1560 { 1551 1561 CbcOrClpParam p("artif!icialCost", "Costs >= this treated as artificials in feasibility pump", 1552 0.0, 1.0e100, CBC_PARAM_DBL_ARTIFICIALCOST, 1);1562 0.0, COIN_DBL_MAX, CBC_PARAM_DBL_ARTIFICIALCOST, 1); 1553 1563 p.setDoubleValue(0.0); 1554 1564 p.setLonghelp( … … 1618 1628 Look at output to see which cuts were effective and then do some tuning. You will see that the \ 1619 1629 options for cuts are off, on, root and ifmove, forceon. Off is \ 1620 obvious, on means that this cut generator will be tried in the branch and cut tree (you can fine tune using \ 1621 'depth'). Root means just at the root node while 'ifmove' means that cuts will be used in the tree if they \ 1622 look as if they are doing some good and moving the objective value. Forceon is same as on but forces code to use \ 1623 cut generator at every node. For probing forceonbut just does fixing probing in tree  not strengthening etc. \ 1630 obvious. " CUTS_LONGHELP " For probing, forceonbut just does fixing probing in tree  not strengthening etc. \ 1624 1631 If preprocessing reduced the size of the \ 1625 1632 problem or strengthened many coefficients then it is probably wise to leave it on. Switch off heuristics \ … … 1704 1711 p.append("forceOn"); 1705 1712 p.append("onglobal"); 1706 p.setLonghelp( 1707 "This switches on clique cuts (either at root or in entire tree) \ 1708 See branchAndCut for information on options."); 1713 p.setLonghelp(CUTS_LONGHELP 1714 " Reference: https://github.com/coinor/Cgl/wiki/CglClique"); 1709 1715 1710 1716 parameters.push_back(p); … … 1721 1727 p.append("beforequick"); 1722 1728 p.setLonghelp( 1723 "This switches on a heuristic which does branch and cut on the problem givenby just \1729 "This heuristic does branch and cut on given problem by just \ 1724 1730 using variables which have appeared in one or more solutions. \ 1725 It obviously only tries after two or more solutions. \1726 See Rounding for meaning of on,both,before");1731 It is obviously only tried after two or more solutions have been found. " 1732 HEURISTICS_LONGHELP); 1727 1733 1728 1734 parameters.push_back(p); … … 1735 1741 p.append("before"); 1736 1742 p.setLonghelp( 1737 "This switches on a heuristic whichdoes branch and cut on the problem given by \1743 "This heuristic does branch and cut on the problem given by \ 1738 1744 fixing variables which have same value in two or more solutions. \ 1739 It obviously only tries after two or more solutions. \1740 See Rounding for meaning of on,both,before");1745 It obviously only tries after two or more solutions. " 1746 HEURISTICS_LONGHELP); 1741 1747 parameters.push_back(p); 1742 1748 } … … 1750 1756 p.append("conflict"); 1751 1757 p.setLonghelp( 1752 "This adds the objective as a constraint with best solution as RHS"); 1753 parameters.push_back(p); 1754 } 1755 { 1756 CbcOrClpParam p("cost!Strategy", "How to use costs as priorities", 1758 "For some problems, cut generators and general branching work better if the problem would be infeasible if the cost is too high. " 1759 "If this option is enabled, the objective function is added as a constraint which right hand side is set to the current cutoff value (objective value of best known solution)"); 1760 parameters.push_back(p); 1761 } 1762 { 1763 CbcOrClpParam p("cost!Strategy", "How to use costs for branching priorities", 1757 1764 "off", CBC_PARAM_STR_COSTSTRATEGY); 1758 1765 … … 1766 1773 p.append("general!Force?"); 1767 1774 p.setLonghelp( 1768 "This orders the variables in order of their absolute costs  with largest cost ones being branched on \ 1769 first. This primitive strategy can be surprsingly effective. The column order\ 1770 option is obviously not on costs but easy to code here."); 1775 "Value 'priorities' assigns highest priority to variables with largest absolute cost. This primitive strategy can be surprisingly effective. " 1776 "Value 'columnorder' assigns the priorities 1, 2, 3, ... with respect to the column ordering. " 1777 "Value '01first' ('01last') assignes two sets of priorities such that binary variables get high (low) priority. " 1778 "Value 'length' assigns high priority to variables that occur in many equations. "); 1771 1779 1772 1780 parameters.push_back(p); … … 1822 1830 #endif 1823 1831 p.setLonghelp( 1824 "If crash is set onand there is an all slack basis then Clp will flip or put structural\1825 variables into basis with the aim of getting dual feasible. On the whole dual seems to be\1826 better without it and there are alternative types of 'crash' for primal e.g. 'idiot' or 'sprint'. \1827 I have also added a variant due to Solow and Halim which is as on but just flip.");1828 1829 parameters.push_back(p); 1830 } 1831 { 1832 CbcOrClpParam p("cross!over", "Whether to get a basic solution after barrier",1832 "If crash is set to 'on' and there is an all slack basis then Clp will flip or put structural\ 1833 variables into the basis with the aim of getting dual feasible. On average, dual simplex seems to perform\ 1834 better without it and there are alternative types of 'crash' for primal simplex, e.g. 'idiot' or 'sprint'. \ 1835 A variant due to Solow and Halim which is as 'on' but just flips is also available."); 1836 1837 parameters.push_back(p); 1838 } 1839 { 1840 CbcOrClpParam p("cross!over", "Whether to get a basic solution with the simplex algorithm after the barrier algorithm finished", 1833 1841 "on", CLP_PARAM_STR_CROSSOVER); 1834 1842 p.append("off"); … … 1836 1844 p.append("presolve"); 1837 1845 p.setLonghelp( 1838 "Interior point algorithms do not obtain a basic solution (and \ 1839 the feasibility criterion is a bit suspect (JJF)). This option will crossover \ 1840 to a basic solution suitable for ranging or branch and cut. With the current state \ 1841 of quadratic it may be a good idea to switch off crossover for quadratic (and maybe \ 1842 presolve as well)  the option maybe does this."); 1846 "Interior point algorithms do not obtain a basic solution.\ 1847 This option will crossover to a basic solution suitable for ranging or branch and cut. With the current state \ 1848 of the solver for quadratic programs it may be a good idea to switch off crossover for this case (and maybe \ 1849 presolve as well)  the option 'maybe' does this."); 1843 1850 parameters.push_back(p); 1844 1851 } … … 1856 1863 { 1857 1864 CbcOrClpParam p("cutD!epth", "Depth in tree at which to do cuts", 1858 1, 999999, CBC_PARAM_INT_CUTDEPTH); 1859 p.setLonghelp( 1860 "Cut generators may be  off, on only at root, on if they look possible \ 1861 and on. If they are done every node then that is that, but it may be worth doing them \ 1862 every so often. The original method was every so many nodes but it is more logical \ 1863 to do it whenever depth in tree is a multiple of K. This option does that and defaults \ 1864 to 1 (off > code decides)."); 1865 1, COIN_INT_MAX, CBC_PARAM_INT_CUTDEPTH); 1866 p.setLonghelp( 1867 "Cut generators may be off, on, on only at the root node, or on if they look useful. \ 1868 Setting this option to a positive value K let CBC call a cutgenerator on a node whenever the depth in the tree is a multiple of K. \ 1869 The default of 1 lets CBC decide."); 1865 1870 p.setIntValue(1); 1866 1871 parameters.push_back(p); … … 1878 1883 } 1879 1884 { 1880 CbcOrClpParam p("cuto!ff", " All solutions must be better than this",1881  1.0e60, 1.0e60, CBC_PARAM_DBL_CUTOFF);1885 CbcOrClpParam p("cuto!ff", "Bound on the objective value for all solutions", 1886 COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_CUTOFF); 1882 1887 p.setDoubleValue(1.0e50); 1883 1888 p.setLonghelp( 1884 "All solutions must be better than this value (in a minimization sense). \1885 This is also set by code whenever it obtains a solution and is set tovalue of \1886 objective for solution minuscutoff increment.");1887 parameters.push_back(p); 1888 } 1889 { 1890 CbcOrClpParam p("cuts!OnOff", "Switches all cut s on or off",1889 "All solutions must have a better objective value (in a minimization sense) than the value of this option. \ 1890 CBC also updates this value whenever it obtains a solution to the value of \ 1891 the objective function of the solution minus the cutoff increment."); 1892 parameters.push_back(p); 1893 } 1894 { 1895 CbcOrClpParam p("cuts!OnOff", "Switches all cut generators on or off", 1891 1896 "off", CBC_PARAM_STR_CUTSSTRATEGY); 1892 1897 p.append("on"); … … 1895 1900 p.append("forceOn"); 1896 1901 p.setLonghelp( 1897 "This can be used to switch on or off all cut s (apart from Reduce and Split). Then you can do \1898 individual ones off or on \ 1899 See branchAndCut for information on options.");1902 "This can be used to switch on or off all cut generators (apart from Reduce and Split). " 1903 "Then one can turn individual ones off or on. " 1904 CUTS_LONGHELP); 1900 1905 parameters.push_back(p); 1901 1906 } … … 1953 1958 { 1954 1959 CbcOrClpParam p("dextra3", "Extra double parameter 3", 1955  1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA3, 0);1960 COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_DEXTRA3, 0); 1956 1961 p.setDoubleValue(0.0); 1957 1962 parameters.push_back(p); … … 1959 1964 { 1960 1965 CbcOrClpParam p("dextra4", "Extra double parameter 4", 1961  1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA4, 0);1966 COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_DEXTRA4, 0); 1962 1967 p.setDoubleValue(0.0); 1963 1968 parameters.push_back(p); … … 1965 1970 { 1966 1971 CbcOrClpParam p("dextra4", "Extra double parameter 5", 1967  1.0e100, 1.0e100, CBC_PARAM_DBL_DEXTRA5, 0);1972 COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_DEXTRA5, 0); 1968 1973 p.setDoubleValue(0.0); 1969 1974 parameters.push_back(p); … … 1977 1982 p.append("before"); 1978 1983 p.append("often"); 1979 p.setLonghelp( 1980 "This switches on Distance induced neighborhood Search. \ 1981 See Rounding for meaning of on,both,before"); 1984 p.setLonghelp(HEURISTICS_LONGHELP); 1982 1985 parameters.push_back(p); 1983 1986 } … … 2076 2079 p.setLonghelp( 2077 2080 "This switches on a random diving heuristic at various times. \ 2078 C  Coefficient, F  Fractional, G  Guided, L  LineSearch, P  PseudoCost, V  VectorLength. \ 2079 You may prefer to use individual on/off \ 2080 See Rounding for meaning of on,both,before"); 2081 parameters.push_back(p); 2082 } 2083 { 2084 CbcOrClpParam p("DivingC!oefficient", "Whether to try DiveCoefficient",2081 One may prefer to individually turn diving heuristics on or off. " 2082 HEURISTICS_LONGHELP); 2083 // C  Coefficient, F  Fractional, G  Guided, L  LineSearch, P  PseudoCost, V  VectorLength. 2084 parameters.push_back(p); 2085 } 2086 { 2087 CbcOrClpParam p("DivingC!oefficient", "Whether to try Coefficient diving heuristic", 2085 2088 "off", CBC_PARAM_STR_DIVINGC); 2086 2089 p.append("on"); 2087 2090 p.append("both"); 2088 2091 p.append("before"); 2089 parameters.push_back(p); 2090 } 2091 { 2092 CbcOrClpParam p("DivingF!ractional", "Whether to try DiveFractional", 2092 p.setLonghelp(HEURISTICS_LONGHELP); 2093 parameters.push_back(p); 2094 } 2095 { 2096 CbcOrClpParam p("DivingF!ractional", "Whether to try Fractional diving heuristic", 2093 2097 "off", CBC_PARAM_STR_DIVINGF); 2094 2098 p.append("on"); 2095 2099 p.append("both"); 2096 2100 p.append("before"); 2097 parameters.push_back(p); 2098 } 2099 { 2100 CbcOrClpParam p("DivingG!uided", "Whether to try DiveGuided", 2101 p.setLonghelp(HEURISTICS_LONGHELP); 2102 parameters.push_back(p); 2103 } 2104 { 2105 CbcOrClpParam p("DivingG!uided", "Whether to try Guided diving heuristic", 2101 2106 "off", CBC_PARAM_STR_DIVINGG); 2102 2107 p.append("on"); 2103 2108 p.append("both"); 2104 2109 p.append("before"); 2105 parameters.push_back(p); 2106 } 2107 { 2108 CbcOrClpParam p("DivingL!ineSearch", "Whether to try DiveLineSearch", 2110 p.setLonghelp(HEURISTICS_LONGHELP); 2111 parameters.push_back(p); 2112 } 2113 { 2114 CbcOrClpParam p("DivingL!ineSearch", "Whether to try Linesearch diving heuristic", 2109 2115 "off", CBC_PARAM_STR_DIVINGL); 2110 2116 p.append("on"); 2111 2117 p.append("both"); 2112 2118 p.append("before"); 2113 parameters.push_back(p); 2114 } 2115 { 2116 CbcOrClpParam p("DivingP!seudoCost", "Whether to try DivePseudoCost", 2119 p.setLonghelp(HEURISTICS_LONGHELP); 2120 parameters.push_back(p); 2121 } 2122 { 2123 CbcOrClpParam p("DivingP!seudoCost", "Whether to try Pseudocost diving heuristic", 2117 2124 "off", CBC_PARAM_STR_DIVINGP); 2118 2125 p.append("on"); 2119 2126 p.append("both"); 2120 2127 p.append("before"); 2121 parameters.push_back(p); 2122 } 2123 { 2124 CbcOrClpParam p("DivingV!ectorLength", "Whether to try DiveVectorLength", 2128 p.setLonghelp(HEURISTICS_LONGHELP); 2129 parameters.push_back(p); 2130 } 2131 { 2132 CbcOrClpParam p("DivingV!ectorLength", "Whether to try Vectorlength diving heuristic", 2125 2133 "off", CBC_PARAM_STR_DIVINGV); 2126 2134 p.append("on"); 2127 2135 p.append("both"); 2128 2136 p.append("before"); 2137 p.setLonghelp(HEURISTICS_LONGHELP); 2129 2138 parameters.push_back(p); 2130 2139 } … … 2174 2183 p.append("PEdantzig"); 2175 2184 p.setLonghelp( 2176 "Clp can use any pivot selection algorithm which the user codes as long as it\ 2177 implements the features in the abstract pivot base class. The Dantzig method is implemented\ 2178 to show a simple method but its use is deprecated. Steepest is the method of choice and there\ 2185 "The Dantzig method is simple but its use is deprecated. Steepest is the method of choice and there\ 2179 2186 are two variants which keep all weights updated but only scan a subset each iteration.\ 2180 2187 Partial switches this on while automatic decides at each iteration based on information\ 2181 about the factorization. \n\2182 ** NEWS  the Positive Edge criterion has been added. \2183 This selects incoming variables to try and avoid degenerate moves. See definition ofpsi.");2188 about the factorization.\ 2189 The PE variants add the Positive Edge criterion. \ 2190 This selects incoming variables to try to avoid degenerate moves. See also option psi."); 2184 2191 parameters.push_back(p); 2185 2192 } … … 2197 2204 CbcOrClpParam p("dualT!olerance", "For an optimal solution \ 2198 2205 no dual infeasibility may exceed this value", 2199 1.0e20, 1.0e12, CLP_PARAM_DBL_DUALTOLERANCE);2200 p.setLonghelp( 2201 "Normally the default tolerance is fine, but youmay want to increase it a\2202 bit if a dual runseems to be having a hard time. One method which can be faster is \2203 to use a large tolerance e.g. 1.0e4 and dual and then clean up problem using primal andthe \2206 1.0e20, COIN_DBL_MAX, CLP_PARAM_DBL_DUALTOLERANCE); 2207 p.setLonghelp( 2208 "Normally the default tolerance is fine, but one may want to increase it a\ 2209 bit if the dual simplex algorithm seems to be having a hard time. One method which can be faster is \ 2210 to use a large tolerance e.g. 1.0e4 and the dual simplex algorithm and then to clean up the problem using the primal simplex algorithm with the \ 2204 2211 correct tolerance (remembering to switch off presolve for this final short clean up phase)."); 2205 2212 parameters.push_back(p); … … 2207 2214 #ifdef COIN_HAS_CBC 2208 2215 { 2209 CbcOrClpParam p("dw!Heuristic", "Whether to try D Wheuristic",2216 CbcOrClpParam p("dw!Heuristic", "Whether to try Dantzig Wolfe heuristic", 2210 2217 "off", CBC_PARAM_STR_DW); 2211 2218 p.append("on"); … … 2213 2220 p.append("before"); 2214 2221 p.setLonghelp( 2215 "See Rounding for meaning of on,both,before"); 2222 "This heuristic is very very compute intensive. It tries to find a Dantzig Wolfe structure and use that." 2223 HEURISTICS_LONGHELP); 2216 2224 parameters.push_back(p); 2217 2225 } … … 2341 2349 p.setIntValue(0); 2342 2350 p.setLonghelp( 2343 "This switches on creation of extra integer variables \ 2344 to gather all variables with same cost."); 2351 "Switches on a trivial reformulation that introduces extra integer variables to group together variables with same cost."); 2345 2352 parameters.push_back(p); 2346 2353 } … … 2373 2380 #ifdef COIN_HAS_CBC 2374 2381 { 2375 CbcOrClpParam p("feas!ibilityPump", "Whether to try Feasibility Pump",2382 CbcOrClpParam p("feas!ibilityPump", "Whether to try the Feasibility Pump heuristic", 2376 2383 "off", CBC_PARAM_STR_FPUMP); 2377 2384 … … 2380 2387 p.append("before"); 2381 2388 p.setLonghelp( 2382 "This switches on feasibility pump heuristic at root. This is due to Fischetti, Lodi and Glover\2383 and uses a sequence of L ps to try and get an integer feasible solution. \2384 Some fine tuning is available by passFeasibilityPump and also pumpTune. \2385 See Rounding for meaning of on,both,before");2389 "This heuristic is due to Fischetti, Glover, and Lodi \ 2390 and uses a sequence of LPs to try and get an integer feasible solution. \ 2391 Some fine tuning is available by options passFeasibilityPump and pumpTune. " 2392 HEURISTICS_LONGHELP); 2386 2393 parameters.push_back(p); 2387 2394 } … … 2389 2396 CbcOrClpParam p("fix!OnDj", "Try heuristic based on fixing variables with \ 2390 2397 reduced costs greater than this", 2391  1.0e20, 1.0e20, CBC_PARAM_DBL_DJFIX, 1);2398 COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_DJFIX, 1); 2392 2399 p.setLonghelp( 2393 2400 "If this is set integer variables with reduced costs greater than this will be fixed \ … … 2404 2411 p.append("onglobal"); 2405 2412 p.setFakeKeyWord(3); 2406 p.setLonghelp( 2407 "This switches on flow cover cuts (either at root or in entire tree) \ 2408 See branchAndCut for information on options. \ 2409 Can also enter testing values by plusnn (==ifmove)"); 2413 p.setLonghelp(CUTS_LONGHELP 2414 " Reference: https://github.com/coinor/Cgl/wiki/CglFlowCover"); // Can also enter testing values by plusnn (==ifmove) 2410 2415 parameters.push_back(p); 2411 2416 } … … 2459 2464 p.append("forceLongOn"); 2460 2465 p.append("longendonly"); 2461 p.setLonghelp( 2462 "This switches on an alternative Gomory cut generator \ 2463 (either at root or in entire tree) \ 2464 This version is by Giacomo Nannicini and may be more robust \ 2465 See branchAndCut for information on options."); 2466 p.setLonghelp(CUTS_LONGHELP 2467 " This version is by Giacomo Nannicini and may be more robust than gomoryCuts."); 2466 2468 parameters.push_back(p); 2467 2469 } … … 2483 2485 with other cuts. They will almost always give cuts (although in this executable \ 2484 2486 they are limited as to number of variables in cut). However the cuts may be dense \ 2485 so it is worth experimenting (Long allows any length). See branchAndCut for \ 2486 information on options."); 2487 so it is worth experimenting (Long allows any length). " 2488 CUTS_LONGHELP 2489 " Reference: https://github.com/coinor/Cgl/wiki/CglGomory"); 2487 2490 parameters.push_back(p); 2488 2491 } … … 2496 2499 //p.append("root"); 2497 2500 p.setLonghelp( 2498 "Switches on a greedy heuristic which will try and obtain a solution. \ 2499 It may just fix a percentage of variables and then try a small branch and cut run. \ 2500 See Rounding for meaning of on,both,before"); 2501 "This heuristic tries to obtain a feasible solution by just fixing a percentage of variables and then try a small branch and cut run. " 2502 HEURISTICS_LONGHELP); 2501 2503 parameters.push_back(p); 2502 2504 } … … 2522 2524 #ifdef COIN_HAS_CBC 2523 2525 { 2524 CbcOrClpParam p("heur!isticsOnOff", "Switches most heuristics on or off",2526 CbcOrClpParam p("heur!isticsOnOff", "Switches most primal heuristics on or off", 2525 2527 "off", CBC_PARAM_STR_HEURISTICSTRATEGY); 2526 2528 p.append("on"); 2527 2529 p.setLonghelp( 2528 "This can be used to switch on or off all heuristics. Then you can do\2529 individual ones off or on. CbcTreeLocal is not included as it dramatically\2530 alters search.");2530 "This option can be used to switch on or off all heuristics that search for feasible solutions,\ 2531 except for the local tree search, as it dramatically alters the search.\ 2532 Then individual heuristics can be turned off or on."); 2531 2533 parameters.push_back(p); 2532 2534 } … … 2543 2545 { 2544 2546 CbcOrClpParam p("hOp!tions", "Heuristic options", 2545  9999999, 9999999, CBC_PARAM_INT_HOPTIONS, 1);2547 COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_HOPTIONS, 1); 2546 2548 p.setIntValue(0); 2547 2549 p.setLonghelp( … … 2562 2564 { 2563 2565 CbcOrClpParam p("idiot!Crash", "Whether to try idiot crash", 2564 1, 99999999, CLP_PARAM_INT_IDIOT);2566 1, COIN_INT_MAX, CLP_PARAM_INT_IDIOT); 2565 2567 2566 2568 p.setLonghelp( 2567 2569 "This is a type of 'crash' which works well on some homogeneous problems.\ 2568 2570 It works best on problems with unit elements and rhs but will do something to any \ 2569 model. It should only be used before primal. It can be set to 1 when the code \2570 decides for itself whether to use it, 0 to switch off or n > 0 to do n passes.");2571 model. It should only be used before the primal simplex algorithm. It can be set to 1 when the code \ 2572 decides for itself whether to use it, 0 to switch off, or n > 0 to do n passes."); 2571 2573 parameters.push_back(p); 2572 2574 } … … 2587 2589 CbcOrClpParam p("inc!rement", "A valid solution must be at least this \ 2588 2590 much better than last integer solution", 2589  1.0e20, 1.0e20, CBC_PARAM_DBL_INCREMENT);2590 2591 p.setLonghelp( 2592 "Whenever a solution is found the bound on solutions is set to solution (in a minimization\2593 sense) plus this. If it is not set then the code will try and work one oute.g. if \2591 COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_INCREMENT); 2592 2593 p.setLonghelp( 2594 "Whenever a solution is found the bound on the objective value for new solutions is set to the\ 2595 objective function of the found solution (in a minimization sense) plus this. If it is not set then CBC will try and work one out, e.g. if \ 2594 2596 all objective coefficients are multiples of 0.01 and only integer variables have entries in \ 2595 objective then this can be set to 0.01. Be careful if you set this negative!");2597 the objective function, then the increment can be set to 0.01. Be careful if setting this to a negative value!"); 2596 2598 2597 2599 parameters.push_back(p); … … 2600 2602 CbcOrClpParam p("inf!easibilityWeight", "Each integer infeasibility is expected \ 2601 2603 to cost this much", 2602 0.0, 1.0e20, CBC_PARAM_DBL_INFEASIBILITYWEIGHT, 1);2604 0.0, COIN_DBL_MAX, CBC_PARAM_DBL_INFEASIBILITYWEIGHT, 1); 2603 2605 p.setLonghelp( 2604 2606 "A primitive way of deciding which node to explore next. Satisfying each integer infeasibility is \ … … 2615 2617 } 2616 2618 { 2617 CbcOrClpParam p("integerT!olerance", "For a n optimalsolution \2618 no integer variable may be this away from an integer value",2619 CbcOrClpParam p("integerT!olerance", "For a feasible solution \ 2620 no integer variable may be more than this away from an integer value", 2619 2621 1.0e20, 0.5, CBC_PARAM_DBL_INTEGERTOLERANCE); 2620 2622 p.setLonghelp( 2621 "Beware of setting this smaller than the primal tolerance.");2623 "Beware of setting this smaller than the primal feasibility tolerance."); 2622 2624 parameters.push_back(p); 2623 2625 } … … 2651 2653 p.append("onglobal"); 2652 2654 p.append("forceandglobal"); 2653 p.setLonghelp( 2654 "This switches on knapsack cuts (either at root or in entire tree) \ 2655 See branchAndCut for information on options."); 2655 p.setLonghelp(CUTS_LONGHELP 2656 " Reference: https://github.com/coinor/Cgl/wiki/CglKnapsackCover"); 2656 2657 parameters.push_back(p); 2657 2658 } … … 2716 2717 p.append("forceOn"); 2717 2718 p.setLonghelp( 2718 " Lift and project cuts. \2719 May be slow \ 2720 See branchAndCut for information on options.");2721 parameters.push_back(p); 2722 } 2723 { 2724 CbcOrClpParam p("local!TreeSearch", "Whether to use local tree search",2719 "These cuts may be expensive to compute. " 2720 CUTS_LONGHELP 2721 " Reference: https://github.com/coinor/Cgl/wiki/CglLandP"); 2722 parameters.push_back(p); 2723 } 2724 { 2725 CbcOrClpParam p("local!TreeSearch", "Whether to use local tree search when a solution is found", 2725 2726 "off", CBC_PARAM_STR_LOCALTREE); 2726 2727 p.append("on"); 2727 2728 p.setLonghelp( 2728 "This switches on a local search algorithm when a solution is found. This is from \ 2729 Fischetti and Lodi and is not really a heuristic although it can be used as one. \ 2730 When used from Coin solve it has limited functionality. It is not switched on when \ 2731 heuristics are switched on."); 2729 "The heuristic is from Fischetti and Lodi and is not really a heuristic although it can be used as one \ 2730 (with limited functionality). It is not switched on when heuristics are switched on."); 2732 2731 parameters.push_back(p); 2733 2732 } … … 2736 2735 #ifndef COIN_HAS_CBC 2737 2736 CbcOrClpParam p("log!Level", "Level of detail in Solver output", 2738 1, 999999, CLP_PARAM_INT_SOLVERLOGLEVEL);2737 1, COIN_INT_MAX, CLP_PARAM_INT_SOLVERLOGLEVEL); 2739 2738 parameters.push_back(p); 2740 2739 #else … … 2760 2759 CbcOrClpParam p("maxF!actor", "Maximum number of iterations between \ 2761 2760 refactorizations", 2762 1, 999999, CLP_PARAM_INT_MAXFACTOR); 2763 p.setLonghelp( 2764 "If this is at its initial value of 200 then in this executable clp will guess at a\ 2765 value to use. Otherwise the user can set a value. The code may decide to refactorize\ 2766 earlier for accuracy."); 2761 1, COIN_INT_MAX, CLP_PARAM_INT_MAXFACTOR); 2762 p.setLonghelp( 2763 "If this is left at its default value of 200 then CLP will guess a\ 2764 value to use. CLP may decide to refactorize earlier for accuracy."); 2767 2765 parameters.push_back(p); 2768 2766 } … … 2770 2768 CbcOrClpParam p("maxIt!erations", "Maximum number of iterations before \ 2771 2769 stopping", 2772 0, 2147483647, CLP_PARAM_INT_MAXITERATION);2770 0, COIN_INT_MAX, CLP_PARAM_INT_MAXITERATION); 2773 2771 p.setLonghelp( 2774 2772 "This can be used for testing purposes. The corresponding library call\n\ … … 2781 2779 { 2782 2780 CbcOrClpParam p("maxN!odes", "Maximum number of nodes to do", 2783 1, 2147483647, CBC_PARAM_INT_MAXNODES);2781 1, COIN_INT_MAX, CBC_PARAM_INT_MAXNODES); 2784 2782 p.setLonghelp( 2785 2783 "This is a repeatable way to limit search. Normally using time is easier \ … … 2789 2787 { 2790 2788 CbcOrClpParam p("maxSaved!Solutions", "Maximum number of solutions to save", 2791 0, 2147483647, CBC_PARAM_INT_MAXSAVEDSOLS);2789 0, COIN_INT_MAX, CBC_PARAM_INT_MAXSAVEDSOLS); 2792 2790 p.setLonghelp( 2793 2791 "Number of solutions to save."); … … 2795 2793 } 2796 2794 { 2797 CbcOrClpParam p("maxSo!lutions", "Maximum number of solutions to get",2798 1, 2147483647, CBC_PARAM_INT_MAXSOLS);2795 CbcOrClpParam p("maxSo!lutions", "Maximum number of feasible solutions to get", 2796 1, COIN_INT_MAX, CBC_PARAM_INT_MAXSOLS); 2799 2797 p.setLonghelp( 2800 2798 "You may want to stop after (say) two solutions or an hour. \ … … 2839 2837 p.append("forceOn"); 2840 2838 p.append("onglobal"); 2841 p.setLonghelp( 2842 "This switches on mixed integer rounding cuts (either at root or in entire tree) \ 2843 See branchAndCut for information on options."); 2839 p.setLonghelp(CUTS_LONGHELP 2840 " Reference: https://github.com/coinor/Cgl/wiki/CglMixedIntegerRounding2"); 2844 2841 parameters.push_back(p); 2845 2842 } … … 2899 2896 a feasible solution. \ 2900 2897 \n\n\ 2898 Silly options added. If filename ends .low then integers not mentioned \ 2899 are set low  also .high, .lowcheap, .highcheap, .lowexpensive, .highexpensive \ 2900 where .lowexpensive sets costed ones to make expensive others low. Also if \ 2901 filename starts empty. then no file is read at all  just actions done. \ 2902 \n\n\ 2901 2903 Question and suggestions regarding MIPStart can be directed to\n\ 2902 2904 haroldo.santos@gmail.com. "); … … 2928 2930 { 2929 2931 CbcOrClpParam p("multiple!RootPasses", "Do multiple root passes to collect cuts and solutions", 2930 0, 100000000, CBC_PARAM_INT_MULTIPLEROOTS, 0);2932 0, COIN_INT_MAX, CBC_PARAM_INT_MULTIPLEROOTS, 0); 2931 2933 p.setIntValue(0); 2932 2934 p.setLonghelp( 2933 "Do (in parallel if threads enabled) the root phase this number of times \ 2934 and collect all solutions and cuts generated. The actual format is aabbcc \ 2935 where aa is number of extra passes, if bb is non zero \ 2936 then it is number of threads to use (otherwise uses threads setting) and \ 2937 cc is number of times to do root phase. Yet another one from the Italian idea factory \ 2938 (This time  Andrea Lodi , Matteo Fischetti , Michele Monaci , Domenico Salvagnin , \ 2939 and Andrea Tramontani). \ 2935 "Solve (in parallel, if enabled) the root phase this number of times, \ 2936 each with its own different seed, and collect all solutions and cuts generated. \ 2937 The actual format is aabbcc where aa is the number of extra passes; \ 2938 if bb is non zero, then it is number of threads to use (otherwise uses threads setting); \ 2939 and cc is the number of times to do root phase. \ 2940 2940 The solvers do not interact with each other. However if extra passes are specified \ 2941 then cuts are collected and used in later passes  so there is interaction there."); 2941 then cuts are collected and used in later passes  so there is interaction there. \ 2942 Some parts of this implementation have their origin in idea of \ 2943 Andrea Lodi, Matteo Fischetti, Michele Monaci, Domenico Salvagnin, and Andrea Tramontani."); 2942 2944 parameters.push_back(p); 2943 2945 } … … 2950 2952 p.append("before"); 2951 2953 p.setLonghelp( 2952 " Really silly stuff e.g. fix all integers with costs to zero!. \2953 Doh option does heuristic before preprocessing");2954 "This is naive heuristics which, e.g., fix all integers with costs to zero!. " 2955 HEURISTICS_LONGHELP); 2954 2956 parameters.push_back(p); 2955 2957 } … … 3023 3025 } 3024 3026 { 3025 CbcOrClpParam p("node!Strategy", "What strategy to use to select nodes",3027 CbcOrClpParam p("node!Strategy", "What strategy to use to select the next node from the branch and cut tree", 3026 3028 "hybrid", CBC_PARAM_STR_NODESTRATEGY); 3027 3029 p.append("fewest"); … … 3032 3034 p.append("downdepth"); 3033 3035 p.setLonghelp( 3034 "Normally before a solution the code will choose node with fewest infeasibilities. \ 3035 You can choose depth as the criterion. You can also say if up or down branch must \ 3036 be done first (the up down choice will carry on after solution). \ 3037 Default has now been changed to hybrid which is breadth first on small depth nodes then fewest."); 3036 "Normally before a feasible solution is found, CBC will choose a node with fewest infeasibilities. \ 3037 Alternatively, one may choose treedepth as the criterion. This requires the minimal amount of memory, but may take a long time to find the best solution.\ 3038 Additionally, one may specify whether up or down branches must \ 3039 be selected first (the updown choice will carry on after a first solution has been bound). \ 3040 The default choice 'hybrid' does breadth first on small depth nodes and then switches to 'fewest'."); 3038 3041 parameters.push_back(p); 3039 3042 } … … 3049 3052 { 3050 3053 CbcOrClpParam p("objective!Scale", "Scale factor to apply to objective", 3051  1.0e20, 1.0e20, CLP_PARAM_DBL_OBJSCALE, 1);3054 COIN_DBL_MAX, COIN_DBL_MAX, CLP_PARAM_DBL_OBJSCALE, 1); 3052 3055 p.setLonghelp( 3053 3056 "If the objective function has some very large values, you may wish to scale them\ … … 3129 3132 #ifdef COIN_HAS_CBC 3130 3133 { 3131 CbcOrClpParam p("passC!uts", "Number of cut passes atroot node",3132  9999999, 9999999, CBC_PARAM_INT_CUTPASS);3134 CbcOrClpParam p("passC!uts", "Number of rounds that cut generators are applied in the root node", 3135 COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_CUTPASS); 3133 3136 3134 3137 p.setIntValue(20); 3135 3138 p.setLonghelp( 3136 "The default is 100 passes if less than 500 columns, 100 passes (but \ 3137 stop if drop small if less than 5000 columns, 20 otherwise"); 3138 parameters.push_back(p); 3139 } 3140 { 3141 CbcOrClpParam p("passF!easibilityPump", "How many passes in feasibility pump", 3139 "The default is to do 100 passes if the problem has less than 500 columns, 100 passes (but \ 3140 stop if the drop in the objective function value is small) if the problem has less than 5000 columns, and 20 passes otherwise. \ 3141 A negative value n means that n passes are also applied if the objective does not drop."); 3142 parameters.push_back(p); 3143 } 3144 { 3145 CbcOrClpParam p("passF!easibilityPump", "How many passes to do in the Feasibility Pump heuristic", 3142 3146 0, 10000, CBC_PARAM_INT_FPUMPITS); 3143 p.setLonghelp(3144 "This fine tunes Feasibility Pump by doing more or fewer passes.");3145 3147 p.setIntValue(20); 3146 3148 parameters.push_back(p); … … 3160 3162 #ifdef COIN_HAS_CBC 3161 3163 { 3162 CbcOrClpParam p("passT!reeCuts", "Number of cut passes intree",3163  9999999, 9999999, CBC_PARAM_INT_CUTPASSINTREE);3164 CbcOrClpParam p("passT!reeCuts", "Number of rounds that cut generators are applied in the tree", 3165 COIN_INT_MAX, COIN_INT_MAX, CBC_PARAM_INT_CUTPASSINTREE); 3164 3166 p.setIntValue(1); 3165 p.setLonghelp("The default is one pass");3167 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."); 3166 3168 parameters.push_back(p); 3167 3169 } … … 3174 3176 } 3175 3177 { 3176 CbcOrClpParam p("perturb!ation", "Whether to perturb problem",3178 CbcOrClpParam p("perturb!ation", "Whether to perturb the problem", 3177 3179 "on", CLP_PARAM_STR_PERTURBATION); 3178 3180 p.append("off"); 3179 3181 p.setLonghelp( 3180 "Perturbation helps to stop cycling, but C lpuses other measures for this.\3181 However large problems and especially ones with unit elements and unit rhs or costs\3182 benefit from perturbation. Normally C lp tries to be intelligent, but you can switch this off.\3183 The Clp library has this off by default. This program has it on by default.");3182 "Perturbation helps to stop cycling, but CLP uses other measures for this.\ 3183 However, large problems and especially ones with unit elements and unit right hand sides or costs\ 3184 benefit from perturbation. Normally CLP tries to be intelligent, but one can switch this off."); 3185 // The Clp library has this off by default. This program has it on by default. 3184 3186 parameters.push_back(p); 3185 3187 } … … 3201 3203 p.append("both"); 3202 3204 p.append("before"); 3203 p.setLonghelp( 3204 "stuff needed. \ 3205 Doh option does heuristic before preprocessing"); 3205 p.setLonghelp(HEURISTICS_LONGHELP); 3206 3206 parameters.push_back(p); 3207 3207 } … … 3212 3212 p.append("both"); 3213 3213 p.append("before"); 3214 p.setLonghelp( 3215 "stuff needed. \ 3216 Doh option does heuristic before preprocessing"); 3214 p.setLonghelp(HEURISTICS_LONGHELP); 3217 3215 parameters.push_back(p); 3218 3216 } … … 3249 3247 p.append("file"); 3250 3248 p.setLonghelp("Presolve analyzes the model to find such things as redundant equations, equations\ 3251 which fix some variables, equations which can be transformed into bounds etcetc. For the\3252 initial solve of any problem this is worth doing unless you knowthat it will have no effect. \3253 on will normally do 5 passes while using 'more' will do 10. If the problem is very large you may need\3254 to write the original to fileusing 'file'.");3249 which fix some variables, equations which can be transformed into bounds, etc. For the\ 3250 initial solve of any problem this is worth doing unless one knows that it will have no effect. \ 3251 Option 'on' will normally do 5 passes, while using 'more' will do 10. If the problem is very large one can \ 3252 let CLP write the original problem to file by using 'file'."); 3255 3253 parameters.push_back(p); 3256 3254 } … … 3273 3271 "This tries to reduce size of model in a similar way to presolve and \ 3274 3272 it also tries to strengthen the model  this can be very useful and is worth trying. \ 3275 Save option saves on file presolved.mps. equal will turn <= cliques into\3276 ==. sos will create sos sets if all 01 in sets (well one extra is allowed)\3277 and no overlaps. trysos is same but allows any number extra. equalall will turn all\3278 valid inequalities into equalities with integer slacks. strategy is as\3279 on but uses CbcStrategy."); 3273 Value 'save' saves the presolved problem to a file presolved.mps.\ 3274 Value 'equal' will turn inequalitycliques into equalities.\ 3275 Value 'sos' lets CBC search for rows with upper bound 1 and where all nonzero coefficients are 1 and creates special ordered sets if the sets are not overlapping and all integer variables (except for at most one) are in the sets.\ 3276 Value 'trysos' is same as 'sos', but allows any number of integer variables outside of sets.\ 3277 Value 'equalall' lets CBC turn all valid inequalities into equalities by adding integer slack variables."); // Value 'strategy' is as on but uses CbcStrategy. 3280 3278 parameters.push_back(p); 3281 3279 } … … 3284 3282 { 3285 3283 CbcOrClpParam p("preT!olerance", "Tolerance to use in presolve", 3286 1.0e20, 1.0e12, CLP_PARAM_DBL_PRESOLVETOLERANCE);3287 p.setLonghelp( 3288 " The default is 1.0e8  you may wish to try 1.0e7if presolve says the problem is \3289 infeasible and you have awkward numbers and you are surethe problem is really feasible.");3284 1.0e20, COIN_DBL_MAX, CLP_PARAM_DBL_PRESOLVETOLERANCE); 3285 p.setLonghelp( 3286 "One may want to increase this tolerance if presolve says the problem is \ 3287 infeasible and one has awkward numbers and is sure that the problem is really feasible."); 3290 3288 parameters.push_back(p); 3291 3289 } … … 3303 3301 p.append("PEdantzig"); 3304 3302 p.setLonghelp( 3305 "Clp can use any pivot selection algorithm which the user codes as long as it\ 3306 implements the features in the abstract pivot base class. The Dantzig method is implemented\ 3307 to show a simple method but its use is deprecated. Exact devex is the method of choice and there\ 3303 "The Dantzig method is simple but its use is deprecated. Exact devex is the method of choice and there\ 3308 3304 are two variants which keep all weights updated but only scan a subset each iteration.\ 3309 Partial switches this on while change initially does dantzig until the factorization\ 3310 becomes denser. This is still a work in progress. \n\ 3311 ** NEWS  the Positive Edge criterion has been added. \ 3312 This selects incoming variables to try and avoid degenerate moves. Code \ 3313 donated by Jeremy Omer. See \ 3314 Towhidi, M., Desrosiers, J., Soumis, F., The positive edge criterion within COINORâs CLP. and \ 3315 Omer, J., Towhidi, M., Soumis, F., The positive edge pricing rule for the dual simplex."); 3305 Partial switches this on while 'change' initially does 'dantzig' until the factorization\ 3306 becomes denser. This is still a work in progress.\ 3307 The PE variants add the Positive Edge criterion.\ 3308 This selects incoming variables to try to avoid degenerate moves. \ 3309 See also Towhidi, M., Desrosiers, J., Soumis, F., The positive edge criterion within COINOR's CLP;\ 3310 Omer, J., Towhidi, M., Soumis, F., The positive edge pricing rule for the dual simplex."); 3316 3311 3317 3312 parameters.push_back(p); … … 3330 3325 #endif 3331 3326 { 3332 CbcOrClpParam p("primalT!olerance", "For a n optimalsolution \3333 no primal infeasibility may exceed this value",3334 1.0e20, 1.0e12, CLP_PARAM_DBL_PRIMALTOLERANCE);3335 p.setLonghelp( 3336 "Normally the default tolerance is fine, but youmay want to increase it a\3337 bit if a primal run seems to be having a hard time");3327 CbcOrClpParam p("primalT!olerance", "For a feasible solution \ 3328 no primal infeasibility, i.e., constraint violation, may exceed this value", 3329 1.0e20, COIN_DBL_MAX, CLP_PARAM_DBL_PRIMALTOLERANCE); 3330 p.setLonghelp( 3331 "Normally the default tolerance is fine, but one may want to increase it a\ 3332 bit if the primal simplex algorithm seems to be having a hard time."); 3338 3333 parameters.push_back(p); 3339 3334 } … … 3342 3337 CbcOrClpParam p("primalW!eight", "Initially algorithm acts as if it \ 3343 3338 costs this much to be infeasible", 3344 1.0e20, 1.0e20, CLP_PARAM_DBL_PRIMALWEIGHT);3339 1.0e20, COIN_DBL_MAX, CLP_PARAM_DBL_PRIMALWEIGHT); 3345 3340 p.setLonghelp( 3346 3341 "The primal algorithm in Clp is a single phase algorithm as opposed to a two phase\ … … 3438 3433 p.append("forceOnButStrong"); 3439 3434 p.append("strongRoot"); 3440 p.setLonghelp( 3441 "This switches on probing cuts (either at root or in entire tree) \ 3442 See branchAndCut for information on options. \ 3443 but strong options do more probing"); 3435 p.setLonghelp(CUTS_LONGHELP 3436 " Value 'forceOnBut' turns on probing and forces CBC to do probing at every node, but does only probing, not strengthening etc. \ 3437 Value 'strong' forces CBC to strongly do probing at every node, that is, also when CBC would usually turn it off because it hasn't found something. \ 3438 Value 'forceonbutstrong' is like 'forceonstrong', but does only probing (column fixing) and turns off row strengthening, so the matrix will not change inside the branch and bound. \ 3439 Reference: https://github.com/coinor/Cgl/wiki/CglProbing"); 3444 3440 parameters.push_back(p); 3445 3441 } … … 3457 3453 p.setFakeKeyWord(1); 3458 3454 p.setLonghelp( 3459 "This switches on a heuristic which looks for a solution close \ 3460 to incumbent solution (Fischetti and Monaci). \ 3461 See Rounding for meaning of on,both,before. \ 3462 Can also set different maxNode settings by plusnnnn (and are 'on'(on==30))."); 3455 "This heuristic looks for a solution close to the incumbent solution (Fischetti and Monaci, 2012). \ 3456 The idea is to define a subMIP without additional constraints but with a modified objective function intended to attract the search \ 3457 in the proximity of the incumbent. \ 3458 The approach works well for 01 MIPs whose solution landscape is not too irregular (meaning the there is reasonable probability of \ 3459 finding an improved solution by flipping a small number of binary variables), in particular when it is applied to the first heuristic solutions \ 3460 found at the root node. " 3461 HEURISTICS_LONGHELP); // Can also set different maxNode settings by plusnnnn (and are 'on'(on==30)). 3463 3462 parameters.push_back(p); 3464 3463 } 3465 3464 { 3466 3465 CbcOrClpParam p("pumpC!utoff", "Fake cutoff for use in feasibility pump", 3467  1.0e100, 1.0e100, CBC_PARAM_DBL_FAKECUTOFF);3466 COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_FAKECUTOFF); 3468 3467 p.setDoubleValue(0.0); 3469 3468 p.setLonghelp( … … 3474 3473 { 3475 3474 CbcOrClpParam p("pumpI!ncrement", "Fake increment for use in feasibility pump", 3476  1.0e100, 1.0e100, CBC_PARAM_DBL_FAKEINCREMENT, 1);3475 COIN_DBL_MAX, COIN_DBL_MAX, CBC_PARAM_DBL_FAKEINCREMENT, 1); 3477 3476 p.setDoubleValue(0.0); 3478 3477 p.setLonghelp( … … 3513 3512 3514 3513 p.setLonghelp( 3515 " This sets a random seed for Cbc \3516  0 says use time of day, 1 is as now.");3514 "Allows initialization of the random seed for pseudorandom numbers used in heuristics such as the Feasibility Pump to decide whether to round up or down. " 3515 "The special value of 0 lets Cbc use the time of the day for the initial seed."); 3517 3516 p.setIntValue(1); 3518 3517 parameters.push_back(p); … … 3524 3523 p.append("both"); 3525 3524 p.append("before"); 3526 p.setLonghelp( 3527 "stuff needed. \ 3528 Doh option does heuristic before preprocessing"); 3525 p.setLonghelp(HEURISTICS_LONGHELP); 3529 3526 parameters.push_back(p); 3530 3527 } … … 3536 3533 3537 3534 p.setLonghelp( 3538 "This sets a random seed for Clp \ 3539  0 says use time of day."); 3535 "Initialization of the random seed for pseudorandom numbers used to break ties in degenerate problems. " 3536 "This may yield a different continuous optimum and, in the context of Cbc, different cuts and heuristic solutions. " 3537 "The special value of 0 lets CLP use the time of the day for the initial seed."); 3540 3538 p.setIntValue(1234567); 3541 3539 parameters.push_back(p); … … 3545 3543 { 3546 3544 CbcOrClpParam p("ratio!Gap", "Stop when gap between best possible and \ 3547 best less than this fraction of larger of two",3548 0.0, 1.0e20, CBC_PARAM_DBL_GAPRATIO);3545 best known is less than this fraction of larger of two", 3546 0.0, COIN_DBL_MAX, CBC_PARAM_DBL_GAPRATIO); 3549 3547 p.setDoubleValue(0.0); 3550 3548 p.setLonghelp( 3551 "If the gap between best solution andbest possible solution is less than this fraction \3549 "If the gap between the best known solution and the best possible solution is less than this fraction \ 3552 3550 of the objective value at the root node then the search will terminate. See 'allowableGap' for a \ 3553 3551 way of using absolute value rather than fraction."); … … 3575 3573 { 3576 3574 CbcOrClpParam p("reallyO!bjectiveScale", "Scale factor to apply to objective in place", 3577  1.0e20, 1.0e20, CLP_PARAM_DBL_OBJSCALE2, 0);3575 COIN_DBL_MAX, COIN_DBL_MAX, CLP_PARAM_DBL_OBJSCALE2, 0); 3578 3576 p.setLonghelp("You can set this to 1.0 to test maximization or other to stress code"); 3579 3577 p.setDoubleValue(1.0); … … 3596 3594 p.append("forceOn"); 3597 3595 p.setLonghelp( 3598 "Th is switches on reduce and split cuts (either at root or in entire tree). \3599 May be slow \ 3600 See branchAndCut for information on options.");3596 "These cuts may be expensive to generate. " 3597 CUTS_LONGHELP 3598 " Reference: https://github.com/coinor/Cgl/wiki/CglRedSplit"); 3601 3599 parameters.push_back(p); 3602 3600 } … … 3608 3606 p.append("longOn"); 3609 3607 p.append("longRoot"); 3610 p.setLonghelp("This switches on reduce and split cuts (either at root or in entire tree) \3611 This version is by Giacomo Nannicini based on Francois Margot's version \3612 Standard setting only uses rows in tableau <= 256, long uses all\3613 May be slow\3614 See branchAndCut for information on options.");3608 p.setLonghelp("This switches on reduce and split cuts (either at root or in entire tree). \ 3609 This version is by Giacomo Nannicini based on Francois Margot's version. \ 3610 Standard setting only uses rows in tableau <= 256, long uses all. \ 3611 These cuts may be expensive to generate. \ 3612 See option cuts for more information on the possible values."); 3615 3613 parameters.push_back(p); 3616 3614 } … … 3622 3620 p.append("ifmove"); 3623 3621 p.append("forceOn"); 3624 p.setLonghelp( 3625 "Residual capacity cuts. \ 3626 See branchAndCut for information on options."); 3622 p.setLonghelp(CUTS_LONGHELP 3623 " Reference: https://github.com/coinor/Cgl/wiki/CglResidualCapacity"); 3627 3624 3628 3625 parameters.push_back(p); … … 3649 3646 { 3650 3647 CbcOrClpParam p("rhs!Scale", "Scale factor to apply to rhs and bounds", 3651  1.0e20, 1.0e20, CLP_PARAM_DBL_RHSSCALE, 0);3648 COIN_DBL_MAX, COIN_DBL_MAX, CLP_PARAM_DBL_RHSSCALE, 0); 3652 3649 p.setLonghelp( 3653 3650 "If the rhs or bounds have some very large meaningful values, you may wish to scale them\ … … 3670 3667 p.append("djbefore"); 3671 3668 p.append("usesolution"); 3672 p.setLonghelp( 3673 "This switches on Relaxation enforced neighborhood Search. \ 3674 on just does 50 nodes \ 3675 200 or 1000 does that many nodes. \ 3676 Doh option does heuristic before preprocessing"); 3669 p.setLonghelp(HEURISTICS_LONGHELP 3670 " Value 'on' just does 50 nodes. 200, 1000, and 10000 does that many nodes."); 3677 3671 parameters.push_back(p); 3678 3672 } … … 3684 3678 p.append("before"); 3685 3679 p.append("often"); 3686 p.setLonghelp( 3687 "This switches on Relaxed induced neighborhood Search. \ 3688 Doh option does heuristic before preprocessing"); 3689 parameters.push_back(p); 3690 } 3691 { 3692 CbcOrClpParam p("round!ingHeuristic", "Whether to use Rounding heuristic", 3680 p.setLonghelp(HEURISTICS_LONGHELP); 3681 parameters.push_back(p); 3682 } 3683 { 3684 CbcOrClpParam p("round!ingHeuristic", "Whether to use simple (but effective) Rounding heuristic", 3693 3685 "off", CBC_PARAM_STR_ROUNDING); 3694 3686 p.append("on"); 3695 3687 p.append("both"); 3696 3688 p.append("before"); 3697 p.setLonghelp( 3698 "This switches on a simple (but effective) rounding heuristic at each node of tree. \ 3699 On means do in solve i.e. after preprocessing, \ 3700 Before means do if doHeuristics used, off otherwise, \ 3701 and both means do if doHeuristics and in solve."); 3689 p.setLonghelp(HEURISTICS_LONGHELP); 3702 3690 parameters.push_back(p); 3703 3691 } … … 3737 3725 "Scaling can help in solving problems which might otherwise fail because of lack of\ 3738 3726 accuracy. It can also reduce the number of iterations. It is not applied if the range\ 3739 of elements is small. When unscaled it is possible that there may be small primal and/or\ 3740 infeasibilities."); 3727 of elements is small. When the solution is evaluated in the unscaled problem, it is possible that small primal and/or\ 3728 dual infeasibilities occur. " 3729 "Option 'equilibrium' uses the largest element for scaling. " 3730 "Option 'geometric' uses the squareroot of the product of largest and smallest element. " 3731 "Option 'auto' let CLP choose a method that gives the best ratio of the largest element to the smallest one."); 3741 3732 p.setCurrentOption(3); // say auto 3742 3733 parameters.push_back(p); … … 3745 3736 { 3746 3737 CbcOrClpParam p("sec!onds", "Maximum seconds", 3747 1.0, 1.0e12, CLP_PARAM_DBL_TIMELIMIT);3738 1.0, COIN_DBL_MAX, CLP_PARAM_DBL_TIMELIMIT); 3748 3739 3749 3740 p.setLonghelp("After this many seconds clp will act as if maximum iterations had been reached \ … … 3754 3745 { 3755 3746 CbcOrClpParam p("sec!onds", "maximum seconds", 3756 1.0, 1.0e12, CBC_PARAM_DBL_TIMELIMIT_BAB);3747 1.0, COIN_DBL_MAX, CBC_PARAM_DBL_TIMELIMIT_BAB); 3757 3748 p.setLonghelp( 3758 3749 "After this many seconds coin solver will act as if maximum nodes had been reached."); … … 3770 3761 #ifdef COIN_HAS_CBC 3771 3762 { 3772 CbcOrClpParam p("slow!cutpasses", "Maximum number of tries for slower cuts",3763 CbcOrClpParam p("slow!cutpasses", "Maximum number of rounds for slower cut generators", 3773 3764 1, COIN_INT_MAX, CBC_PARAM_INT_MAX_SLOW_CUTS); 3774 3765 p.setLonghelp( 3775 "Some cut generators are fairly slow  this limits the number of times they are tried."); 3766 "Some cut generators are fairly slow  this limits the number of times they are tried.\ 3767 The cut generators identified as 'may be slow' at present are Lift and project cuts and both versions of Reduce and Split cuts."); 3776 3768 p.setIntValue(10); 3777 3769 parameters.push_back(p); … … 3872 3864 { 3873 3865 CbcOrClpParam p("sprint!Crash", "Whether to try sprint crash", 3874 1, 5000000, CLP_PARAM_INT_SPRINT);3875 p.setLonghelp( 3876 "For long and thin problems this programmay solve a series of small problems\3877 created by taking a subset of the columns. I introduced the idea as 'Sprint'after\3866 1, COIN_INT_MAX, CLP_PARAM_INT_SPRINT); 3867 p.setLonghelp( 3868 "For long and thin problems this method may solve a series of small problems\ 3869 created by taking a subset of the columns. The idea as 'Sprint' was introduced by J. Forrest after\ 3878 3870 an LP code of that name of the 60's which tried the same tactic (not totally successfully).\ 3879 C plex calls it 'sifting'. 1 is automatic choice, 0 is off, n is number of passes");3871 CPLEX calls it 'sifting'. 1 lets CLP automatically choose the number of passes, 0 is off, n is number of passes"); 3880 3872 parameters.push_back(p); 3881 3873 } … … 3904 3896 "This turns on newer features. \ 3905 3897 Use 0 for easy problems, 1 is default, 2 is aggressive. \ 3906 1 uses Gomory cuts using tolerance of 0.01 at root, \ 3907 does a possible restart after 100 nodes if can fix many \ 3908 and activates a diving and RINS heuristic and makes feasibility pump \ 3909 more aggressive. \ 3910 This does not apply to unit tests (where 'experiment' may have similar effects)."); 3898 1 uses Gomory cuts with a tolerance of 0.01 at the root node, \ 3899 does a possible restart after 100 nodes if many variables could be fixed, \ 3900 activates a diving and RINS heuristic, and makes the feasibility pump \ 3901 more aggressive."); // This does not apply to unit tests (where 'experiment' may have similar effects 3911 3902 p.setIntValue(1); 3912 3903 parameters.push_back(p); … … 3928 3919 p.setLonghelp( 3929 3920 "In order to decide which variable to branch on, the code will choose up to this number \ 3930 of unsatisfied variables to do miniup and down branches on. Then the most effective one is chosen. \3921 of unsatisfied variables to try minimal up and down branches on. Then the most effective one is chosen. \ 3931 3922 If a variable is branched on many times then the previous average up and down costs may be used  \ 3932 see number before trust.");3923 see also option trustPseudoCosts."); 3933 3924 parameters.push_back(p); 3934 3925 } … … 3969 3960 CbcOrClpParam p("tighten!Factor", "Tighten bounds using this times largest \ 3970 3961 activity at continuous solution", 3971 1.0e3, 1.0e20, CBC_PARAM_DBL_TIGHTENFACTOR, 0);3962 1.0e3, COIN_DBL_MAX, CBC_PARAM_DBL_TIGHTENFACTOR, 0); 3972 3963 p.setLonghelp( 3973 3964 "This sleazy trick can help on some problems."); … … 3995 3986 { 3996 3987 CbcOrClpParam p("trust!PseudoCosts", "Number of branches before we trust pseudocosts", 3997 3, 2000000000, CBC_PARAM_INT_NUMBERBEFORE);3998 p.setLonghelp( 3999 "Using strong branching computes pseudocosts. After this many times for a variable we just \3988 3, COIN_INT_MAX, CBC_PARAM_INT_NUMBERBEFORE); 3989 p.setLonghelp( 3990 "Using strong branching computes pseudocosts. This parameter determines after how many branches for a variable we just \ 4000 3991 trust the pseudo costs and do not do any more strong branching."); 4001 3992 p.setIntValue(10); … … 4006 3997 { 4007 3998 CbcOrClpParam p("tune!PreProcess", "Dubious tuning parameters", 4008 0, 2000000000, CLP_PARAM_INT_PROCESSTUNE, 1);3999 0, COIN_INT_MAX, CLP_PARAM_INT_PROCESSTUNE, 1); 4009 4000 p.setLonghelp( 4010 4001 "Format aabbcccc  \n If aa then this is number of major passes (i.e. with presolve) \n \ … … 4029 4020 p.append("forceandglobal"); 4030 4021 p.append("forceLongOn"); 4031 p.setLonghelp( 4032 "This switches on two phase mixed integer rounding cuts (either at root or in entire tree) \ 4033 See branchAndCut for information on options."); 4022 p.setLonghelp(CUTS_LONGHELP 4023 " Reference: https://github.com/coinor/Cgl/wiki/CglTwomir"); 4034 4024 parameters.push_back(p); 4035 4025 } … … 4082 4072 p.append("before"); 4083 4073 p.append("intree"); 4084 p.setLonghelp( 4085 "This switches on variable neighborhood Search. \ 4086 Doh option does heuristic before preprocessing"); 4074 p.setLonghelp(HEURISTICS_LONGHELP); 4087 4075 parameters.push_back(p); 4088 4076 } … … 4106 4094 #ifdef COIN_HAS_CBC 4107 4095 { 4108 CbcOrClpParam p("vub!heuristic", "Type of vubheuristic",4096 CbcOrClpParam p("vub!heuristic", "Type of VUB heuristic", 4109 4097 2, 20, CBC_PARAM_INT_VUBTRY, 0); 4110 4098 p.setLonghelp( 4111 " If set will try and fix some integer variables");4099 "This heuristic tries and fix some integer variables."); 4112 4100 p.setIntValue(1); 4113 4101 parameters.push_back(p); … … 4121 4109 p.append("forceOn"); 4122 4110 p.append("onglobal"); 4123 p.setLonghelp( 4124 "This switches on zerohalf cuts (either at root or in entire tree) \ 4125 See branchAndCut for information on options. This implementation was written by \ 4126 Alberto Caprara."); 4111 p.setLonghelp(CUTS_LONGHELP 4112 " This implementation was written by Alberto Caprara."); 4127 4113 parameters.push_back(p); 4128 4114 }
Note: See TracChangeset
for help on using the changeset viewer.