Changeset 726
 Timestamp:
 Feb 17, 2006 12:32:43 PM (15 years ago)
 Location:
 trunk/Test
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Test/CbcOrClpParam.cpp
r725 r726 66 66 doubleValue_(1.0), 67 67 stringValue_(""), 68 indexNumber_(INVALID)68 whereUsed_(7) 69 69 { 70 70 } … … 86 86 doubleValue_(1.0), 87 87 stringValue_(""), 88 indexNumber_(type)88 whereUsed_(7) 89 89 { 90 90 lowerDoubleValue_ = lower; … … 108 108 doubleValue_(1.0), 109 109 stringValue_(""), 110 indexNumber_(type)110 whereUsed_(7) 111 111 { 112 112 gutsOfConstructor(); … … 134 134 doubleValue_(1.0), 135 135 stringValue_(""), 136 indexNumber_(type)136 whereUsed_(7) 137 137 { 138 138 gutsOfConstructor(); … … 141 141 // Action 142 142 CbcOrClpParam::CbcOrClpParam (std::string name, std::string help, 143 CbcOrClpParameterType type,int indexNumber,143 CbcOrClpParameterType type,int whereUsed, 144 144 bool display) 145 145 : type_(type), … … 159 159 stringValue_("") 160 160 { 161 if (indexNumber<0) 162 indexNumber_=type; 163 else 164 indexNumber_=indexNumber; 161 whereUsed_=whereUsed; 165 162 gutsOfConstructor(); 166 163 } … … 188 185 doubleValue_=rhs.doubleValue_; 189 186 stringValue_=rhs.stringValue_; 190 indexNumber_=rhs.indexNumber_;187 whereUsed_=rhs.whereUsed_; 191 188 } 192 189 … … 222 219 doubleValue_=rhs.doubleValue_; 223 220 stringValue_=rhs.stringValue_; 224 indexNumber_=rhs.indexNumber_;221 whereUsed_=rhs.whereUsed_; 225 222 } 226 223 return *this; … … 1064 1061 numberParameters=0; 1065 1062 parameters[numberParameters++]= 1066 CbcOrClpParam("?","For help",GENERALQUERY, 1,false);1067 parameters[numberParameters++]= 1068 CbcOrClpParam("???","For help",FULLGENERALQUERY, 1,false);1063 CbcOrClpParam("?","For help",GENERALQUERY,7,false); 1064 parameters[numberParameters++]= 1065 CbcOrClpParam("???","For help",FULLGENERALQUERY,7,false); 1069 1066 parameters[numberParameters++]= 1070 1067 CbcOrClpParam("","From stdin", … … 1085 1082 parameters[numberParameters++]= 1086 1083 CbcOrClpParam("allS!lack","Set basis back to all slack and reset solution", 1087 ALLSLACK );1084 ALLSLACK,3); 1088 1085 parameters[numberParameters1].setLonghelp 1089 1086 ( … … 1111 1108 parameters[numberParameters++]= 1112 1109 CbcOrClpParam("basisI!n","Import basis from bas file", 1113 BASISIN );1110 BASISIN,3); 1114 1111 parameters[numberParameters1].setLonghelp 1115 1112 ( … … 1269 1266 parameters[numberParameters++]= 1270 1267 CbcOrClpParam("debug!In","read valid solution from file", 1271 DEBUG, 1,false);1268 DEBUG,7,false); 1272 1269 parameters[numberParameters1].setLonghelp 1273 1270 ( … … 1285 1282 parameters[numberParameters++]= 1286 1283 CbcOrClpParam("directory","Set Default directory for import etc.", 1287 DIRECTORY ,299);1284 DIRECTORY); 1288 1285 parameters[numberParameters1].setLonghelp 1289 1286 ( … … 1368 1365 parameters[numberParameters++]= 1369 1366 CbcOrClpParam("error!sAllowed","Whether to allow import errors", 1370 "off",ERRORSALLOWED );1367 "off",ERRORSALLOWED,3); 1371 1368 parameters[numberParameters1].append("on"); 1372 1369 parameters[numberParameters1].setLonghelp … … 1502 1499 parameters[numberParameters++]= 1503 1500 CbcOrClpParam("import","Import model from mps file", 1504 IMPORT );1501 IMPORT,3); 1505 1502 parameters[numberParameters1].setLonghelp 1506 1503 ( … … 1696 1693 parameters[numberParameters++]= 1697 1694 CbcOrClpParam("miplib","Do some of miplib test set", 1698 MIPLIB );1695 MIPLIB,3); 1699 1696 #endif 1700 1697 #ifdef COIN_USE_CLP 1701 1698 parameters[numberParameters++]= 1702 1699 CbcOrClpParam("netlib","Solve entire netlib test set", 1703 NETLIB_EITHER );1700 NETLIB_EITHER,3); 1704 1701 parameters[numberParameters1].setLonghelp 1705 1702 ( … … 1710 1707 parameters[numberParameters++]= 1711 1708 CbcOrClpParam("netlibB!arrier","Solve entire netlib test set with barrier", 1712 NETLIB_BARRIER );1709 NETLIB_BARRIER,3); 1713 1710 parameters[numberParameters1].setLonghelp 1714 1711 ( … … 1719 1716 parameters[numberParameters++]= 1720 1717 CbcOrClpParam("netlibD!ual","Solve entire netlib test set (dual)", 1721 NETLIB_DUAL );1718 NETLIB_DUAL,3); 1722 1719 parameters[numberParameters1].setLonghelp 1723 1720 ( … … 1727 1724 parameters[numberParameters++]= 1728 1725 CbcOrClpParam("netlibP!rimal","Solve entire netlib test set (primal)", 1729 NETLIB_PRIMAL );1726 NETLIB_PRIMAL,3); 1730 1727 parameters[numberParameters1].setLonghelp 1731 1728 ( … … 1735 1732 parameters[numberParameters++]= 1736 1733 CbcOrClpParam("netlibT!une","Solve entire netlib test set with 'best' algorithm", 1737 NETLIB_TUNE );1734 NETLIB_TUNE,3); 1738 1735 parameters[numberParameters1].setLonghelp 1739 1736 ( … … 1745 1742 parameters[numberParameters++]= 1746 1743 CbcOrClpParam("network","Tries to make network matrix", 1747 NETWORK, 1,false);1744 NETWORK,7,false); 1748 1745 parameters[numberParameters1].setLonghelp 1749 1746 ( … … 1837 1834 parameters[numberParameters++]= 1838 1835 CbcOrClpParam("plus!Minus","Tries to make + 1 matrix", 1839 PLUSMINUS, 1,false);1836 PLUSMINUS,7,false); 1840 1837 parameters[numberParameters1].setLonghelp 1841 1838 ( … … 1988 1985 parameters[numberParameters++]= 1989 1986 CbcOrClpParam("reallyS!cale","Scales model in place", 1990 REALLY_SCALE, 1,false);1987 REALLY_SCALE,7,false); 1991 1988 #endif 1992 1989 #ifdef COIN_USE_CBC … … 2014 2011 parameters[numberParameters++]= 2015 2012 CbcOrClpParam("reverse","Reverses sign of objective", 2016 REVERSE, 1,false);2013 REVERSE,7,false); 2017 2014 parameters[numberParameters1].setLonghelp 2018 2015 ( … … 2095 2092 parameters[numberParameters++]= 2096 2093 CbcOrClpParam("sleep","for debug", 2097 DUMMY, 1,false);2094 DUMMY,7,false); 2098 2095 #ifdef COIN_USE_CLP 2099 2096 parameters[numberParameters++]= … … 2169 2166 #endif 2170 2167 CbcOrClpParam("stdin","From stdin", 2171 STDIN, 1,false);2168 STDIN,7,false); 2172 2169 parameters[numberParameters++]= 2173 2170 CbcOrClpParam("stop","Stops clp execution", … … 2180 2177 parameters[numberParameters++]= 2181 2178 CbcOrClpParam("strengthen","Create strengthened problem", 2182 STRENGTHEN );2179 STRENGTHEN,3); 2183 2180 parameters[numberParameters1].setLonghelp 2184 2181 ( … … 2221 2218 parameters[numberParameters++]= 2222 2219 CbcOrClpParam("tightLP","Poor person's preSolve for now", 2223 TIGHTEN, 1,false);2220 TIGHTEN,7,false); 2224 2221 #endif 2225 2222 #ifdef COIN_USE_CBC … … 2247 2244 parameters[numberParameters++]= 2248 2245 CbcOrClpParam("unitTest","Do unit test", 2249 UNITTEST );2246 UNITTEST,3); 2250 2247 parameters[numberParameters1].setLonghelp 2251 2248 ( … … 2254 2251 parameters[numberParameters++]= 2255 2252 CbcOrClpParam("verbose","Switches on longer help on single ?", 2256 0, 3,VERBOSE,false);2253 0,7,VERBOSE,false); 2257 2254 parameters[numberParameters1].setLonghelp 2258 2255 ( 
trunk/Test/CbcOrClpParam.hpp
r725 r726 104 104 // Action 105 105 CbcOrClpParam (std::string name, std::string help, 106 CbcOrClpParameterType type,int indexNumber=1,bool display=true);106 CbcOrClpParameterType type,int whereUsed=7,bool display=true); 107 107 /// Copy constructor. 108 108 CbcOrClpParam(const CbcOrClpParam &); … … 193 193 /// Print action and string 194 194 void printString() const; 195 /// type for classification 196 inline int indexNumber() const 197 { return indexNumber_;}; 195 /** 7 if used everywhere, 196 1  used by clp 197 2  used by cbc 198 4  used by ampl 199 */ 200 inline int whereUsed() const 201 { return whereUsed_;}; 202 198 203 private: 199 204 /// gutsOfConstructor … … 239 244 /// String parameter  current value 240 245 std::string stringValue_; 241 /// index number to use for display purposes 242 int indexNumber_; 246 /** 7 if used everywhere, 247 1  used by clp 248 2  used by cbc 249 4  used by ampl 250 */ 251 int whereUsed_; 243 252 //@} 244 253 };
Note: See TracChangeset
for help on using the changeset viewer.