- Timestamp:
- Jul 25, 2009 4:39:55 AM (12 years ago)
- Location:
- trunk/Clp/src
- Files:
-
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Clp/src/CbcOrClpParam.cpp
r1401 r1402 73 73 action_(INVALID), 74 74 currentKeyWord_(-1), 75 display_( false),75 display_(0), 76 76 intValue_(-1), 77 77 doubleValue_(-1.0), … … 83 83 CbcOrClpParam::CbcOrClpParam (std::string name, std::string help, 84 84 double lower, double upper, CbcOrClpParameterType type, 85 booldisplay)85 int display) 86 86 : type_(type), 87 87 lowerIntValue_(0), … … 105 105 CbcOrClpParam::CbcOrClpParam (std::string name, std::string help, 106 106 int lower, int upper, CbcOrClpParameterType type, 107 booldisplay)107 int display) 108 108 : type_(type), 109 109 lowerDoubleValue_(0.0), … … 129 129 std::string firstValue, 130 130 CbcOrClpParameterType type,int whereUsed, 131 booldisplay)131 int display) 132 132 : type_(type), 133 133 lowerDoubleValue_(0.0), … … 153 153 CbcOrClpParam::CbcOrClpParam (std::string name, std::string help, 154 154 CbcOrClpParameterType type,int whereUsed, 155 booldisplay)155 int display) 156 156 : type_(type), 157 157 lowerDoubleValue_(0.0), … … 247 247 lengthName_--; 248 248 } 249 } 250 // Returns length of name for printing 251 int 252 CbcOrClpParam::lengthMatchName ( ) const 253 { 254 if (lengthName_==lengthMatch_) 255 return lengthName_; 256 else 257 return lengthName_+2; 249 258 } 250 259 // Insert string (only valid for keywords) … … 650 659 #ifdef COIN_HAS_CBC 651 660 double 652 CbcOrClpParam::doubleParameter (OsiSolverInterface * model) const 661 CbcOrClpParam::doubleParameter (OsiSolverInterface * 662 #ifndef NDEBUG 663 model 664 #endif 665 ) const 653 666 { 654 667 double value=0.0; … … 1217 1230 numberParameters=0; 1218 1231 parameters[numberParameters++]= 1219 CbcOrClpParam("?","For help",GENERALQUERY,7, false);1220 parameters[numberParameters++]= 1221 CbcOrClpParam("???","For help",FULLGENERALQUERY,7, false);1232 CbcOrClpParam("?","For help",GENERALQUERY,7,0); 1233 parameters[numberParameters++]= 1234 CbcOrClpParam("???","For help",FULLGENERALQUERY,7,0); 1222 1235 parameters[numberParameters++]= 1223 1236 CbcOrClpParam("-","From stdin", 1224 STDIN,3,false); 1237 STDIN,3,0); 1238 parameters[numberParameters++]= 1239 CbcOrClpParam("allC!ommands","Whether to print less used commands", 1240 "no",ALLCOMMANDS); 1241 parameters[numberParameters-1].append("more"); 1242 parameters[numberParameters-1].append("all"); 1243 parameters[numberParameters-1].setLonghelp 1244 ( 1245 "For the sake of your sanity, only the more useful and simple commands \ 1246 are printed out on ?." 1247 ); 1225 1248 #ifdef COIN_HAS_CBC 1226 1249 parameters[numberParameters++]= … … 1248 1271 parameters[numberParameters++]= 1249 1272 CbcOrClpParam("artif!icialCost","Costs >= this treated as artificials in feasibility pump", 1250 0.0,COIN_DBL_MAX,ARTIFICIALCOST, false);1273 0.0,COIN_DBL_MAX,ARTIFICIALCOST,1); 1251 1274 parameters[numberParameters-1].setDoubleValue(0.0); 1252 1275 parameters[numberParameters-1].setLonghelp … … 1258 1281 parameters[numberParameters++]= 1259 1282 CbcOrClpParam("auto!Scale","Whether to scale objective, rhs and bounds of problem if they look odd", 1260 "off",AUTOSCALE,7, false);1283 "off",AUTOSCALE,7,0); 1261 1284 parameters[numberParameters-1].append("on"); 1262 1285 parameters[numberParameters-1].setLonghelp … … 1264 1287 "If you think you may get odd objective values or large equality rows etc then\ 1265 1288 it may be worth setting this true. It is still experimental and you may prefer\ 1266 to use objective!Scale and rhs!Scale "1289 to use objective!Scale and rhs!Scale." 1267 1290 ); 1268 1291 parameters[numberParameters++]= … … 1272 1295 ( 1273 1296 "This command solves the current model using the primal dual predictor \ 1274 corrector algorithm. You will probably want to link in and choose a better\1275 ordering and factorization than the default ones provided. It will also solve models \1297 corrector algorithm. You may want to link in an alternative \ 1298 ordering and factorization. It will also solve models \ 1276 1299 with quadratic objectives." 1277 1300 … … 1285 1308 directory given by 'directory'. A name of '$' will use the previous value for the name. This\ 1286 1309 is initialized to '', i.e. it must be set. If you have libz then it can read compressed\ 1287 files 'xxxxxxxx.gz' .."1310 files 'xxxxxxxx.gz' or xxxxxxxx.bz2." 1288 1311 ); 1289 1312 parameters[numberParameters++]= … … 1298 1321 parameters[numberParameters++]= 1299 1322 CbcOrClpParam("biasLU","Whether factorization biased towards U", 1300 "UU",BIASLU,2, false);1323 "UU",BIASLU,2,0); 1301 1324 parameters[numberParameters-1].append("UX"); 1302 1325 parameters[numberParameters-1].append("LX"); … … 1323 1346 were obtained fairly early in the search so the important point is to select the best variable to branch on. \ 1324 1347 See whether strong branching did a good job - or did it just take a lot of iterations. Adjust the strongBranching \ 1325 and trustPseudoCosts parameters." 1348 and trustPseudoCosts parameters. If cuts did a good job, then you may wish to \ 1349 have more rounds of cuts - see passC!uts and passT!ree." 1326 1350 ); 1327 1351 #endif 1328 1352 parameters[numberParameters++]= 1329 1353 CbcOrClpParam("bscale","Whether to scale in barrier (and ordering speed)", 1330 "off",BARRIERSCALE,7, false);1354 "off",BARRIERSCALE,7,0); 1331 1355 parameters[numberParameters-1].append("on"); 1332 1356 parameters[numberParameters-1].append("off1"); … … 1342 1366 parameters[numberParameters-1].append("fudge!Long"); 1343 1367 parameters[numberParameters-1].append("wssmp"); 1344 #define REAL_BARRIER1345 1368 #else 1346 1369 parameters[numberParameters-1].append("fudge!Long_dummy"); … … 1349 1372 #ifdef UFL_BARRIER 1350 1373 parameters[numberParameters-1].append("Uni!versityOfFlorida"); 1351 #define REAL_BARRIER1352 1374 #else 1353 1375 parameters[numberParameters-1].append("Uni!versityOfFlorida_dummy"); … … 1355 1377 #ifdef TAUCS_BARRIER 1356 1378 parameters[numberParameters-1].append("Taucs"); 1357 #define REAL_BARRIER1358 1379 #else 1359 1380 parameters[numberParameters-1].append("Taucs_dummy"); … … 1361 1382 #ifdef MUMPS_BARRIER 1362 1383 parameters[numberParameters-1].append("Mumps"); 1363 #define REAL_BARRIER1364 1384 #else 1365 1385 parameters[numberParameters-1].append("Mumps_dummy"); … … 1368 1388 ( 1369 1389 "For a barrier code to be effective it needs a good Cholesky ordering and factorization. \ 1370 You will need to link in one from another source. See Makefile.locations for some \ 1390 The native ordering and factorization is not state of the art, although acceptable. \ 1391 You may want to link in one from another source. See Makefile.locations for some \ 1371 1392 possibilities." 1372 1393 ); … … 1431 1452 parameters[numberParameters++]= 1432 1453 CbcOrClpParam("cpp!Generate","Generates C++ code", 1433 -1,50000,CPP );1454 -1,50000,CPP,1); 1434 1455 parameters[numberParameters-1].setLonghelp 1435 1456 ( … … 1438 1459 0 gives simplest driver, 1 generates saves and restores, 2 \ 1439 1460 generates saves and restores even for variables at default value. \ 1440 4 bit in cbc generates size dependent code rather than computed values." 1461 4 bit in cbc generates size dependent code rather than computed values. \ 1462 This is now deprecated as you can call stand-alone solver - see \ 1463 Cbc/examples/driver4.cpp." 1441 1464 ); 1442 1465 #ifdef COIN_HAS_CLP … … 1453 1476 "If crash is set on and there is an all slack basis then Clp will flip or put structural\ 1454 1477 variables into basis with the aim of getting dual feasible. On the whole dual seems to be\ 1455 better without it and there a lernative types of 'crash' for primal e.g. 'idiot' or 'sprint'. \1478 better without it and there are alternative types of 'crash' for primal e.g. 'idiot' or 'sprint'. \ 1456 1479 I have also added a variant due to Solow and Halim which is as on but just flip."); 1457 1480 parameters[numberParameters++]= … … 1473 1496 parameters[numberParameters++]= 1474 1497 CbcOrClpParam("csv!Statistics","Create one line of statistics", 1475 CSVSTATISTICS,2, false);1498 CSVSTATISTICS,2,1); 1476 1499 parameters[numberParameters-1].setLonghelp 1477 1500 ( … … 1489 1512 every so often. The original method was every so many nodes but it is more logical \ 1490 1513 to do it whenever depth in tree is a multiple of K. This option does that and defaults \ 1491 to -1 (off )."1514 to -1 (off -> code decides)." 1492 1515 ); 1493 1516 parameters[numberParameters-1].setIntValue(-1); … … 1517 1540 parameters[numberParameters++]= 1518 1541 CbcOrClpParam("debug!In","read valid solution from file", 1519 DEBUG,7, false);1542 DEBUG,7,1); 1520 1543 parameters[numberParameters-1].setLonghelp 1521 1544 ( … … 1533 1556 parameters[numberParameters++]= 1534 1557 CbcOrClpParam("dense!Threshold","Whether to use dense factorization", 1535 -1,10000,DENSE, false);1558 -1,10000,DENSE,1); 1536 1559 parameters[numberParameters-1].setLonghelp 1537 1560 ( … … 1553 1576 parameters[numberParameters++]= 1554 1577 CbcOrClpParam("dextra3","Extra double parameter 3", 1555 -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA3, false);1578 -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA3,0); 1556 1579 parameters[numberParameters-1].setDoubleValue(0.0); 1557 1580 parameters[numberParameters++]= 1558 1581 CbcOrClpParam("dextra4","Extra double parameter 4", 1559 -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA4, false);1582 -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA4,0); 1560 1583 parameters[numberParameters-1].setDoubleValue(0.0); 1561 1584 parameters[numberParameters++]= 1562 1585 CbcOrClpParam("dextra5","Extra double parameter 5", 1563 -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA5, false);1586 -COIN_DBL_MAX,COIN_DBL_MAX,DEXTRA5,0); 1564 1587 parameters[numberParameters-1].setDoubleValue(0.0); 1565 1588 parameters[numberParameters++]= … … 1596 1619 parameters[numberParameters++]= 1597 1620 CbcOrClpParam("dirSample","Set directory where the COIN-OR sample problems are.", 1598 DIRSAMPLE );1621 DIRSAMPLE,7,1); 1599 1622 parameters[numberParameters-1].setLonghelp 1600 1623 ( … … 1606 1629 parameters[numberParameters++]= 1607 1630 CbcOrClpParam("dirNetlib","Set directory where the netlib problems are.", 1608 DIRNETLIB );1631 DIRNETLIB,7,1); 1609 1632 parameters[numberParameters-1].setLonghelp 1610 1633 ( … … 1618 1641 parameters[numberParameters++]= 1619 1642 CbcOrClpParam("dirMiplib","Set directory where the miplib 2003 problems are.", 1620 DIRMIPLIB );1643 DIRMIPLIB,7,1); 1621 1644 parameters[numberParameters-1].setLonghelp 1622 1645 ( … … 1631 1654 parameters[numberParameters++]= 1632 1655 CbcOrClpParam("diveO!pt","Diving options", 1633 -1,200,DIVEOPT,false); 1634 parameters[numberParameters-1].setLonghelp 1635 ( 1636 "If >2 && <7 then modify diving options" 1656 -1,200,DIVEOPT,1); 1657 parameters[numberParameters-1].setLonghelp 1658 ( 1659 "If >2 && <8 then modify diving options - \ 1660 \t3 only at root and if no solution, \ 1661 \t4 only at root and if this heuristic has not got solution, \ 1662 \t5 only at depth <4, \ 1663 \t6 decay, \ 1664 \t7 run up to 2 times if solution found 4 otherwise." 1637 1665 ); 1638 1666 parameters[numberParameters-1].setIntValue(-1); … … 1692 1720 ( 1693 1721 "Normally heuristics are done in branch and bound. It may be useful to do them outside. \ 1694 Doing this may also set cutoff." 1722 Only those heuristics with 'both' or 'before' set will run. \ 1723 Doing this may also set cutoff, which can help with preprocessing." 1695 1724 ); 1696 1725 #endif … … 1714 1743 parameters[numberParameters++]= 1715 1744 CbcOrClpParam("dualize","Solves dual reformulation", 1716 0,3,DUALIZE, false);1745 0,3,DUALIZE,1); 1717 1746 parameters[numberParameters-1].setLonghelp 1718 1747 ( … … 1721 1750 parameters[numberParameters++]= 1722 1751 CbcOrClpParam("dualP!ivot","Dual pivot choice algorithm", 1723 "auto!matic",DUALPIVOT );1752 "auto!matic",DUALPIVOT,7,1); 1724 1753 parameters[numberParameters-1].append("dant!zig"); 1725 1754 parameters[numberParameters-1].append("partial"); … … 1793 1822 parameters[numberParameters++]= 1794 1823 CbcOrClpParam("exp!eriment","Whether to use testing features", 1795 -1,200,EXPERIMENT, false);1824 -1,200,EXPERIMENT,0); 1796 1825 parameters[numberParameters-1].setLonghelp 1797 1826 ( … … 1808 1837 "This will write an MPS format file to the given file name. It will use the default\ 1809 1838 directory given by 'directory'. A name of '$' will use the previous value for the name. This\ 1810 is initialized to 'default.mps'." 1839 is initialized to 'default.mps'. \ 1840 It can be useful to get rid of the original names and go over to using Rnnnnnnn and Cnnnnnnn. This can be done by setting 'keepnames' off before importing mps file." 1811 1841 ); 1812 1842 #ifdef COIN_HAS_CBC 1813 1843 parameters[numberParameters++]= 1814 1844 CbcOrClpParam("extra1","Extra integer parameter 1", 1815 -COIN_INT_MAX,COIN_INT_MAX,EXTRA1, false);1845 -COIN_INT_MAX,COIN_INT_MAX,EXTRA1,0); 1816 1846 parameters[numberParameters-1].setIntValue(-1); 1817 1847 parameters[numberParameters++]= 1818 1848 CbcOrClpParam("extra2","Extra integer parameter 2", 1819 -100,COIN_INT_MAX,EXTRA2, false);1849 -100,COIN_INT_MAX,EXTRA2,0); 1820 1850 parameters[numberParameters-1].setIntValue(-1); 1821 1851 parameters[numberParameters++]= 1822 1852 CbcOrClpParam("extra3","Extra integer parameter 3", 1823 -1,COIN_INT_MAX,EXTRA3,false); 1824 parameters[numberParameters-1].setIntValue(-1); 1825 parameters[numberParameters++]= 1826 CbcOrClpParam("depthminibab","Extra integer parameter 4", 1827 -COIN_INT_MAX,COIN_INT_MAX,DEPTHMINIBAB,false); 1853 -1,COIN_INT_MAX,EXTRA3,0); 1828 1854 parameters[numberParameters-1].setIntValue(-1); 1829 1855 #endif … … 1842 1868 parameters[numberParameters++]= 1843 1869 CbcOrClpParam("fakeB!ound","All bounds <= this value - DEBUG", 1844 1.0,1.0e15,FAKEBOUND,false); 1845 #ifdef COIN_HAS_CBC 1846 parameters[numberParameters++]= 1847 CbcOrClpParam("fakeC!utoff","Fake cutoff for use in feasibility pump", 1848 -COIN_DBL_MAX,COIN_DBL_MAX,FAKECUTOFF); 1849 parameters[numberParameters-1].setDoubleValue(0.0); 1850 parameters[numberParameters-1].setLonghelp 1851 ( 1852 "0.0 off - otherwise add a constraint forcing objective below this value\ 1853 in feasibility pump" 1854 ); 1855 parameters[numberParameters++]= 1856 CbcOrClpParam("fakeI!ncrement","Fake increment for use in feasibility pump", 1857 -COIN_DBL_MAX,COIN_DBL_MAX,FAKEINCREMENT,false); 1858 parameters[numberParameters-1].setDoubleValue(0.0); 1859 parameters[numberParameters-1].setLonghelp 1860 ( 1861 "0.0 off - otherwise use as absolute increment to cutoff \ 1862 when solution found in feasibility pump" 1863 ); 1870 1.0,1.0e15,FAKEBOUND,0); 1871 #ifdef COIN_HAS_CBC 1864 1872 parameters[numberParameters++]= 1865 1873 CbcOrClpParam("feas!ibilityPump","Whether to try Feasibility Pump", … … 1878 1886 CbcOrClpParam("fix!OnDj","Try heuristic based on fixing variables with \ 1879 1887 reduced costs greater than this", 1880 -1.0e20,1.0e20,DJFIX, false);1888 -1.0e20,1.0e20,DJFIX,1); 1881 1889 parameters[numberParameters-1].setLonghelp 1882 1890 ( … … 1906 1914 "-1 off. If 1 then tries to branch to solution given by AMPL or priorities file. \ 1907 1915 If 0 then just tries to set as best solution \ 1908 If 1 then also does that many nodes on fixed problem."1916 If >1 then also does that many nodes on fixed problem." 1909 1917 ); 1910 1918 parameters[numberParameters++]= 1911 1919 CbcOrClpParam("fraction!forBAB","Fraction in feasibility pump", 1912 1.0e-5,1.1,SMALLBAB, false);1920 1.0e-5,1.1,SMALLBAB,1); 1913 1921 parameters[numberParameters-1].setDoubleValue(0.5); 1914 1922 parameters[numberParameters-1].setLonghelp … … 1921 1929 parameters[numberParameters++]= 1922 1930 CbcOrClpParam("gamma!(Delta)","Whether to regularize barrier", 1923 "off",GAMMA,7, false);1931 "off",GAMMA,7,1); 1924 1932 parameters[numberParameters-1].append("on"); 1925 1933 parameters[numberParameters-1].append("gamma"); … … 1984 1992 parameters[numberParameters++]= 1985 1993 CbcOrClpParam("hOp!tions","Heuristic options", 1986 -9999999,9999999,HOPTIONS );1994 -9999999,9999999,HOPTIONS,1); 1987 1995 parameters[numberParameters-1].setLonghelp 1988 1996 ( … … 1996 2004 parameters[numberParameters++]= 1997 2005 CbcOrClpParam("hot!StartMaxIts","Maximum iterations on hot start", 1998 0,COIN_INT_MAX,MAXHOTITS ,false);2006 0,COIN_INT_MAX,MAXHOTITS); 1999 2007 #endif 2000 2008 #ifdef COIN_HAS_CLP … … 2018 2026 directory given by 'directory'. A name of '$' will use the previous value for the name. This\ 2019 2027 is initialized to '', i.e. it must be set. If you have libgz then it can read compressed\ 2020 files 'xxxxxxxx.gz'.." 2028 files 'xxxxxxxx.gz' or 'xxxxxxxx.bz2'. \ 2029 If 'keepnames' is off, then names are dropped -> Rnnnnnnn and Cnnnnnnn." 2021 2030 ); 2022 2031 #ifdef COIN_HAS_CBC … … 2035 2044 CbcOrClpParam("inf!easibilityWeight","Each integer infeasibility is expected \ 2036 2045 to cost this much", 2037 0.0,1.0e20,INFEASIBILITYWEIGHT );2046 0.0,1.0e20,INFEASIBILITYWEIGHT,1); 2038 2047 parameters[numberParameters-1].setLonghelp 2039 2048 ( … … 2069 2078 parameters[numberParameters++]= 2070 2079 CbcOrClpParam("KKT","Whether to use KKT factorization", 2071 "off",KKT,7, false);2080 "off",KKT,7,1); 2072 2081 parameters[numberParameters-1].append("on"); 2073 2082 #endif … … 2153 2162 "This can be used for testing purposes. The corresponding library call\n\ 2154 2163 \tsetMaximumIterations(value)\n can be useful. If the code stops on\ 2155 seconds or by an interrupt this will be treated as stopping on maximum iterations "2164 seconds or by an interrupt this will be treated as stopping on maximum iterations. This is ignored in branchAndCut - use maxN!odes." 2156 2165 ); 2157 2166 #endif … … 2170 2179 parameters[numberParameters-1].setLonghelp 2171 2180 ( 2172 "You may want to stop after (say) two solutions or an hour." 2181 "You may want to stop after (say) two solutions or an hour. \ 2182 This is checked every node in tree, so it is possible to get more solutions from heuristics." 2173 2183 ); 2174 2184 #endif … … 2185 2195 parameters[numberParameters++]= 2186 2196 CbcOrClpParam("mipO!ptions","Dubious options for mip", 2187 0,COIN_INT_MAX,MIPOPTIONS, false);2197 0,COIN_INT_MAX,MIPOPTIONS,0); 2188 2198 parameters[numberParameters++]= 2189 2199 CbcOrClpParam("more!MipOptions","More dubious options for mip", 2190 -1,COIN_INT_MAX,MOREMIPOPTIONS, false);2200 -1,COIN_INT_MAX,MOREMIPOPTIONS,0); 2191 2201 parameters[numberParameters++]= 2192 2202 CbcOrClpParam("mixed!IntegerRoundingCuts","Whether to use Mixed Integer Rounding cuts", … … 2213 2223 but this program turns this off to make it look more friendly. It can be useful\ 2214 2224 to turn them back on if you want to be able to 'grep' for particular messages or if\ 2215 you intend to override the behavior of a particular message. "2225 you intend to override the behavior of a particular message. This only affects Clp not Cbc." 2216 2226 ); 2217 2227 #ifdef COIN_HAS_CBC 2218 2228 parameters[numberParameters++]= 2219 2229 CbcOrClpParam("miplib","Do some of miplib test set", 2220 MIPLIB,3 );2230 MIPLIB,3,1); 2221 2231 parameters[numberParameters++]= 2222 2232 CbcOrClpParam("naive!Heuristics","Whether to try some stupid heuristic", 2223 "off",NAIVE );2233 "off",NAIVE,7,1); 2224 2234 parameters[numberParameters-1].append("on"); 2225 2235 parameters[numberParameters-1].append("both"); … … 2228 2238 ( 2229 2239 "Really silly stuff e.g. fix all integers with costs to zero!. \ 2230 Do optionsdoes heuristic before preprocessing" );2240 Doh option does heuristic before preprocessing" ); 2231 2241 #endif 2232 2242 #ifdef COIN_HAS_CLP 2233 2243 parameters[numberParameters++]= 2234 2244 CbcOrClpParam("netlib","Solve entire netlib test set", 2235 NETLIB_EITHER,3 );2245 NETLIB_EITHER,3,1); 2236 2246 parameters[numberParameters-1].setLonghelp 2237 2247 ( … … 2239 2249 The user can set options before e.g. clp -presolve off -netlib" 2240 2250 ); 2241 #ifdef REAL_BARRIER2242 2251 parameters[numberParameters++]= 2243 2252 CbcOrClpParam("netlibB!arrier","Solve entire netlib test set with barrier", 2244 NETLIB_BARRIER,3 );2253 NETLIB_BARRIER,3,1); 2245 2254 parameters[numberParameters-1].setLonghelp 2246 2255 ( … … 2248 2257 The user can set options before e.g. clp -kkt on -netlib" 2249 2258 ); 2250 #endif2251 2259 parameters[numberParameters++]= 2252 2260 CbcOrClpParam("netlibD!ual","Solve entire netlib test set (dual)", 2253 NETLIB_DUAL,3 );2261 NETLIB_DUAL,3,1); 2254 2262 parameters[numberParameters-1].setLonghelp 2255 2263 ( … … 2259 2267 parameters[numberParameters++]= 2260 2268 CbcOrClpParam("netlibP!rimal","Solve entire netlib test set (primal)", 2261 NETLIB_PRIMAL,3 );2269 NETLIB_PRIMAL,3,1); 2262 2270 parameters[numberParameters-1].setLonghelp 2263 2271 ( … … 2267 2275 parameters[numberParameters++]= 2268 2276 CbcOrClpParam("netlibT!une","Solve entire netlib test set with 'best' algorithm", 2269 NETLIB_TUNE,3 );2277 NETLIB_TUNE,3,1); 2270 2278 parameters[numberParameters-1].setLonghelp 2271 2279 ( … … 2277 2285 parameters[numberParameters++]= 2278 2286 CbcOrClpParam("network","Tries to make network matrix", 2279 NETWORK,7, false);2287 NETWORK,7,0); 2280 2288 parameters[numberParameters-1].setLonghelp 2281 2289 ( … … 2304 2312 parameters[numberParameters++]= 2305 2313 CbcOrClpParam("numberA!nalyze","Number of analysis iterations", 2306 -COIN_INT_MAX,COIN_INT_MAX,NUMBERANALYZE, false);2314 -COIN_INT_MAX,COIN_INT_MAX,NUMBERANALYZE,0); 2307 2315 parameters[numberParameters-1].setLonghelp 2308 2316 ( … … 2313 2321 parameters[numberParameters++]= 2314 2322 CbcOrClpParam("objective!Scale","Scale factor to apply to objective", 2315 -1.0e20,1.0e20,OBJSCALE, false);2323 -1.0e20,1.0e20,OBJSCALE,1); 2316 2324 parameters[numberParameters-1].setLonghelp 2317 2325 ( 2318 2326 "If the objective function has some very large values, you may wish to scale them\ 2319 internally by this amount. It can also be set by autoscale. It is applied after scaling "2327 internally by this amount. It can also be set by autoscale. It is applied after scaling. You are unlikely to need this." 2320 2328 ); 2321 2329 parameters[numberParameters-1].setDoubleValue(1.0); … … 2324 2332 parameters[numberParameters++]= 2325 2333 CbcOrClpParam("outDup!licates","takes duplicate rows etc out of integer model", 2326 OUTDUPROWS,7, false);2334 OUTDUPROWS,7,0); 2327 2335 #endif 2328 2336 parameters[numberParameters++]= … … 2359 2367 parameters[numberParameters++]= 2360 2368 CbcOrClpParam("passP!resolve","How many passes in presolve", 2361 -200,100,PRESOLVEPASS, false);2369 -200,100,PRESOLVEPASS,1); 2362 2370 parameters[numberParameters-1].setLonghelp 2363 2371 ( … … 2379 2387 parameters[numberParameters++]= 2380 2388 CbcOrClpParam("pertV!alue","Method of perturbation", 2381 -5000,102,PERTVALUE, false);2389 -5000,102,PERTVALUE,1); 2382 2390 parameters[numberParameters++]= 2383 2391 CbcOrClpParam("perturb!ation","Whether to perturb problem", … … 2393 2401 parameters[numberParameters++]= 2394 2402 CbcOrClpParam("PFI","Whether to use Product Form of Inverse in simplex", 2395 "off",PFI,7, false);2403 "off",PFI,7,0); 2396 2404 parameters[numberParameters-1].append("on"); 2397 2405 parameters[numberParameters-1].setLonghelp … … 2410 2418 ( 2411 2419 "stuff needed. \ 2412 Do optionsdoes heuristic before preprocessing" );2420 Doh option does heuristic before preprocessing" ); 2413 2421 #endif 2414 2422 #ifdef COIN_HAS_CLP 2415 2423 parameters[numberParameters++]= 2416 2424 CbcOrClpParam("plus!Minus","Tries to make +- 1 matrix", 2417 PLUSMINUS,7, false);2425 PLUSMINUS,7,0); 2418 2426 parameters[numberParameters-1].setLonghelp 2419 2427 ( … … 2424 2432 parameters[numberParameters++]= 2425 2433 CbcOrClpParam("pO!ptions","Dubious print options", 2426 0,COIN_INT_MAX,PRINTOPTIONS, false);2434 0,COIN_INT_MAX,PRINTOPTIONS,1); 2427 2435 parameters[numberParameters-1].setIntValue(0); 2428 2436 parameters[numberParameters-1].setLonghelp … … 2432 2440 parameters[numberParameters++]= 2433 2441 CbcOrClpParam("preO!pt","Presolve options", 2434 0,COIN_INT_MAX,PRESOLVEOPTIONS, false);2442 0,COIN_INT_MAX,PRESOLVEOPTIONS,0); 2435 2443 #endif 2436 2444 parameters[numberParameters++]= … … 2483 2491 parameters[numberParameters++]= 2484 2492 CbcOrClpParam("primalP!ivot","Primal pivot choice algorithm", 2485 "auto!matic",PRIMALPIVOT );2493 "auto!matic",PRIMALPIVOT,7,1); 2486 2494 parameters[numberParameters-1].append("exa!ct"); 2487 2495 parameters[numberParameters-1].append("dant!zig"); … … 2595 2603 ); 2596 2604 parameters[numberParameters++]= 2605 CbcOrClpParam("pumpC!utoff","Fake cutoff for use in feasibility pump", 2606 -COIN_DBL_MAX,COIN_DBL_MAX,FAKECUTOFF); 2607 parameters[numberParameters-1].setDoubleValue(0.0); 2608 parameters[numberParameters-1].setLonghelp 2609 ( 2610 "0.0 off - otherwise add a constraint forcing objective below this value\ 2611 in feasibility pump" 2612 ); 2613 parameters[numberParameters++]= 2614 CbcOrClpParam("pumpI!ncrement","Fake increment for use in feasibility pump", 2615 -COIN_DBL_MAX,COIN_DBL_MAX,FAKEINCREMENT,1); 2616 parameters[numberParameters-1].setDoubleValue(0.0); 2617 parameters[numberParameters-1].setLonghelp 2618 ( 2619 "0.0 off - otherwise use as absolute increment to cutoff \ 2620 when solution found in feasibility pump" 2621 ); 2622 parameters[numberParameters++]= 2597 2623 CbcOrClpParam("pumpT!une","Dubious ideas for feasibility pump", 2598 2624 0,100000000,FPUMPTUNE); … … 2602 2628 \t>=1000000 use as accumulate switch\n\ 2603 2629 \t>=1000 use index+1 as number of large loops\n\ 2604 \t==100 use objvalue +0.05*fabs(objvalue) as cutoff OR dextra1if set\n\2630 \t==100 use objvalue +0.05*fabs(objvalue) as cutoff OR fakeCutoff if set\n\ 2605 2631 \t%100 == 10,20 etc for experimentation\n\ 2606 2632 \t1 == fix ints at bounds, 2 fix all integral ints, 3 and continuous at bounds" … … 2625 2651 ( 2626 2652 "stuff needed. \ 2627 Do optionsdoes heuristic before preprocessing" );2653 Doh option does heuristic before preprocessing" ); 2628 2654 parameters[numberParameters++]= 2629 2655 CbcOrClpParam("ratio!Gap","Stop when gap between best possible and \ … … 2639 2665 parameters[numberParameters++]= 2640 2666 CbcOrClpParam("readS!tored","Import stored cuts from file", 2641 STOREDFILE,3, false);2667 STOREDFILE,3,0); 2642 2668 #endif 2643 2669 #ifdef COIN_HAS_CLP 2644 2670 parameters[numberParameters++]= 2645 2671 CbcOrClpParam("reallyO!bjectiveScale","Scale factor to apply to objective in place", 2646 -1.0e20,1.0e20,OBJSCALE2, false);2672 -1.0e20,1.0e20,OBJSCALE2,0); 2647 2673 parameters[numberParameters-1].setLonghelp 2648 2674 ( … … 2652 2678 parameters[numberParameters++]= 2653 2679 CbcOrClpParam("reallyS!cale","Scales model in place", 2654 REALLY_SCALE,7, false);2680 REALLY_SCALE,7,0); 2655 2681 #endif 2656 2682 #ifdef COIN_HAS_CBC … … 2683 2709 parameters[numberParameters++]= 2684 2710 CbcOrClpParam("restore!Model","Restore model from binary file", 2685 RESTORE );2711 RESTORE,7,1); 2686 2712 parameters[numberParameters-1].setLonghelp 2687 2713 ( … … 2692 2718 parameters[numberParameters++]= 2693 2719 CbcOrClpParam("reverse","Reverses sign of objective", 2694 REVERSE,7, false);2720 REVERSE,7,0); 2695 2721 parameters[numberParameters-1].setLonghelp 2696 2722 ( … … 2699 2725 parameters[numberParameters++]= 2700 2726 CbcOrClpParam("rhs!Scale","Scale factor to apply to rhs and bounds", 2701 -1.0e20,1.0e20,RHSSCALE, false);2727 -1.0e20,1.0e20,RHSSCALE,0); 2702 2728 parameters[numberParameters-1].setLonghelp 2703 2729 ( 2704 2730 "If the rhs or bounds have some very large meaningful values, you may wish to scale them\ 2705 internally by this amount. It can also be set by autoscale "2731 internally by this amount. It can also be set by autoscale. This should not be needed." 2706 2732 ); 2707 2733 parameters[numberParameters-1].setDoubleValue(1.0); … … 2720 2746 ( 2721 2747 "This switches on Relaxation enforced neighborhood Search. \ 2722 on just does feasibility pump\2748 on just does 50 nodes \ 2723 2749 200 or 1000 does that many nodes. \ 2724 Do optionsdoes heuristic before preprocessing" );2750 Doh option does heuristic before preprocessing" ); 2725 2751 parameters[numberParameters++]= 2726 2752 CbcOrClpParam("Rins","Whether to try Relaxed Induced Neighborhood Search", … … 2733 2759 ( 2734 2760 "This switches on Relaxed induced neighborhood Search. \ 2735 Do optionsdoes heuristic before preprocessing" );2761 Doh option does heuristic before preprocessing" ); 2736 2762 parameters[numberParameters++]= 2737 2763 CbcOrClpParam("round!ingHeuristic","Whether to use Rounding heuristic", … … 2751 2777 parameters[numberParameters++]= 2752 2778 CbcOrClpParam("saveM!odel","Save model to binary file", 2753 SAVE );2779 SAVE,7,1); 2754 2780 parameters[numberParameters-1].setLonghelp 2755 2781 ( … … 2792 2818 ( 2793 2819 "After this many seconds clp will act as if maximum iterations had been reached \ 2794 (if value >=0). \ 2795 In this program it is really only useful for testing but the library function\n\ 2796 \tsetMaximumSeconds(value)\n can be useful." 2820 (if value >=0)." 2797 2821 ); 2798 2822 #else … … 2807 2831 parameters[numberParameters++]= 2808 2832 CbcOrClpParam("sleep","for debug", 2809 DUMMY,7, false);2833 DUMMY,7,0); 2810 2834 parameters[numberParameters-1].setLonghelp 2811 2835 ( … … 2815 2839 parameters[numberParameters++]= 2816 2840 CbcOrClpParam("slp!Value","Number of slp passes before primal", 2817 -1,50000,SLPVALUE, false);2841 -1,50000,SLPVALUE,1); 2818 2842 parameters[numberParameters-1].setLonghelp 2819 2843 ( … … 2824 2848 parameters[numberParameters++]= 2825 2849 CbcOrClpParam("small!Factorization","Whether to use small factorization", 2826 -1,10000,SMALLFACT, false);2850 -1,10000,SMALLFACT,1); 2827 2851 parameters[numberParameters-1].setLonghelp 2828 2852 ( … … 2883 2907 parameters[numberParameters++]= 2884 2908 CbcOrClpParam("spars!eFactor","Whether factorization treated as sparse", 2885 "on",SPARSEFACTOR,7, false);2909 "on",SPARSEFACTOR,7,0); 2886 2910 parameters[numberParameters-1].append("off"); 2887 2911 parameters[numberParameters++]= 2888 2912 CbcOrClpParam("special!Options","Dubious options for Simplex - see ClpSimplex.hpp", 2889 0,COIN_INT_MAX,SPECIALOPTIONS, false);2913 0,COIN_INT_MAX,SPECIALOPTIONS,0); 2890 2914 parameters[numberParameters++]= 2891 2915 CbcOrClpParam("sprint!Crash","Whether to try sprint crash", … … 2954 2978 parameters[numberParameters++]= 2955 2979 CbcOrClpParam("subs!titution","How long a column to substitute for in presolve", 2956 0,10000,SUBSTITUTION, false);2980 0,10000,SUBSTITUTION,0); 2957 2981 parameters[numberParameters-1].setLonghelp 2958 2982 ( … … 2965 2989 parameters[numberParameters++]= 2966 2990 CbcOrClpParam("testO!si","Test OsiObject stuff", 2967 -1,COIN_INT_MAX,TESTOSI, false);2991 -1,COIN_INT_MAX,TESTOSI,0); 2968 2992 #endif 2969 2993 #ifdef CBC_THREAD 2970 2994 parameters[numberParameters++]= 2971 2995 CbcOrClpParam("thread!s","Number of threads to try and use", 2972 -100,100000,THREADS, false);2996 -100,100000,THREADS,1); 2973 2997 parameters[numberParameters-1].setLonghelp 2974 2998 ( … … 2983 3007 CbcOrClpParam("tighten!Factor","Tighten bounds using this times largest \ 2984 3008 activity at continuous solution", 2985 1.0e-3,1.0e20,TIGHTENFACTOR, false);3009 1.0e-3,1.0e20,TIGHTENFACTOR,0); 2986 3010 parameters[numberParameters-1].setLonghelp 2987 3011 ( … … 2992 3016 parameters[numberParameters++]= 2993 3017 CbcOrClpParam("tightLP","Poor person's preSolve for now", 2994 TIGHTEN,7, false);3018 TIGHTEN,7,0); 2995 3019 #endif 2996 3020 #ifdef COIN_HAS_CBC … … 3007 3031 parameters[numberParameters++]= 3008 3032 CbcOrClpParam("tune!PreProcess","Dubious tuning parameters", 3009 0,20000000,PROCESSTUNE, false);3033 0,20000000,PROCESSTUNE,1); 3010 3034 parameters[numberParameters-1].setLonghelp 3011 3035 ( … … 3036 3060 parameters[numberParameters++]= 3037 3061 CbcOrClpParam("unitTest","Do unit test", 3038 UNITTEST,3 );3062 UNITTEST,3,1); 3039 3063 parameters[numberParameters-1].setLonghelp 3040 3064 ( … … 3043 3067 parameters[numberParameters++]= 3044 3068 CbcOrClpParam("userClp","Hand coded Clp stuff", 3045 USERCLP );3069 USERCLP,0,0); 3046 3070 parameters[numberParameters-1].setLonghelp 3047 3071 ( … … 3052 3076 parameters[numberParameters++]= 3053 3077 CbcOrClpParam("userCbc","Hand coded Cbc stuff", 3054 USERCBC );3078 USERCBC,0,0); 3055 3079 parameters[numberParameters-1].setLonghelp 3056 3080 ( 3057 3081 "There are times e.g. when using AMPL interface when you may wish to do something unusual. \ 3058 Look for USERCBC in main driver and modify sample code." 3082 Look for USERCBC in main driver and modify sample code. \ 3083 It is possible you can get same effect by using example driver4.cpp." 3059 3084 ); 3060 3085 #endif 3061 3086 parameters[numberParameters++]= 3062 3087 CbcOrClpParam("vector","Whether to use vector? Form of matrix in simplex", 3063 "off",VECTOR,7, false);3064 parameters[numberParameters-1].append("on"); 3065 parameters[numberParameters-1].setLonghelp 3066 ( 3067 "If this is on andClpPackedMatrix uses extra column copy in odd format."3088 "off",VECTOR,7,0); 3089 parameters[numberParameters-1].append("on"); 3090 parameters[numberParameters-1].setLonghelp 3091 ( 3092 "If this is on ClpPackedMatrix uses extra column copy in odd format." 3068 3093 ); 3069 3094 parameters[numberParameters++]= 3070 3095 CbcOrClpParam("verbose","Switches on longer help on single ?", 3071 0, 15,VERBOSE,false);3096 0,31,VERBOSE,0); 3072 3097 parameters[numberParameters-1].setLonghelp 3073 3098 ( … … 3078 3103 parameters[numberParameters++]= 3079 3104 CbcOrClpParam("vub!heuristic","Type of vub heuristic", 3080 -2,20,VUBTRY, false);3105 -2,20,VUBTRY,0); 3081 3106 parameters[numberParameters-1].setLonghelp 3082 3107 ( … … 3084 3109 ); 3085 3110 parameters[numberParameters-1].setIntValue(-1); 3111 #if 0 3086 3112 parameters[numberParameters++]= 3087 3113 CbcOrClpParam("zero!HalfCuts","Whether to use zero half cuts", … … 3095 3121 parameters[numberParameters-1].setLonghelp 3096 3122 ( 3097 "This switches on knapsackcuts (either at root or in entire tree) \3123 "This switches on zero-half cuts (either at root or in entire tree) \ 3098 3124 See branchAndCut for information on options." 3099 ); 3125 ); 3126 #endif 3100 3127 #endif 3101 3128 assert(numberParameters<CBCMAXPARAMETERS); … … 3127 3154 int numberColumnsFile; 3128 3155 double objectiveValue; 3129 fread(&numberRowsFile,sizeof(int),1,fp); 3130 fread(&numberColumnsFile,sizeof(int),1,fp); 3131 fread(&objectiveValue,sizeof(double),1,fp); 3156 int nRead; 3157 nRead=fread(&numberRowsFile,sizeof(int),1,fp); 3158 if (nRead!=1) 3159 throw("Error in fread"); 3160 nRead=fread(&numberColumnsFile,sizeof(int),1,fp); 3161 if (nRead!=1) 3162 throw("Error in fread"); 3163 nRead=fread(&objectiveValue,sizeof(double),1,fp); 3164 if (nRead!=1) 3165 throw("Error in fread"); 3132 3166 double * dualRowSolution = lpSolver->dualRowSolution(); 3133 3167 double * primalRowSolution = lpSolver->primalRowSolution(); … … 3152 3186 lpSolver->setObjectiveValue(objectiveValue); 3153 3187 if (numberRows==numberRowsFile&&numberColumns==numberColumnsFile) { 3154 fread(primalRowSolution,sizeof(double),numberRows,fp); 3155 fread(dualRowSolution,sizeof(double),numberRows,fp); 3156 fread(primalColumnSolution,sizeof(double),numberColumns,fp); 3157 fread(dualColumnSolution,sizeof(double),numberColumns,fp); 3188 nRead=fread(primalRowSolution,sizeof(double),numberRows,fp); 3189 if (nRead!=numberRows) 3190 throw("Error in fread"); 3191 nRead=fread(dualRowSolution,sizeof(double),numberRows,fp); 3192 if (nRead!=numberRows) 3193 throw("Error in fread"); 3194 nRead=fread(primalColumnSolution,sizeof(double),numberColumns,fp); 3195 if (nRead!=numberColumns) 3196 throw("Error in fread"); 3197 nRead=fread(dualColumnSolution,sizeof(double),numberColumns,fp); 3198 if (nRead!=numberColumns) 3199 throw("Error in fread"); 3158 3200 } else { 3159 3201 std::cout<<"Mismatch on rows and/or columns - truncating"<<std::endl; 3160 3202 double * temp = new double [CoinMax(numberRowsFile,numberColumnsFile)]; 3161 fread(temp,sizeof(double),numberRowsFile,fp); 3162 CoinMemcpyN(temp,numberRows,primalRowSolution); 3163 fread(temp,sizeof(double),numberRowsFile,fp); 3164 CoinMemcpyN(temp,numberRows,dualRowSolution); 3165 fread(temp,sizeof(double),numberColumnsFile,fp); 3166 CoinMemcpyN(temp,numberColumns,primalColumnSolution); 3167 fread(temp,sizeof(double),numberColumnsFile,fp); 3168 CoinMemcpyN(temp,numberColumns,dualColumnSolution); 3203 nRead=fread(temp,sizeof(double),numberRowsFile,fp); 3204 if (nRead!=numberRowsFile) 3205 throw("Error in fread"); 3206 CoinMemcpyN(temp,numberRows,primalRowSolution); 3207 nRead=fread(temp,sizeof(double),numberRowsFile,fp); 3208 if (nRead!=numberRowsFile) 3209 throw("Error in fread"); 3210 CoinMemcpyN(temp,numberRows,dualRowSolution); 3211 nRead=fread(temp,sizeof(double),numberColumnsFile,fp); 3212 if (nRead!=numberColumnsFile) 3213 throw("Error in fread"); 3214 CoinMemcpyN(temp,numberColumns,primalColumnSolution); 3215 nRead=fread(temp,sizeof(double),numberColumnsFile,fp); 3216 if (nRead!=numberColumnsFile) 3217 throw("Error in fread"); 3218 CoinMemcpyN(temp,numberColumns,dualColumnSolution); 3169 3219 delete [] temp; 3170 3220 } … … 3226 3276 int numberColumns=lpSolver->numberColumns(); 3227 3277 double objectiveValue = lpSolver->objectiveValue(); 3228 fwrite(&numberRows,sizeof(int),1,fp); 3229 fwrite(&numberColumns,sizeof(int),1,fp); 3230 fwrite(&objectiveValue,sizeof(double),1,fp); 3278 int nWrite; 3279 nWrite=fwrite(&numberRows,sizeof(int),1,fp); 3280 if (nWrite!=1) 3281 throw("Error in fwrite"); 3282 nWrite=fwrite(&numberColumns,sizeof(int),1,fp); 3283 if (nWrite!=1) 3284 throw("Error in fwrite"); 3285 nWrite=fwrite(&objectiveValue,sizeof(double),1,fp); 3286 if (nWrite!=1) 3287 throw("Error in fwrite"); 3231 3288 double * dualRowSolution = lpSolver->dualRowSolution(); 3232 3289 double * primalRowSolution = lpSolver->primalRowSolution(); 3233 fwrite(primalRowSolution,sizeof(double),numberRows,fp); 3234 fwrite(dualRowSolution,sizeof(double),numberRows,fp); 3290 nWrite=fwrite(primalRowSolution,sizeof(double),numberRows,fp); 3291 if (nWrite!=numberRows) 3292 throw("Error in fwrite"); 3293 nWrite=fwrite(dualRowSolution,sizeof(double),numberRows,fp); 3294 if (nWrite!=numberRows) 3295 throw("Error in fwrite"); 3235 3296 double * dualColumnSolution = lpSolver->dualColumnSolution(); 3236 3297 double * primalColumnSolution = lpSolver->primalColumnSolution(); 3237 fwrite(primalColumnSolution,sizeof(double),numberColumns,fp); 3238 fwrite(dualColumnSolution,sizeof(double),numberColumns,fp); 3298 nWrite=fwrite(primalColumnSolution,sizeof(double),numberColumns,fp); 3299 if (nWrite!=numberColumns) 3300 throw("Error in fwrite"); 3301 nWrite=fwrite(dualColumnSolution,sizeof(double),numberColumns,fp); 3302 if (nWrite!=numberColumns) 3303 throw("Error in fwrite"); 3239 3304 fclose(fp); 3240 3305 } else { -
trunk/Clp/src/CbcOrClpParam.hpp
r1401 r1402 76 76 PRIMALPIVOT,PRESOLVE,CRASH,BIASLU,PERTURBATION,MESSAGES,AUTOSCALE, 77 77 CHOLESKY,KKT,BARRIERSCALE,GAMMA,CROSSOVER,PFI,INTPRINT,VECTOR, 78 FACTORIZATION, 78 FACTORIZATION,ALLCOMMANDS, 79 79 80 80 NODESTRATEGY = 251,BRANCHSTRATEGY,CUTSSTRATEGY,HEURISTICSTRATEGY, … … 109 109 CbcOrClpParam ( ); 110 110 CbcOrClpParam (std::string name, std::string help, 111 double lower, double upper, CbcOrClpParameterType type, bool display=true);111 double lower, double upper, CbcOrClpParameterType type,int display=2); 112 112 CbcOrClpParam (std::string name, std::string help, 113 int lower, int upper, CbcOrClpParameterType type, bool display=true);113 int lower, int upper, CbcOrClpParameterType type,int display=2); 114 114 // Other strings will be added by insert 115 115 CbcOrClpParam (std::string name, std::string help, std::string firstValue, 116 CbcOrClpParameterType type,int whereUsed=7, bool display=true);116 CbcOrClpParameterType type,int whereUsed=7,int display=2); 117 117 // Action 118 118 CbcOrClpParam (std::string name, std::string help, 119 CbcOrClpParameterType type,int whereUsed=7, bool display=true);119 CbcOrClpParameterType type,int whereUsed=7,int display=2); 120 120 /// Copy constructor. 121 121 CbcOrClpParam(const CbcOrClpParam &); … … 180 180 /// Returns name which could match 181 181 std::string matchName ( ) const; 182 /// Returns length of name for ptinting 183 int lengthMatchName ( ) const; 182 184 /// Returns parameter option which matches (-1 if none) 183 185 int parameterOption ( std::string check ) const; … … 214 216 { return type_;} 215 217 /// whether to display 216 inline booldisplayThis() const218 inline int displayThis() const 217 219 { return display_;} 218 220 /// Set Long help … … 267 269 int currentKeyWord_; 268 270 /// Display on ? 269 booldisplay_;271 int display_; 270 272 /// Integer parameter - current value 271 273 int intValue_; -
trunk/Clp/src/ClpCholeskyBase.cpp
r1371 r1402 1186 1186 } 1187 1187 while (counter <= n) { 1188 for (deg = mindeg; head[deg - 1] < 1; deg++);1188 for (deg = mindeg; head[deg - 1] < 1; deg++) {}; 1189 1189 nodeg = 0; 1190 1190 #ifdef WSSMP_DBG … … 1705 1705 for (l = 1; l <= n; l++) { 1706 1706 if (!invp[l - 1]) { 1707 for (i = -xadj[l - 1]; invp[i - 1] >= 0; i = -xadj[i - 1]) ;1707 for (i = -xadj[l - 1]; invp[i - 1] >= 0; i = -xadj[i - 1]){}; 1708 1708 tn = i; 1709 1709 #ifdef WSSMP_DBG … … 3532 3532 // do dense 3533 3533 // update dense part 3534 updateDense(d, work,first);3534 updateDense(d,/*work,*/first); 3535 3535 ClpCholeskyDense dense; 3536 3536 // just borrow space … … 3570 3570 } 3571 3571 // Updates dense part (broken out for profiling) 3572 void ClpCholeskyBase::updateDense(longDouble * d, longDouble * work,int * first)3572 void ClpCholeskyBase::updateDense(longDouble * d, /*longDouble * work,*/ int * first) 3573 3573 { 3574 3574 for (int iRow=0;iRow<firstDense_;iRow++) { -
trunk/Clp/src/ClpCholeskyBase.hpp
r1371 r1402 195 195 int preOrder(bool lowerTriangular, bool includeDiagonal, bool doKKT); 196 196 /// Updates dense part (broken out for profiling) 197 void updateDense(longDouble * d, longDouble * work,int * first);197 void updateDense(longDouble * d, /*longDouble * work,*/ int * first); 198 198 //@} 199 199 -
trunk/Clp/src/ClpCholeskyDense.cpp
r1371 r1402 687 687 { 688 688 if (nThis<=BLOCK&&nLeft<=BLOCK) { 689 ClpCholeskyCtriRecLeaf( thisStruct,aTri,aUnder,diagonal,work,nLeft);689 ClpCholeskyCtriRecLeaf(/*thisStruct,*/ aTri,aUnder,diagonal,work,nLeft); 690 690 } else if (nThis<nLeft) { 691 691 int nb=number_blocks((nLeft+1)>>1); … … 722 722 { 723 723 if (nTri<=BLOCK&&nDo<=BLOCK) { 724 ClpCholeskyCrecTriLeaf( thisStruct, aUnder,aTri,diagonal,work,nTri);724 ClpCholeskyCrecTriLeaf(/*thisStruct,*/ aUnder,aTri,/*diagonal,*/work,nTri); 725 725 } else if (nTri<nDo) { 726 726 int nb=number_blocks((nDo+1)>>1); … … 763 763 if (nDo<=BLOCK&&nUnder<=BLOCK&&nUnderK<=BLOCK) { 764 764 assert (nDo==BLOCK&&nUnder==BLOCK); 765 ClpCholeskyCrecRecLeaf( thisStruct,above , aUnder , aOther, work, nUnderK);765 ClpCholeskyCrecRecLeaf(/*thisStruct,*/ above , aUnder , aOther, work, nUnderK); 766 766 } else if (nDo<=nUnderK&&nUnder<=nUnderK) { 767 767 int nb=number_blocks((nUnderK+1)>>1); … … 867 867 /* Leaf recursive triangle rectangle update*/ 868 868 void 869 ClpCholeskyCtriRecLeaf( ClpCholeskyDenseC * thisStruct,longDouble * aTri, longDouble * aUnder, longDouble * diagonal, longDouble * work,869 ClpCholeskyCtriRecLeaf(/*ClpCholeskyDenseC * thisStruct,*/ longDouble * aTri, longDouble * aUnder, longDouble * diagonal, longDouble * work, 870 870 int nUnder) 871 871 { … … 941 941 } 942 942 /* Leaf recursive rectangle triangle update*/ 943 void ClpCholeskyCrecTriLeaf( ClpCholeskyDenseC * thisStruct,longDouble * aUnder, longDouble * aTri,944 longDouble * diagonal,longDouble * work, int nUnder)943 void ClpCholeskyCrecTriLeaf(/*ClpCholeskyDenseC * thisStruct,*/ longDouble * aUnder, longDouble * aTri, 944 /*longDouble * diagonal,*/ longDouble * work, int nUnder) 945 945 { 946 946 #ifdef POS_DEBUG … … 1024 1024 */ 1025 1025 void 1026 ClpCholeskyCrecRecLeaf( ClpCholeskyDenseC * thisStruct,1026 ClpCholeskyCrecRecLeaf(/*ClpCholeskyDenseC * thisStruct,*/ 1027 1027 const longDouble * COIN_RESTRICT above, 1028 1028 const longDouble * COIN_RESTRICT aUnder, -
trunk/Clp/src/ClpCholeskyDense.hpp
r1371 r1402 134 134 /**Leaf recursive triangle rectangle update */ 135 135 void 136 ClpCholeskyCtriRecLeaf( ClpCholeskyDenseC * thisStruct,136 ClpCholeskyCtriRecLeaf(/*ClpCholeskyDenseC * thisStruct,*/ 137 137 longDouble * aTri, longDouble * aUnder, 138 138 longDouble * diagonal, longDouble * work, … … 140 140 /**Leaf recursive rectangle triangle update */ 141 141 void 142 ClpCholeskyCrecTriLeaf( ClpCholeskyDenseC * thisStruct,142 ClpCholeskyCrecTriLeaf(/*ClpCholeskyDenseC * thisStruct, */ 143 143 longDouble * aUnder, longDouble * aTri, 144 longDouble * diagonal,longDouble * work, int nUnder);144 /*longDouble * diagonal,*/ longDouble * work, int nUnder); 145 145 /** Leaf recursive rectangle rectangle update, 146 146 nUnder is number of rows in iBlock, … … 148 148 */ 149 149 void 150 ClpCholeskyCrecRecLeaf( ClpCholeskyDenseC * thisStruct,150 ClpCholeskyCrecRecLeaf(/*ClpCholeskyDenseC * thisStruct, */ 151 151 const longDouble * COIN_RESTRICT above, 152 152 const longDouble * COIN_RESTRICT aUnder, -
trunk/Clp/src/ClpConstraintLinear.cpp
r1370 r1402 182 182 */ 183 183 int 184 ClpConstraintLinear::markNonlinear(char * which) const184 ClpConstraintLinear::markNonlinear(char *) const 185 185 { 186 186 return 0; -
trunk/Clp/src/ClpConstraintQuadratic.cpp
r1370 r1402 227 227 // Scale constraint 228 228 void 229 ClpConstraintQuadratic::reallyScale(const double * columnScale)229 ClpConstraintQuadratic::reallyScale(const double * ) 230 230 { 231 231 abort(); -
trunk/Clp/src/ClpDualRowDantzig.cpp
r1370 r1402 81 81 // FT update and returns pivot alpha 82 82 double 83 ClpDualRowDantzig::updateWeights(CoinIndexedVector * input,83 ClpDualRowDantzig::updateWeights(CoinIndexedVector * /*input*/, 84 84 CoinIndexedVector * spare, 85 CoinIndexedVector * spare2,85 CoinIndexedVector * /*spare2*/, 86 86 CoinIndexedVector * updatedColumn) 87 87 { -
trunk/Clp/src/ClpDualRowPivot.cpp
r1370 r1402 52 52 } 53 53 void 54 ClpDualRowPivot::saveWeights(ClpSimplex * model,int mode)54 ClpDualRowPivot::saveWeights(ClpSimplex * model,int /*mode*/) 55 55 { 56 56 model_=model; -
trunk/Clp/src/ClpDummyMatrix.cpp
r1370 r1402 50 50 } 51 51 52 ClpDummyMatrix::ClpDummyMatrix (const CoinPackedMatrix & rhs)52 ClpDummyMatrix::ClpDummyMatrix (const CoinPackedMatrix & ) 53 53 : ClpMatrixBase() 54 54 { … … 96 96 //unscaled versions 97 97 void 98 ClpDummyMatrix::times(double scalar,99 const double * x, double * y) const98 ClpDummyMatrix::times(double , 99 const double * , double * ) const 100 100 { 101 101 std::cerr<<"times not supported - ClpDummyMatrix"<<std::endl; … … 103 103 } 104 104 void 105 ClpDummyMatrix::transposeTimes(double scalar,106 const double * x, double * y) const105 ClpDummyMatrix::transposeTimes(double , 106 const double * , double * ) const 107 107 { 108 108 std::cerr<<"transposeTimes not supported - ClpDummyMatrix"<<std::endl; … … 110 110 } 111 111 void 112 ClpDummyMatrix::times(double scalar,113 const double * x, double * y,114 const double * rowScale,115 const double * columnScale) const112 ClpDummyMatrix::times(double , 113 const double * , double * , 114 const double * , 115 const double * ) const 116 116 { 117 117 std::cerr<<"timesnot supported - ClpDummyMatrix"<<std::endl; … … 119 119 } 120 120 void 121 ClpDummyMatrix::transposeTimes( double scalar,122 const double * x, double * y,123 const double * rowScale,124 const double * columnScale) const121 ClpDummyMatrix::transposeTimes( double, 122 const double * , double * , 123 const double * , 124 const double * ) const 125 125 { 126 126 std::cerr<<"transposeTimesnot supported - ClpDummyMatrix"<<std::endl; … … 130 130 Squashes small elements and knows about ClpSimplex */ 131 131 void 132 ClpDummyMatrix::transposeTimes(const ClpSimplex * model, double scalar,133 const CoinIndexedVector * rowArray,134 CoinIndexedVector * y,135 CoinIndexedVector * columnArray) const132 ClpDummyMatrix::transposeTimes(const ClpSimplex * , double , 133 const CoinIndexedVector * , 134 CoinIndexedVector * , 135 CoinIndexedVector * ) const 136 136 { 137 137 std::cerr<<"transposeTimes not supported - ClpDummyMatrix"<<std::endl; … … 141 141 just for indices in y */ 142 142 void 143 ClpDummyMatrix::subsetTransposeTimes(const ClpSimplex * model,144 const CoinIndexedVector * rowArray,145 const CoinIndexedVector * y,146 CoinIndexedVector * columnArray) const143 ClpDummyMatrix::subsetTransposeTimes(const ClpSimplex * , 144 const CoinIndexedVector * , 145 const CoinIndexedVector * , 146 CoinIndexedVector * ) const 147 147 { 148 148 std::cerr<<"subsetTransposeTimes not supported - ClpDummyMatrix"<<std::endl; … … 151 151 /// returns number of elements in column part of basis, 152 152 CoinBigIndex 153 ClpDummyMatrix::countBasis(ClpSimplex * model, 154 const int * whichColumn, 155 int numberBasic, 156 int & numberColumnBasic) 153 ClpDummyMatrix::countBasis(const int * , 154 int & ) 157 155 { 158 156 std::cerr<<"countBasis not supported - ClpDummyMatrix"<<std::endl; … … 161 159 } 162 160 void 163 ClpDummyMatrix::fillBasis(ClpSimplex * model,164 const int * whichColumn,165 int & numberColumnBasic,166 int * row, int * start,167 int * rowCount, int * columnCount,168 CoinFactorizationDouble * element)161 ClpDummyMatrix::fillBasis(ClpSimplex * , 162 const int * , 163 int & , 164 int * , int * , 165 int * , int * , 166 CoinFactorizationDouble * ) 169 167 { 170 168 std::cerr<<"fillBasis not supported - ClpDummyMatrix"<<std::endl; … … 174 172 */ 175 173 void 176 ClpDummyMatrix::unpack(const ClpSimplex * model,CoinIndexedVector * rowArray,177 int iColumn) const174 ClpDummyMatrix::unpack(const ClpSimplex * ,CoinIndexedVector * , 175 int ) const 178 176 { 179 177 std::cerr<<"unpack not supported - ClpDummyMatrix"<<std::endl; … … 185 183 be modified if doing column generation (just for this variable) */ 186 184 void 187 ClpDummyMatrix::unpackPacked(ClpSimplex * model,188 CoinIndexedVector * rowArray,189 int iColumn) const185 ClpDummyMatrix::unpackPacked(ClpSimplex * , 186 CoinIndexedVector * , 187 int ) const 190 188 { 191 189 std::cerr<<"unpackPacked not supported - ClpDummyMatrix"<<std::endl; … … 195 193 You can use quickAdd to add to vector */ 196 194 void 197 ClpDummyMatrix::add(const ClpSimplex * model,CoinIndexedVector * rowArray,198 int iColumn, double multiplier) const195 ClpDummyMatrix::add(const ClpSimplex * ,CoinIndexedVector * , 196 int , double ) const 199 197 { 200 198 std::cerr<<"add not supported - ClpDummyMatrix"<<std::endl; … … 203 201 /* Adds multiple of a column into an array */ 204 202 void 205 ClpDummyMatrix::add(const ClpSimplex * model,double * array,206 int column, double multiplier) const203 ClpDummyMatrix::add(const ClpSimplex * ,double * , 204 int , double ) const 207 205 { 208 206 std::cerr<<"add not supported - ClpDummyMatrix"<<std::endl; … … 246 244 } 247 245 /* Delete the columns whose indices are listed in <code>indDel</code>. */ 248 void ClpDummyMatrix::deleteCols(const int numDel, const int * indDel)246 void ClpDummyMatrix::deleteCols(const int , const int * ) 249 247 { 250 248 std::cerr<<"deleteCols not supported - ClpDummyMatrix"<<std::endl; … … 252 250 } 253 251 /* Delete the rows whose indices are listed in <code>indDel</code>. */ 254 void ClpDummyMatrix::deleteRows(const int numDel, const int * indDel)252 void ClpDummyMatrix::deleteRows(const int , const int * ) 255 253 { 256 254 std::cerr<<"deleteRows not supported - ClpDummyMatrix"<<std::endl; -
trunk/Clp/src/ClpDummyMatrix.hpp
r1370 r1402 56 56 virtual ClpMatrixBase * reverseOrderedCopy() const; 57 57 /// Returns number of elements in column part of basis 58 virtual CoinBigIndex countBasis(ClpSimplex * model, 59 const int * whichColumn, 60 int numberRowBasic, 58 virtual CoinBigIndex countBasis(const int * whichColumn, 61 59 int & numberColumnBasic); 62 60 /// Fills in column part of basis -
trunk/Clp/src/ClpDynamicMatrix.cpp
r1370 r1402 569 569 double * 570 570 ClpDynamicMatrix::rhsOffset(ClpSimplex * model,bool forceRefresh, 571 bool check) 571 bool 572 #ifdef CLP_DEBUG 573 check 574 #endif 575 ) 572 576 { 573 577 //forceRefresh=true; … … 892 896 void 893 897 ClpDynamicMatrix::dualExpanded(ClpSimplex * model, 894 CoinIndexedVector * array,895 double * other,int mode)898 CoinIndexedVector * /*array*/, 899 double * /*other*/,int mode) 896 900 { 897 901 switch (mode) { -
trunk/Clp/src/ClpDynamicMatrix.hpp
r1370 r1402 103 103 Entries at upper bound (really nonzero) never go out (at present). 104 104 */ 105 virtual void packDown(const int * in, int numberToPack) {}105 virtual void packDown(const int * , int ) {} 106 106 /// Gets lower bound (to simplify coding) 107 107 inline double columnLower(int sequence) const -
trunk/Clp/src/ClpFactorization.cpp
r1401 r1402 1509 1509 int numberColumnBasic = numberBasic-numberRowBasic; 1510 1510 1511 numberElements +=matrix->countBasis(model, 1512 pivotTemp+numberRowBasic, 1513 numberRowBasic, 1511 numberElements +=matrix->countBasis(pivotTemp+numberRowBasic, 1514 1512 numberColumnBasic); 1515 1513 // Not needed for dense … … 1902 1900 int numberColumnBasic = numberBasic-numberRowBasic; 1903 1901 1904 numberElements +=matrix->countBasis(model, 1905 pivotTemp+numberRowBasic, 1906 numberRowBasic, 1902 numberElements +=matrix->countBasis( pivotTemp+numberRowBasic, 1907 1903 numberColumnBasic); 1908 1904 // and recompute as network side say different -
trunk/Clp/src/ClpGubDynamicMatrix.cpp
r1370 r1402 1540 1540 double * 1541 1541 ClpGubDynamicMatrix::rhsOffset(ClpSimplex * model,bool forceRefresh, 1542 bool check) 1542 bool 1543 #ifdef CLP_DEBUG 1544 check 1545 #endif 1546 ) 1543 1547 { 1544 1548 //forceRefresh=true; … … 1994 1998 */ 1995 1999 int 1996 ClpGubDynamicMatrix::checkFeasible(ClpSimplex * model,double & sum) const2000 ClpGubDynamicMatrix::checkFeasible(ClpSimplex * /*model*/,double & sum) const 1997 2001 { 1998 2002 int numberRows = model_->numberRows(); -
trunk/Clp/src/ClpGubMatrix.cpp
r1370 r1402 893 893 /// returns number of elements in column part of basis, 894 894 CoinBigIndex 895 ClpGubMatrix::countBasis(ClpSimplex * model,895 ClpGubMatrix::countBasis(ClpSimplex * /*model*/, 896 896 const int * whichColumn, 897 897 int numberBasic, … … 2214 2214 ClpGubMatrix::dualExpanded(ClpSimplex * model, 2215 2215 CoinIndexedVector * array, 2216 double * other,int mode)2216 double * /*other*/,int mode) 2217 2217 { 2218 2218 switch (mode) { … … 2224 2224 ClpSimplex::Status iStatus; 2225 2225 // not dual values yet 2226 assert (!other);2226 //assert (!other); 2227 2227 //double * work = array->denseVector(); 2228 2228 double infeasibilityCost = model->infeasibilityCost(); … … 2594 2594 // This is local to Gub to allow synchronization when status is good 2595 2595 int 2596 ClpGubMatrix::synchronize(ClpSimplex * model, int mode)2596 ClpGubMatrix::synchronize(ClpSimplex *, int) 2597 2597 { 2598 2598 return 0; … … 3512 3512 expensive. This may re-compute */ 3513 3513 double * 3514 ClpGubMatrix::rhsOffset(ClpSimplex * model,bool forceRefresh,bool check) 3514 ClpGubMatrix::rhsOffset(ClpSimplex * model,bool forceRefresh,bool 3515 #ifdef CLP_DEBUG 3516 check 3517 #endif 3518 ) 3515 3519 { 3516 3520 //forceRefresh=true; … … 3639 3643 */ 3640 3644 int 3641 ClpGubMatrix::updatePivot(ClpSimplex * model,double oldInValue, double oldOutValue)3645 ClpGubMatrix::updatePivot(ClpSimplex * model,double oldInValue, double /*oldOutValue*/) 3642 3646 { 3643 3647 int sequenceIn = model->sequenceIn(); … … 4077 4081 // Correct sequence in and out to give true value 4078 4082 void 4079 ClpGubMatrix::correctSequence(const ClpSimplex * model,int & sequenceIn, int & sequenceOut)4083 ClpGubMatrix::correctSequence(const ClpSimplex * /*model*/,int & sequenceIn, int & sequenceOut) 4080 4084 { 4081 4085 if (sequenceIn!=-999) { -
trunk/Clp/src/ClpLinearObjective.cpp
r1370 r1402 99 99 // Returns gradient 100 100 double * 101 ClpLinearObjective::gradient(const ClpSimplex * model, 102 const double * solution, double & offset,bool refresh, 103 int includeLinear) 101 ClpLinearObjective::gradient(const ClpSimplex * /*model*/, 102 const double * /*solution*/, double & offset, 103 bool /*refresh*/, 104 int /*includeLinear*/) 104 105 { 105 106 // not sure what to do about scaling 106 107 //assert (!model); 107 assert (includeLinear==2); //otherwise need to return all zeros108 //assert (includeLinear==2); //otherwise need to return all zeros 108 109 offset=0.0; 109 110 return objective_; … … 114 115 double 115 116 ClpLinearObjective::reducedGradient(ClpSimplex * model, double * region, 116 bool useFeasibleCosts)117 bool /*useFeasibleCosts*/) 117 118 { 118 119 int numberRows = model->numberRows(); … … 131 132 int number=0; 132 133 const double * cost = model->costRegion(); 133 assert (!useFeasibleCosts);134 //assert (!useFeasibleCosts); 134 135 const int * pivotVariable = model->pivotVariable(); 135 136 for (iRow=0;iRow<numberRows;iRow++) { -
trunk/Clp/src/ClpMain.cpp
r1379 r1402 68 68 __cdecl 69 69 #endif // _MSC_VER 70 signal_handler(int whichSignal)70 signal_handler(int /*whichSignal*/) 71 71 { 72 72 if (currentModel!=NULL) … … 282 282 std::cout<<"abcd value sets value"<<std::endl; 283 283 std::cout<<"Commands are:"<<std::endl; 284 int maxAcross= 5;284 int maxAcross=10; 285 285 bool evenHidden=false; 286 int printLevel = 287 parameters[whichParam(ALLCOMMANDS, 288 numberParameters,parameters)].currentOptionAsInteger(); 289 int convertP[]={2,1,0}; 290 printLevel=convertP[printLevel]; 286 291 if ((verbose&8)!=0) { 287 292 // even hidden … … 300 305 for (iType=0;iType<4;iType++) { 301 306 int across=0; 307 int lengthLine=0; 302 308 if ((verbose%4)!=0) 303 309 std::cout<<std::endl; … … 307 313 for ( iParam=0; iParam<numberParameters; iParam++ ) { 308 314 int type = parameters[iParam].type(); 309 if ((parameters[iParam].displayThis()||evenHidden)&& 315 //printf("%d type %d limits %d %d display %d\n",iParam, 316 // type,limits[iType],limits[iType+1],parameters[iParam].displayThis()); 317 if ((parameters[iParam].displayThis()>=printLevel||evenHidden)&& 310 318 type>=limits[iType] 311 319 &&type<limits[iType+1]) { 312 320 if (!across) { 313 if ((verbose&2)==0) 314 std::cout<<" "; 315 else 321 if ((verbose&2)!=0) 316 322 std::cout<<"Command "; 317 323 } 318 std::cout<<parameters[iParam].matchName()<<" "; 324 int length = parameters[iParam].lengthMatchName()+1; 325 if (lengthLine+length>80) { 326 std::cout<<std::endl; 327 across=0; 328 lengthLine=0; 329 } 330 std::cout<<" "<<parameters[iParam].matchName(); 331 lengthLine += length ; 319 332 across++; 320 333 if (across==maxAcross) { … … 549 562 break; 550 563 default: 551 abort(); 564 //abort(); 565 break; 552 566 } 553 567 } -
trunk/Clp/src/ClpMatrixBase.cpp
r1370 r1402 111 111 const double * x, double * y, 112 112 const double * rowScale, 113 const double * columnScale) const113 const double * /*columnScale*/) const 114 114 { 115 115 if (rowScale) { … … 125 125 const double * x, double * y, 126 126 const double * rowScale, 127 const double * columnScale,128 double * spare) const127 const double * /*columnScale*/, 128 double * /*spare*/) const 129 129 { 130 130 if (rowScale) { … … 141 141 ClpMatrixBase * 142 142 ClpMatrixBase::subsetClone ( 143 int numberRows, const int * whichRows,144 int numberColumns, const int * whichColumns) const143 int /*numberRows*/, const int * /*whichRows*/, 144 int /*numberColumns*/, const int * /*whichColumns*/) const 145 145 146 146 … … 156 156 */ 157 157 CoinBigIndex * 158 ClpMatrixBase::dubiousWeights(const ClpSimplex * model,int * inputWeights) const158 ClpMatrixBase::dubiousWeights(const ClpSimplex * model,int * /*inputWeights*/) const 159 159 { 160 160 int number = model->numberRows()+model->numberColumns(); … … 168 168 // Append Columns 169 169 void 170 ClpMatrixBase::appendCols(int number, const CoinPackedVectorBase * const * columns) 170 ClpMatrixBase::appendCols(int /*number*/, 171 const CoinPackedVectorBase * const * /*columns*/) 171 172 { 172 173 std::cerr<<"appendCols not supported - ClpMatrixBase"<<std::endl; … … 175 176 // Append Rows 176 177 void 177 ClpMatrixBase::appendRows(int number, const CoinPackedVectorBase * const * rows) 178 ClpMatrixBase::appendRows(int /*number*/, 179 const CoinPackedVectorBase * const * /*rows*/) 178 180 { 179 181 std::cerr<<"appendRows not supported - ClpMatrixBase"<<std::endl; … … 235 237 // Partial pricing 236 238 void 237 ClpMatrixBase::partialPricing(ClpSimplex * model, double start, double end,238 int & bestSequence, int & numberWanted)239 ClpMatrixBase::partialPricing(ClpSimplex * , double , double , 240 int & , int & ) 239 241 { 240 242 std::cerr<<"partialPricing not supported - ClpMatrixBase"<<std::endl; … … 248 250 */ 249 251 int 250 ClpMatrixBase::extendUpdated(ClpSimplex * model,CoinIndexedVector * update,int mode)252 ClpMatrixBase::extendUpdated(ClpSimplex * ,CoinIndexedVector * ,int ) 251 253 { 252 254 return 0; … … 258 260 */ 259 261 void 260 ClpMatrixBase::primalExpanded(ClpSimplex * model,int mode)262 ClpMatrixBase::primalExpanded(ClpSimplex * ,int ) 261 263 { 262 264 } … … 267 269 */ 268 270 void 269 ClpMatrixBase::dualExpanded(ClpSimplex * model,270 CoinIndexedVector * array,271 double * other,int mode)271 ClpMatrixBase::dualExpanded(ClpSimplex * , 272 CoinIndexedVector * , 273 double * ,int ) 272 274 { 273 275 } … … 317 319 // Sets up an effective RHS 318 320 void 319 ClpMatrixBase::useEffectiveRhs(ClpSimplex * model)321 ClpMatrixBase::useEffectiveRhs(ClpSimplex * ) 320 322 { 321 323 std::cerr<<"useEffectiveRhs not supported - ClpMatrixBase"<<std::endl; … … 326 328 expensive. This may re-compute */ 327 329 double * 328 ClpMatrixBase::rhsOffset(ClpSimplex * model,bool forceRefresh,bool check) 330 ClpMatrixBase::rhsOffset(ClpSimplex * model,bool forceRefresh,bool 331 #ifdef CLP_DEBUG 332 check 333 #endif 334 ) 329 335 { 330 336 if (rhsOffset_) { … … 387 393 */ 388 394 int 389 ClpMatrixBase::updatePivot(ClpSimplex * model,double oldInValue, double oldOutValue)395 ClpMatrixBase::updatePivot(ClpSimplex * model,double oldInValue, double ) 390 396 { 391 397 if (rhsOffset_) { … … 416 422 */ 417 423 void 418 ClpMatrixBase::createVariable(ClpSimplex * model, int & bestSequence)424 ClpMatrixBase::createVariable(ClpSimplex *, int &) 419 425 { 420 426 } … … 549 555 // Correct sequence in and out to give true value 550 556 void 551 ClpMatrixBase::correctSequence(const ClpSimplex * model,int & sequenceIn, int & sequenceOut)557 ClpMatrixBase::correctSequence(const ClpSimplex * ,int & , int & ) 552 558 { 553 559 } 554 560 // Really scale matrix 555 561 void 556 ClpMatrixBase::reallyScale(const double * rowScale, const double * columnScale)562 ClpMatrixBase::reallyScale(const double * , const double * ) 557 563 { 558 564 std::cerr<<"reallyScale not supported - ClpMatrixBase"<<std::endl; … … 561 567 // Updates two arrays for steepest 562 568 void 563 ClpMatrixBase::transposeTimes2(const ClpSimplex * model,564 const CoinIndexedVector * pi1, CoinIndexedVector * dj1,565 const CoinIndexedVector * pi2, CoinIndexedVector * dj2,566 CoinIndexedVector * spare,567 double referenceIn, double devex,569 ClpMatrixBase::transposeTimes2(const ClpSimplex * , 570 const CoinIndexedVector * , CoinIndexedVector *, 571 const CoinIndexedVector * , 572 CoinIndexedVector * , 573 double , double , 568 574 // Array for exact devex to say what is in reference framework 569 unsigned int * reference,570 double * weights, double scaleFactor)575 unsigned int * , 576 double * , double ) 571 577 { 572 578 std::cerr<<"transposeTimes2 not supported - ClpMatrixBase"<<std::endl; … … 579 585 is thrown. */ 580 586 void 581 ClpMatrixBase::setDimensions(int numrows, int numcols){587 ClpMatrixBase::setDimensions(int , int ){ 582 588 // If odd matrix assume user knows what they are doing 583 589 } … … 587 593 If 0 then rows, 1 if columns */ 588 594 int 589 ClpMatrixBase::appendMatrix(int number, int type,590 const CoinBigIndex * starts, const int * index,591 const double * element, int numberOther)595 ClpMatrixBase::appendMatrix(int , int , 596 const CoinBigIndex * , const int * , 597 const double * , int ) 592 598 { 593 599 std::cerr<<"appendMatrix not supported - ClpMatrixBase"<<std::endl; … … 600 606 deleted unless keepZero true */ 601 607 void 602 ClpMatrixBase::modifyCoefficient(int row, int column, double newElement,603 bool keepZero)608 ClpMatrixBase::modifyCoefficient(int , int , double , 609 bool ) 604 610 { 605 611 std::cerr<<"modifyCoefficient not supported - ClpMatrixBase"<<std::endl; -
trunk/Clp/src/ClpMatrixBase.hpp
r1390 r1402 87 87 88 88 /// Returns number of elements in column part of basis 89 virtual CoinBigIndex countBasis(ClpSimplex * model, 90 const int * whichColumn, 91 int numberRowBasic, 89 virtual CoinBigIndex countBasis(const int * whichColumn, 92 90 int & numberColumnBasic)=0; 93 91 /// Fills in column part of basis … … 309 307 virtual void transposeTimes2(const ClpSimplex * model, 310 308 const CoinIndexedVector * pi1, CoinIndexedVector * dj1, 311 const CoinIndexedVector * pi2, CoinIndexedVector * dj2,309 const CoinIndexedVector * pi2, 312 310 CoinIndexedVector * spare, 313 311 double referenceIn, double devex, -
trunk/Clp/src/ClpNetworkBasis.cpp
r1370 r1402 45 45 const CoinBigIndex * startColumn, 46 46 const int * numberInColumn, 47 const int * indexRow, const CoinFactorizationDouble * element)47 const int * indexRow, const CoinFactorizationDouble * /*element*/) 48 48 { 49 49 #ifndef COIN_FAST_CODE -
trunk/Clp/src/ClpNetworkMatrix.cpp
r1370 r1402 337 337 ClpNetworkMatrix::times(double scalar, 338 338 const double * x, double * y, 339 const double * rowScale,340 const double * columnScale) const339 const double * /*rowScale*/, 340 const double * /*columnScale*/) const 341 341 { 342 342 // we know it is not scaled … … 346 346 ClpNetworkMatrix::transposeTimes( double scalar, 347 347 const double * x, double * y, 348 const double * rowScale, 349 const double * columnScale, double * spare) const 348 const double * /*rowScale*/, 349 const double * /*columnScale*/, 350 double * /*spare*/) const 350 351 { 351 352 // we know it is not scaled … … 481 482 just for indices in y. */ 482 483 void 483 ClpNetworkMatrix::subsetTransposeTimes(const ClpSimplex * model,484 ClpNetworkMatrix::subsetTransposeTimes(const ClpSimplex * /*model*/, 484 485 const CoinIndexedVector * rowArray, 485 486 const CoinIndexedVector * y, … … 523 524 /// returns number of elements in column part of basis, 524 525 CoinBigIndex 525 ClpNetworkMatrix::countBasis(ClpSimplex * model, 526 const int * whichColumn, 527 int numberBasic, 526 ClpNetworkMatrix::countBasis( const int * whichColumn, 528 527 int & numberColumnBasic) 529 528 { … … 547 546 } 548 547 void 549 ClpNetworkMatrix::fillBasis(ClpSimplex * model,548 ClpNetworkMatrix::fillBasis(ClpSimplex * /*model*/, 550 549 const int * whichColumn, 551 550 int & numberColumnBasic, … … 596 595 */ 597 596 void 598 ClpNetworkMatrix::unpack(const ClpSimplex * model,CoinIndexedVector * rowArray,597 ClpNetworkMatrix::unpack(const ClpSimplex * /*model*/,CoinIndexedVector * rowArray, 599 598 int iColumn) const 600 599 { … … 612 611 be modified if doing column generation (just for this variable) */ 613 612 void 614 ClpNetworkMatrix::unpackPacked(ClpSimplex * model,613 ClpNetworkMatrix::unpackPacked(ClpSimplex * /*model*/, 615 614 CoinIndexedVector * rowArray, 616 615 int iColumn) const … … 636 635 You can use quickAdd to add to vector */ 637 636 void 638 ClpNetworkMatrix::add(const ClpSimplex * model,CoinIndexedVector * rowArray,637 ClpNetworkMatrix::add(const ClpSimplex * /*model*/,CoinIndexedVector * rowArray, 639 638 int iColumn, double multiplier) const 640 639 { … … 649 648 /* Adds multiple of a column into an array */ 650 649 void 651 ClpNetworkMatrix::add(const ClpSimplex * model,double * array,650 ClpNetworkMatrix::add(const ClpSimplex * /*model*/,double * array, 652 651 int iColumn, double multiplier) const 653 652 { … … 1180 1179 ClpNetworkMatrix::appendMatrix(int number, int type, 1181 1180 const CoinBigIndex * starts, const int * index, 1182 const double * element, int numberOther)1181 const double * element, int /*numberOther*/) 1183 1182 { 1184 1183 int numberErrors=0; -
trunk/Clp/src/ClpNetworkMatrix.hpp
r1370 r1402 69 69 virtual ClpMatrixBase * reverseOrderedCopy() const; 70 70 /// Returns number of elements in column part of basis 71 virtual CoinBigIndex countBasis( ClpSimplex * model,71 virtual CoinBigIndex countBasis( 72 72 const int * whichColumn, 73 int numberRowBasic,74 73 int & numberColumnBasic); 75 74 /// Fills in column part of basis -
trunk/Clp/src/ClpNode.cpp
r1371 r1402 448 448 // Copy constructor 449 449 //------------------------------------------------------------------- 450 ClpNode::ClpNode (const ClpNode & source)450 ClpNode::ClpNode (const ClpNode & ) 451 451 { 452 452 printf("ClpNode copy not implemented\n"); … … 592 592 // Choose a new variable 593 593 void 594 ClpNode::chooseVariable(ClpSimplex * model, ClpNodeStuff * info)594 ClpNode::chooseVariable(ClpSimplex * , ClpNodeStuff * /*info*/) 595 595 { 596 596 #if 0 … … 605 605 // Fix on reduced costs 606 606 int 607 ClpNode::fixOnReducedCosts(ClpSimplex * model)607 ClpNode::fixOnReducedCosts(ClpSimplex * ) 608 608 { 609 609 -
trunk/Clp/src/ClpObjective.cpp
r1370 r1402 58 58 */ 59 59 ClpObjective * 60 ClpObjective::subsetClone (int numberColumns,61 const int * whichColumns) const60 ClpObjective::subsetClone (int, 61 const int * ) const 62 62 { 63 63 std::cerr<<"subsetClone not supported - ClpObjective"<<std::endl; … … 69 69 */ 70 70 int 71 ClpObjective::markNonlinear(char * which)71 ClpObjective::markNonlinear(char *) 72 72 { 73 73 return 0; -
trunk/Clp/src/ClpPackedMatrix.cpp
r1401 r1402 1883 1883 ClpPackedMatrix::transposeTimes2(const ClpSimplex * model, 1884 1884 const CoinIndexedVector * pi1, CoinIndexedVector * dj1, 1885 const CoinIndexedVector * pi2, CoinIndexedVector * dj2,1885 const CoinIndexedVector * pi2, 1886 1886 CoinIndexedVector * spare, 1887 1887 double referenceIn, double devex, … … 2178 2178 ClpPackedMatrix::subsetTimes2(const ClpSimplex * model, 2179 2179 CoinIndexedVector * dj1, 2180 const CoinIndexedVector * pi2, CoinIndexedVector * dj2,2180 const CoinIndexedVector * pi2, CoinIndexedVector *, 2181 2181 double referenceIn, double devex, 2182 2182 // Array for exact devex to say what is in reference framework … … 2271 2271 /// returns number of elements in column part of basis, 2272 2272 CoinBigIndex 2273 ClpPackedMatrix::countBasis(ClpSimplex * model, 2274 const int * whichColumn, 2275 int numberBasic, 2273 ClpPackedMatrix::countBasis( const int * whichColumn, 2276 2274 int & numberColumnBasic) 2277 2275 { … … 3079 3077 // Creates scales for column copy (rowCopy in model may be modified) 3080 3078 int 3081 ClpPackedMatrix::scale(ClpModel * model,const ClpSimplex * baseModel) const3079 ClpPackedMatrix::scale(ClpModel * model,const ClpSimplex * /*baseModel*/) const 3082 3080 { 3083 3081 //const ClpSimplex * baseModel=NULL; … … 4432 4430 // makes sure active columns correct 4433 4431 int 4434 ClpPackedMatrix::refresh(ClpSimplex * model)4432 ClpPackedMatrix::refresh(ClpSimplex * ) 4435 4433 { 4436 4434 numberActiveColumns_ = matrix_->getNumCols(); … … 4756 4754 // Useful Constructor 4757 4755 //------------------------------------------------------------------- 4758 ClpPackedMatrix2::ClpPackedMatrix2 (ClpSimplex * model,const CoinPackedMatrix * rowCopy)4756 ClpPackedMatrix2::ClpPackedMatrix2 (ClpSimplex * ,const CoinPackedMatrix * rowCopy) 4759 4757 : numberBlocks_(0), 4760 4758 numberRows_(0), -
trunk/Clp/src/ClpPackedMatrix.hpp
r1376 r1402 93 93 virtual ClpMatrixBase * reverseOrderedCopy() const; 94 94 /// Returns number of elements in column part of basis 95 virtual CoinBigIndex countBasis(ClpSimplex * model, 96 const int * whichColumn, 97 int numberRowBasic, 95 virtual CoinBigIndex countBasis(const int * whichColumn, 98 96 int & numberColumnBasic); 99 97 /// Fills in column part of basis … … 249 247 virtual void transposeTimes2(const ClpSimplex * model, 250 248 const CoinIndexedVector * pi1, CoinIndexedVector * dj1, 251 const CoinIndexedVector * pi2, CoinIndexedVector * dj2,249 const CoinIndexedVector * pi2, 252 250 CoinIndexedVector * spare, 253 251 double referenceIn, double devex, … … 258 256 virtual void subsetTimes2(const ClpSimplex * model, 259 257 CoinIndexedVector * dj1, 260 const CoinIndexedVector * pi2, CoinIndexedVector * dj2, 258 const CoinIndexedVector * pi2, CoinIndexedVector * dj2, 261 259 double referenceIn, double devex, 262 260 // Array for exact devex to say what is in reference framework -
trunk/Clp/src/ClpPlusMinusOneMatrix.cpp
r1370 r1402 473 473 ClpPlusMinusOneMatrix::times(double scalar, 474 474 const double * x, double * y, 475 const double * rowScale,476 const double * columnScale) const475 const double * /*rowScale*/, 476 const double * /*columnScale*/) const 477 477 { 478 478 // we know it is not scaled … … 482 482 ClpPlusMinusOneMatrix::transposeTimes( double scalar, 483 483 const double * x, double * y, 484 const double * rowScale, 485 const double * columnScale, double * spare) const 484 const double * /*rowScale*/, 485 const double * /*columnScale*/, 486 double * /*spare*/) const 486 487 { 487 488 // we know it is not scaled … … 891 892 just for indices in y. */ 892 893 void 893 ClpPlusMinusOneMatrix::subsetTransposeTimes(const ClpSimplex * model,894 ClpPlusMinusOneMatrix::subsetTransposeTimes(const ClpSimplex * , 894 895 const CoinIndexedVector * rowArray, 895 896 const CoinIndexedVector * y, … … 921 922 /// returns number of elements in column part of basis, 922 923 CoinBigIndex 923 ClpPlusMinusOneMatrix::countBasis(ClpSimplex * model, 924 const int * whichColumn, 925 int numberBasic, 924 ClpPlusMinusOneMatrix::countBasis(const int * whichColumn, 926 925 int & numberColumnBasic) 927 926 { … … 935 934 } 936 935 void 937 ClpPlusMinusOneMatrix::fillBasis(ClpSimplex * model,936 ClpPlusMinusOneMatrix::fillBasis(ClpSimplex * , 938 937 const int * whichColumn, 939 938 int & numberColumnBasic, … … 967 966 */ 968 967 void 969 ClpPlusMinusOneMatrix::unpack(const ClpSimplex * model,968 ClpPlusMinusOneMatrix::unpack(const ClpSimplex * , 970 969 CoinIndexedVector * rowArray, 971 970 int iColumn) const … … 986 985 be modified if doing column generation (just for this variable) */ 987 986 void 988 ClpPlusMinusOneMatrix::unpackPacked(ClpSimplex * model,987 ClpPlusMinusOneMatrix::unpackPacked(ClpSimplex * , 989 988 CoinIndexedVector * rowArray, 990 989 int iColumn) const … … 1010 1009 You can use quickAdd to add to vector */ 1011 1010 void 1012 ClpPlusMinusOneMatrix::add(const ClpSimplex * model,CoinIndexedVector * rowArray,1011 ClpPlusMinusOneMatrix::add(const ClpSimplex * ,CoinIndexedVector * rowArray, 1013 1012 int iColumn, double multiplier) const 1014 1013 { … … 1025 1024 /* Adds multiple of a column into an array */ 1026 1025 void 1027 ClpPlusMinusOneMatrix::add(const ClpSimplex * model,double * array,1026 ClpPlusMinusOneMatrix::add(const ClpSimplex * ,double * array, 1028 1027 int iColumn, double multiplier) const 1029 1028 { … … 1677 1676 ClpPlusMinusOneMatrix::transposeTimes2(const ClpSimplex * model, 1678 1677 const CoinIndexedVector * pi1, CoinIndexedVector * dj1, 1679 const CoinIndexedVector * pi2, CoinIndexedVector * dj2,1678 const CoinIndexedVector * pi2, CoinIndexedVector * , 1680 1679 CoinIndexedVector * spare, 1681 1680 double referenceIn, double devex, … … 1821 1820 // Updates second array for steepest and does devex weights 1822 1821 void 1823 ClpPlusMinusOneMatrix::subsetTimes2(const ClpSimplex * model,1822 ClpPlusMinusOneMatrix::subsetTimes2(const ClpSimplex * , 1824 1823 CoinIndexedVector * dj1, 1825 const CoinIndexedVector * pi2, CoinIndexedVector * dj2,1824 const CoinIndexedVector * pi2, CoinIndexedVector *, 1826 1825 double referenceIn, double devex, 1827 1826 // Array for exact devex to say what is in reference framework … … 1930 1929 ClpPlusMinusOneMatrix::appendMatrix(int number, int type, 1931 1930 const CoinBigIndex * starts, const int * index, 1932 const double * element, int numberOther)1931 const double * element, int /*numberOther*/) 1933 1932 { 1934 1933 int numberErrors=0; -
trunk/Clp/src/ClpPlusMinusOneMatrix.hpp
r1370 r1402 70 70 virtual ClpMatrixBase * reverseOrderedCopy() const; 71 71 /// Returns number of elements in column part of basis 72 virtual CoinBigIndex countBasis( ClpSimplex * model,72 virtual CoinBigIndex countBasis( 73 73 const int * whichColumn, 74 int numberRowBasic,75 74 int & numberColumnBasic); 76 75 /// Fills in column part of basis -
trunk/Clp/src/ClpPredictorCorrector.cpp
r1394 r1402 3051 3051 // updateSolution. Updates solution at end of iteration 3052 3052 //returns number fixed 3053 int ClpPredictorCorrector::updateSolution(CoinWorkDouble nextGap)3053 int ClpPredictorCorrector::updateSolution(CoinWorkDouble /*nextGap*/) 3054 3054 { 3055 3055 CoinWorkDouble * dualArray = reinterpret_cast<CoinWorkDouble *>(dual_); … … 3757 3757 //See exactly what would happen given current deltas 3758 3758 void 3759 ClpPredictorCorrector::debugMove(int phase,CoinWorkDouble primalStep, CoinWorkDouble dualStep) 3759 ClpPredictorCorrector::debugMove(int /*phase*/, 3760 CoinWorkDouble primalStep, CoinWorkDouble dualStep) 3760 3761 { 3761 3762 #ifndef SOME_DEBUG -
trunk/Clp/src/ClpPresolve.cpp
r1370 r1402 1073 1073 #endif 1074 1074 CoinPresolveMatrix::CoinPresolveMatrix(int ncols0_in, 1075 double maxmin,1075 double /*maxmin*/, 1076 1076 // end prepost members 1077 1077 … … 1272 1272 #endif 1273 1273 1274 presolve_make_memlists( mcstrt_,hincol_, clink_, ncols_);1275 presolve_make_memlists( mrstrt_,hinrow_, rlink_, nrows_);1274 presolve_make_memlists(/*mcstrt_,*/ hincol_, clink_, ncols_); 1275 presolve_make_memlists(/*mrstrt_,*/ hinrow_, rlink_, nrows_); 1276 1276 1277 1277 // this allows last col/row to expand up to bufsize-1 (22); … … 1289 1289 1290 1290 void CoinPresolveMatrix::update_model(ClpSimplex * si, 1291 int nrows0,1292 int ncols0,1293 CoinBigIndex nelems0)1291 int /*nrows0*/, 1292 int /*ncols0*/, 1293 CoinBigIndex /*nelems0*/) 1294 1294 { 1295 1295 si->loadProblem(ncols_, nrows_, mcstrt_, hrow_, colels_, hincol_, -
trunk/Clp/src/ClpPrimalColumnDantzig.cpp
r1370 r1402 59 59 int 60 60 ClpPrimalColumnDantzig::pivotColumn(CoinIndexedVector * updates, 61 CoinIndexedVector * spareRow1,61 CoinIndexedVector * /*spareRow1*/, 62 62 CoinIndexedVector * spareRow2, 63 63 CoinIndexedVector * spareColumn1, -
trunk/Clp/src/ClpPrimalColumnDantzig.hpp
r1370 r1402 36 36 37 37 /// Just sets model 38 virtual void saveWeights(ClpSimplex * model,int mode)38 virtual void saveWeights(ClpSimplex * model,int) 39 39 {model_=model;} 40 40 //@} -
trunk/Clp/src/ClpPrimalColumnPivot.cpp
r1370 r1402 56 56 } 57 57 void 58 ClpPrimalColumnPivot::saveWeights(ClpSimplex * model,int mode)58 ClpPrimalColumnPivot::saveWeights(ClpSimplex * model,int ) 59 59 { 60 60 model_=model; … … 63 63 64 64 void 65 ClpPrimalColumnPivot::updateWeights(CoinIndexedVector * input)65 ClpPrimalColumnPivot::updateWeights(CoinIndexedVector *) 66 66 { 67 67 } … … 76 76 */ 77 77 int 78 ClpPrimalColumnPivot::numberSprintColumns(int & numberIterations) const78 ClpPrimalColumnPivot::numberSprintColumns(int & ) const 79 79 { 80 80 return 0; -
trunk/Clp/src/ClpPrimalColumnSteepest.cpp
r1371 r1402 287 287 if (switchType==5) { 288 288 if (anyUpdates>0) { 289 justDjs(updates,spareRow 1,spareRow2,289 justDjs(updates,spareRow2, 290 290 spareColumn1,spareColumn2); 291 291 } … … 293 293 if (switchType<4) { 294 294 // exact etc when can use dj 295 djsAndSteepest(updates,spareRow 1,spareRow2,295 djsAndSteepest(updates,spareRow2, 296 296 spareColumn1,spareColumn2); 297 297 } else { 298 298 // devex etc when can use dj 299 djsAndDevex(updates,spareRow 1,spareRow2,299 djsAndDevex(updates,spareRow2, 300 300 spareColumn1,spareColumn2); 301 301 } … … 303 303 if (switchType<4) { 304 304 // exact etc when djs okay 305 justSteepest(updates,spareRow 1,spareRow2,305 justSteepest(updates,spareRow2, 306 306 spareColumn1,spareColumn2); 307 307 } else { 308 308 // devex etc when djs okay 309 justDevex(updates,spareRow 1,spareRow2,309 justDevex(updates,spareRow2, 310 310 spareColumn1,spareColumn2); 311 311 } … … 313 313 if (switchType<4) { 314 314 // exact etc when have to use pivot 315 djsAndSteepest2(updates,spareRow 1,spareRow2,315 djsAndSteepest2(updates,spareRow2, 316 316 spareColumn1,spareColumn2); 317 317 } else { 318 318 // devex etc when have to use pivot 319 djsAndDevex2(updates,spareRow 1,spareRow2,319 djsAndDevex2(updates,spareRow2, 320 320 spareColumn1,spareColumn2); 321 321 } … … 595 595 void 596 596 ClpPrimalColumnSteepest::justDjs(CoinIndexedVector * updates, 597 CoinIndexedVector * spareRow1,598 597 CoinIndexedVector * spareRow2, 599 598 CoinIndexedVector * spareColumn1, … … 700 699 void 701 700 ClpPrimalColumnSteepest::djsAndDevex(CoinIndexedVector * updates, 702 CoinIndexedVector * spareRow1,703 701 CoinIndexedVector * spareRow2, 704 702 CoinIndexedVector * spareColumn1, … … 940 938 void 941 939 ClpPrimalColumnSteepest::djsAndSteepest(CoinIndexedVector * updates, 942 CoinIndexedVector * spareRow1,943 940 CoinIndexedVector * spareRow2, 944 941 CoinIndexedVector * spareColumn1, … … 1209 1206 void 1210 1207 ClpPrimalColumnSteepest::djsAndDevex2(CoinIndexedVector * updates, 1211 CoinIndexedVector * spareRow1,1212 1208 CoinIndexedVector * spareRow2, 1213 1209 CoinIndexedVector * spareColumn1, … … 1401 1397 void 1402 1398 ClpPrimalColumnSteepest::djsAndSteepest2(CoinIndexedVector * updates, 1403 CoinIndexedVector * spareRow1,1404 1399 CoinIndexedVector * spareRow2, 1405 1400 CoinIndexedVector * spareColumn1, … … 1666 1661 if (model_->clpMatrix()->canCombine(model_,pi1)) { 1667 1662 // put row of tableau in rowArray and columnArray 1668 model_->clpMatrix()->transposeTimes2(model_,pi1,dj1,pi2, dj2,spare,referenceIn, devex_,1663 model_->clpMatrix()->transposeTimes2(model_,pi1,dj1,pi2,spare,referenceIn, devex_, 1669 1664 reference_, 1670 1665 weights_,scaleFactor); … … 1725 1720 void 1726 1721 ClpPrimalColumnSteepest::justDevex(CoinIndexedVector * updates, 1727 CoinIndexedVector * spareRow1,1728 1722 CoinIndexedVector * spareRow2, 1729 1723 CoinIndexedVector * spareColumn1, … … 1833 1827 void 1834 1828 ClpPrimalColumnSteepest::justSteepest(CoinIndexedVector * updates, 1835 CoinIndexedVector * spareRow1,1836 1829 CoinIndexedVector * spareRow2, 1837 1830 CoinIndexedVector * spareColumn1, … … 1980 1973 int 1981 1974 ClpPrimalColumnSteepest::pivotColumnOldMethod(CoinIndexedVector * updates, 1982 CoinIndexedVector * spareRow1,1975 CoinIndexedVector * , 1983 1976 CoinIndexedVector * spareRow2, 1984 1977 CoinIndexedVector * spareColumn1, … … 2800 2793 alternateWeights_->capacity()==numberRows+ 2801 2794 model_->factorization()->maximumPivots()) { 2802 alternateWeights_->clear();2795 //alternateWeights_->clear(); 2803 2796 if (pivotSequence_>=0&&pivotSequence_<numberRows) { 2804 2797 // save pivot order -
trunk/Clp/src/ClpPrimalColumnSteepest.hpp
r1370 r1402 46 46 /// Just update djs 47 47 void justDjs(CoinIndexedVector * updates, 48 CoinIndexedVector * spareRow1,49 48 CoinIndexedVector * spareRow2, 50 49 CoinIndexedVector * spareColumn1, … … 57 56 /// Update djs, weights for Devex using djs 58 57 void djsAndDevex(CoinIndexedVector * updates, 59 CoinIndexedVector * spareRow1,60 58 CoinIndexedVector * spareRow2, 61 59 CoinIndexedVector * spareColumn1, … … 63 61 /// Update djs, weights for Steepest using djs 64 62 void djsAndSteepest(CoinIndexedVector * updates, 65 CoinIndexedVector * spareRow1,66 63 CoinIndexedVector * spareRow2, 67 64 CoinIndexedVector * spareColumn1, … … 69 66 /// Update djs, weights for Devex using pivot row 70 67 void djsAndDevex2(CoinIndexedVector * updates, 71 CoinIndexedVector * spareRow1,72 68 CoinIndexedVector * spareRow2, 73 69 CoinIndexedVector * spareColumn1, … … 75 71 /// Update djs, weights for Steepest using pivot row 76 72 void djsAndSteepest2(CoinIndexedVector * updates, 77 CoinIndexedVector * spareRow1,78 73 CoinIndexedVector * spareRow2, 79 74 CoinIndexedVector * spareColumn1, … … 81 76 /// Update weights for Devex 82 77 void justDevex(CoinIndexedVector * updates, 83 CoinIndexedVector * spareRow1,84 78 CoinIndexedVector * spareRow2, 85 79 CoinIndexedVector * spareColumn1, … … 87 81 /// Update weights for Steepest 88 82 void justSteepest(CoinIndexedVector * updates, 89 CoinIndexedVector * spareRow1,90 83 CoinIndexedVector * spareRow2, 91 84 CoinIndexedVector * spareColumn1, -
trunk/Clp/src/ClpSimplex.cpp
r1397 r1402 1153 1153 primal and dual solutions. Uses input arrays for variables at 1154 1154 bounds. Returns feasibility states */ 1155 int ClpSimplex::getSolution ( const double * rowActivities,1156 const double * columnActivities)1155 int ClpSimplex::getSolution ( const double * /*rowActivities*/, 1156 const double * /*columnActivities*/) 1157 1157 { 1158 1158 if (!factorization_->status()) { … … 4394 4394 } 4395 4395 } 4396 void checkCorrect(ClpSimplex * model,int iRow,4396 void checkCorrect(ClpSimplex * /*model*/,int iRow, 4397 4397 const double * element,const int * rowStart,const int * rowLength, 4398 4398 const int * column, 4399 4399 const double * columnLower_, const double * columnUpper_, 4400 int infiniteUpperC,4401 int infiniteLowerC,4400 int /*infiniteUpperC*/, 4401 int /*infiniteLowerC*/, 4402 4402 double &maximumUpC, 4403 4403 double &maximumDownC) … … 4441 4441 } 4442 4442 } 4443 assert (infiniteLowerC==infiniteLower);4444 assert (infiniteUpperC==infiniteUpper);4443 //assert (infiniteLowerC==infiniteLower); 4444 //assert (infiniteUpperC==infiniteUpper); 4445 4445 if (fabs(maximumUp-maximumUpC)>1.0e-12*CoinMax(fabs(maximumUp),fabs(maximumUpC))) 4446 4446 printf("row %d comp up %g, true up %g\n",iRow, … … 6734 6734 // This loads a model from a coinModel object - returns number of errors 6735 6735 int 6736 ClpSimplex::loadProblem ( CoinModel & modelObject, bool keepSolution)6736 ClpSimplex::loadProblem ( CoinModel & modelObject, bool /*keepSolution*/) 6737 6737 { 6738 6738 unsigned char * status = NULL; -
trunk/Clp/src/ClpSimplexDual.cpp
r1394 r1402 399 399 int nPivots=9999; 400 400 #endif 401 double largestPrimalError=0.0; 402 double largestDualError=0.0; 401 403 // Start can skip some things in transposeTimes 402 404 specialOptions_ |= 131072; … … 484 486 statusOfProblemInDual(lastCleaned,factorType,saveDuals,data, 485 487 ifValuesPass); 488 largestPrimalError=CoinMax(largestPrimalError,largestPrimalError_); 489 largestDualError=CoinMax(largestDualError,largestDualError_); 486 490 if (disaster) 487 491 problemStatus_=3; … … 555 559 // Stop can skip some things in transposeTimes 556 560 specialOptions_ &= ~131072; 561 largestPrimalError_=largestPrimalError; 562 largestDualError_=largestDualError; 557 563 } 558 564 int … … 1508 1514 } 1509 1515 // do actual flips 1510 flipBounds(rowArray_[0],columnArray_[0] ,theta_);1516 flipBounds(rowArray_[0],columnArray_[0]); 1511 1517 //rowArray_[1]->expand(); 1512 1518 dualRowPivot_->updatePrimalSolution(rowArray_[1], … … 2413 2419 if (fullRecompute) { 2414 2420 // do actual flips 2415 flipBounds(rowArray,columnArray ,0.0);2421 flipBounds(rowArray,columnArray); 2416 2422 } 2417 2423 objectiveChange += changeObj; … … 3163 3169 CoinIndexedVector * spareArray2, 3164 3170 double acceptablePivot, 3165 CoinBigIndex * dubiousWeights)3171 CoinBigIndex * /*dubiousWeights*/) 3166 3172 { 3167 3173 int numberPossiblySwapped=0; … … 5132 5138 void 5133 5139 ClpSimplexDual::flipBounds(CoinIndexedVector * rowArray, 5134 CoinIndexedVector * columnArray, 5135 double change) 5140 CoinIndexedVector * columnArray) 5136 5141 { 5137 5142 int number; -
trunk/Clp/src/ClpSimplexDual.hpp
r1370 r1402 175 175 double theta); 176 176 /** While updateDualsInDual sees what effect is of flip 177 this does actuall flipping. 178 If change >0.0 then value in array >0.0 => from lower to upper 177 this does actual flipping. 179 178 */ 180 179 void flipBounds(CoinIndexedVector * rowArray, 181 CoinIndexedVector * columnArray, 182 double change); 180 CoinIndexedVector * columnArray); 183 181 /** 184 182 Row array has row part of pivot row -
trunk/Clp/src/ClpSimplexOther.cpp
r1376 r1402 2282 2282 */ 2283 2283 int 2284 ClpSimplexOther::whileIterating(double startingTheta, double & endingTheta,double reportIncrement,2284 ClpSimplexOther::whileIterating(double startingTheta, double & endingTheta,double /*reportIncrement*/, 2285 2285 const double * changeLower, const double * changeUpper, 2286 2286 const double * changeObjective) … … 2545 2545 } 2546 2546 // do actual flips 2547 reinterpret_cast<ClpSimplexDual *> ( this)->flipBounds(rowArray_[0],columnArray_[0] ,theta_);2547 reinterpret_cast<ClpSimplexDual *> ( this)->flipBounds(rowArray_[0],columnArray_[0]); 2548 2548 //rowArray_[1]->expand(); 2549 2549 dualRowPivot_->updatePrimalSolution(rowArray_[1], … … 2779 2779 // Computes next theta and says if objective or bounds (0= bounds, 1 objective, -1 none) 2780 2780 int 2781 ClpSimplexOther::nextTheta(int type, double maxTheta, double * primalChange, double * dualChange,2781 ClpSimplexOther::nextTheta(int type, double maxTheta, double * primalChange, double * /*dualChange*/, 2782 2782 const double * changeLower, const double * changeUpper, 2783 const double * changeObjective)2783 const double * /*changeObjective*/) 2784 2784 { 2785 2785 int numberTotal = numberColumns_+numberRows_; -
trunk/Clp/src/ClpSimplexPrimal.cpp
r1394 r1402 1485 1485 CoinIndexedVector * rhsArray, 1486 1486 CoinIndexedVector * spareArray, 1487 CoinIndexedVector * spareArray2,1488 1487 int valuesPass) 1489 1488 { … … 2746 2745 matrix_->extendUpdated(this,rowArray_[1],0); 2747 2746 // do ratio test and re-compute dj 2748 primalRow(rowArray_[1],rowArray_[3],rowArray_[2], rowArray_[0],2747 primalRow(rowArray_[1],rowArray_[3],rowArray_[2], 2749 2748 ifValuesPass); 2750 2749 if (ifValuesPass) { … … 2755 2754 // try other way 2756 2755 directionIn_=-directionIn_; 2757 primalRow(rowArray_[1],rowArray_[3],rowArray_[2], rowArray_[0],2756 primalRow(rowArray_[1],rowArray_[3],rowArray_[2], 2758 2757 0); 2759 2758 } -
trunk/Clp/src/ClpSimplexPrimal.hpp
r1370 r1402 185 185 CoinIndexedVector * rhsArray, 186 186 CoinIndexedVector * spareArray, 187 CoinIndexedVector * spareArray2,188 187 int valuesPass); 189 188 /** -
trunk/Clp/src/ClpSolve.cpp
r1370 r1402 343 343 __cdecl 344 344 #endif // _MSC_VER 345 signal_handler(int whichSignal)345 signal_handler(int /*whichSignal*/) 346 346 { 347 347 if (currentModel!=NULL) … … 2670 2670 // Solve types 2671 2671 void 2672 ClpSolve::setSolveType(SolveType method, int extraInfo)2672 ClpSolve::setSolveType(SolveType method, int /*extraInfo*/) 2673 2673 { 2674 2674 method_=method; … … 3270 3270 CoinModelBlockInfo info = CoinModelBlockInfo(); 3271 3271 int whatsSet = thisBlock->whatIsSet(); 3272 info.matrix = ((whatsSet&1)!=0) ? 1 : 0;3273 info.rhs = ((whatsSet&2)!=0) ? 1 : 0;3274 info.rowName = ((whatsSet&4)!=0) ? 1 : 0;3275 info.integer = ((whatsSet&32)!=0) ? 1 : 0;3276 info.bounds = ((whatsSet&8)!=0) ? 1 : 0;3277 info.columnName = ((whatsSet&16)!=0) ? 1 : 0;3272 info.matrix = static_cast<char>(((whatsSet&1)!=0) ? 1 : 0); 3273 info.rhs = static_cast<char>(((whatsSet&2)!=0) ? 1 : 0); 3274 info.rowName = static_cast<char>(((whatsSet&4)!=0) ? 1 : 0); 3275 info.integer = static_cast<char>(((whatsSet&32)!=0) ? 1 : 0); 3276 info.bounds = static_cast<char>(((whatsSet&8)!=0) ? 1 : 0); 3277 info.columnName = static_cast<char>(((whatsSet&16)!=0) ? 1 : 0); 3278 3278 // Which block 3279 3279 int iRowBlock=model->rowBlock(thisBlock->getRowBlock()); … … 3662 3662 CoinModelBlockInfo info = CoinModelBlockInfo(); 3663 3663 int whatsSet = thisBlock->whatIsSet(); 3664 info.matrix = ((whatsSet&1)!=0) ? 1 : 0;3665 info.rhs = ((whatsSet&2)!=0) ? 1 : 0;3666 info.rowName = ((whatsSet&4)!=0) ? 1 : 0;3667 info.integer = ((whatsSet&32)!=0) ? 1 : 0;3668 info.bounds = ((whatsSet&8)!=0) ? 1 : 0;3669 info.columnName = ((whatsSet&16)!=0) ? 1 : 0;3664 info.matrix = static_cast<char>(((whatsSet&1)!=0) ? 1 : 0); 3665 info.rhs = static_cast<char>(((whatsSet&2)!=0) ? 1 : 0); 3666 info.rowName = static_cast<char>(((whatsSet&4)!=0) ? 1 : 0); 3667 info.integer = static_cast<char>(((whatsSet&32)!=0) ? 1 : 0); 3668 info.bounds = static_cast<char>(((whatsSet&8)!=0) ? 1 : 0); 3669 info.columnName = static_cast<char>(((whatsSet&16)!=0) ? 1 : 0); 3670 3670 // Which block 3671 3671 int iRowBlock=model->rowBlock(thisBlock->getRowBlock()); … … 4313 4313 CoinModelBlockInfo info = CoinModelBlockInfo(); 4314 4314 int whatsSet = thisBlock->whatIsSet(); 4315 info.matrix = ((whatsSet&1)!=0) ? 1 : 0;4316 info.rhs = ((whatsSet&2)!=0) ? 1 : 0;4317 info.rowName = ((whatsSet&4)!=0) ? 1 : 0;4318 info.integer = ((whatsSet&32)!=0) ? 1 : 0;4319 info.bounds = ((whatsSet&8)!=0) ? 1 : 0;4320 info.columnName = ((whatsSet&16)!=0) ? 1 : 0;4315 info.matrix = static_cast<char>(((whatsSet&1)!=0) ? 1 : 0); 4316 info.rhs = static_cast<char>(((whatsSet&2)!=0) ? 1 : 0); 4317 info.rowName = static_cast<char>(((whatsSet&4)!=0) ? 1 : 0); 4318 info.integer = static_cast<char>(((whatsSet&32)!=0) ? 1 : 0); 4319 info.bounds = static_cast<char>(((whatsSet&8)!=0) ? 1 : 0); 4320 info.columnName = static_cast<char>(((whatsSet&16)!=0) ? 1 : 0); 4321 4321 // Which block 4322 4322 int iRowBlock=model->rowBlock(thisBlock->getRowBlock()); -
trunk/Clp/src/Clp_C_Interface.cpp
r1390 r1402 92 92 93 93 CMessageHandler::CMessageHandler (const CoinMessageHandler & rhs) 94 : CoinMessageHandler( ),94 : CoinMessageHandler(rhs), 95 95 model_(NULL), 96 96 callback_(NULL) … … 100 100 // Constructor with pointer to model 101 101 CMessageHandler::CMessageHandler(Clp_Simplex * model, 102 FILE * userPointer)102 FILE * ) 103 103 : CoinMessageHandler(), 104 104 model_(model), … … 445 445 /* Sets problem name. Must have \0 at end. */ 446 446 COINLIBAPI int COINLINKAGE 447 Clp_setProblemName(Clp_Simplex * model, int maxNumberCharacters, char * array)447 Clp_setProblemName(Clp_Simplex * model, int /*maxNumberCharacters*/, char * array) 448 448 { 449 449 return model->model_->setStrParam(ClpProbName, array); -
trunk/Clp/src/IdiSolve.cpp
r1370 r1402 70 70 IdiotResult 71 71 Idiot::objval(int nrows, int ncols, double * rowsol , double * colsol, 72 double * pi, double * djs, const double * cost ,73 const double * rowlower,74 const double * rowupper, const double * lower,75 const double * upper, const double * elemnt,72 double * pi, double * /*djs*/, const double * cost , 73 const double * /*rowlower*/, 74 const double * rowupper, const double * /*lower*/, 75 const double * /*upper*/, const double * elemnt, 76 76 const int * row, const CoinBigIndex * columnStart, 77 77 const int * length, int extraBlock, int * rowExtra, 78 double * solExtra, double * elemExtra, double * upperExtra,78 double * solExtra, double * elemExtra, double * /*upperExtra*/, 79 79 double * costExtra,double weight) 80 80 { -
trunk/Clp/src/MyMessageHandler.cpp
r1370 r1402 43 43 44 44 MyMessageHandler::MyMessageHandler (const CoinMessageHandler & rhs) 45 : CoinMessageHandler( ),45 : CoinMessageHandler(rhs), 46 46 model_(NULL), 47 47 feasibleExtremePoints_(), … … 52 52 // Constructor with pointer to model 53 53 MyMessageHandler::MyMessageHandler(ClpSimplex * model, 54 FILE * userPointer)54 FILE * /*userPointer*/) 55 55 : CoinMessageHandler(), 56 56 model_(model), -
trunk/Clp/src/unitTest.cpp
r1370 r1402 1587 1587 char temp[100]; 1588 1588 // read and skip 1589 fscanf(fp,"%s",temp); 1589 int x=fscanf(fp,"%s",temp); 1590 if (x<0) 1591 throw("bad fscanf"); 1590 1592 assert (!strcmp(temp,"BEGIN")); 1591 fscanf(fp,"%*s %*s %d %d %*s %*s %d %*s",&problem, &numberRows,1593 x=fscanf(fp,"%*s %*s %d %d %*s %*s %d %*s",&problem, &numberRows, 1592 1594 &numberColumns); 1595 if (x<0) 1596 throw("bad fscanf"); 1593 1597 // scan down to SUPPLY 1594 1598 while (fgets(temp,100,fp)) { … … 1973 1977 std::string topName="row_master"; 1974 1978 std::string blockName="block_"; 1975 char bName = 'a'+static_cast<char>(i);1979 char bName = static_cast<char>('a'+static_cast<char>(i)); 1976 1980 blockName.append(1,bName); 1977 1981 structured.addBlock(topName,blockName,top); … … 1999 2003 for (int i=0;i<numberBlocks;i++) { 2000 2004 std::string blockName="block_"; 2001 char bName = 'a'+static_cast<char>(i);2005 char bName = static_cast<char>('a'+static_cast<char>(i)); 2002 2006 blockName.append(1,bName); 2003 2007 structured2.addBlock(blockName,blockName,structured);
Note: See TracChangeset
for help on using the changeset viewer.