32 #ifdef SOPLEX_WITH_EGLIB 37 #define EGlpNumStart() {} 38 #define EGlpNumClear() {} 49 " --readbas=<basfile> read starting basis from file\n" 50 " --writebas=<basfile> write terminal basis to file\n" 51 " --writefile=<lpfile> write LP to file in LP or MPS format depending on extension\n" 52 " --<type>:<name>=<val> change parameter value using syntax of settings file entries\n" 53 " --loadset=<setfile> load parameters from settings file (overruled by command line parameters)\n" 54 " --saveset=<setfile> save parameters to settings file\n" 55 " --diffset=<setfile> save modified parameters to settings file\n" 57 "limits and tolerances:\n" 58 " -t<s> set time limit to <s> seconds\n" 59 " -i<n> set iteration limit to <n>\n" 60 " -f<eps> set primal feasibility tolerance to <eps>\n" 61 " -o<eps> set dual feasibility (optimality) tolerance to <eps>\n" 63 "algorithmic settings (* indicates default):\n" 64 " --readmode=<value> choose reading mode for <lpfile> (0* - floating-point, 1 - rational)\n" 65 " --solvemode=<value> choose solving mode (0 - floating-point solve, 1* - auto, 2 - force iterative refinement)\n" 66 " -s<value> choose simplifier/presolver (0 - off, 1* - auto)\n" 67 " -g<value> choose scaling (0 - off, 1 - uni-equilibrium, 2* - bi-equilibrium, 3 - geometric, 4 - iterated geometric)\n" 68 " -p<value> choose pricing (0* - auto, 1 - dantzig, 2 - parmult, 3 - devex, 4 - quicksteep, 5 - steep)\n" 69 " -r<value> choose ratio tester (0 - textbook, 1 - harris, 2 - fast, 3* - boundflipping)\n" 72 " -v<level> set verbosity to <level> (0 - error, 3 - normal, 5 - high)\n" 73 " -x print primal solution\n" 74 " -y print dual multipliers\n" 75 " -X print primal solution in rational numbers\n" 76 " -Y print dual multipliers in rational numbers\n" 77 " -q display detailed statistics\n" 78 " -c perform final check of optimal solution in original problem\n" 82 std::cerr <<
"missing input file\n\n";
84 std::cerr <<
"invalid option \"" << argv[idx] <<
"\"\n\n";
86 std::cerr <<
"usage: " << argv[0] <<
" " <<
"[options] <lpfile>\n" 87 #ifdef SOPLEX_WITH_ZLIB 88 <<
" <lpfile> linear program as .mps[.gz] or .lp[.gz] file\n\n" 90 <<
" <lpfile> linear program as .mps or .lp file\n\n" 97 void freeStrings(
char*& s1,
char*& s2,
char*& s3,
char*& s4,
char*& s5)
140 Real maxviol = boundviol > rowviol ? boundviol : rowviol;
142 soplex.
spxout <<
"Primal solution " << (feasible ?
"feasible" :
"infeasible") <<
" in original problem (max. violation = " << maxviol <<
").\n" 164 Real maxviol = redcostviol > dualviol ? redcostviol : dualviol;
166 soplex.
spxout <<
"Dual solution " << (feasible ?
"feasible" :
"infeasible") <<
" in original problem (max. violation = " << maxviol <<
").\n" 194 Rational maxviol = boundviol > rowviol ? boundviol : rowviol;
196 soplex.
spxout <<
"Primal solution " << (feasible ?
"feasible" :
"infeasible") <<
" in original problem (max. violation = " <<
rationalToString(maxviol) <<
").\n" 218 Rational maxviol = redcostviol > dualviol ? redcostviol : dualviol;
220 soplex.
spxout <<
"Dual solution " << (feasible ?
"feasible" :
"infeasible") <<
" in original problem (max. violation = " <<
rationalToString(maxviol) <<
").\n" 253 int main(
int argc,
char* argv[])
265 const char* lpfilename;
266 char* readbasname = 0;
267 char* writebasname = 0;
268 char* writefilename = 0;
269 char* loadsetname = 0;
270 char* savesetname = 0;
271 char* diffsetname = 0;
272 bool printPrimal =
false;
273 bool printPrimalRational =
false;
274 bool printDual =
false;
275 bool printDualRational =
false;
276 bool displayStatistics =
false;
277 bool checkSol =
false;
288 MSG_INFO1( soplex->
spxout, soplex->
spxout <<
"Copyright (c) 1996-2016 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)\n\n" );
301 for( optidx = 1; optidx < argc; optidx++ )
303 char* option = argv[optidx];
306 if( option[0] !=
'-' )
311 if( option[0] !=
'-' || option[1] ==
'\0' 312 || ((option[2] ==
'\0') != (option[1] ==
'x' || option[1] ==
'X' || option[1] ==
'y' || option[1] ==
'Y' || option[1] ==
'q' || option[1] ==
'c')) )
316 goto TERMINATE_FREESTRINGS;
326 if( strncmp(option,
"readbas=", 8) == 0 )
328 if( readbasname == 0 )
330 char* filename = &option[8];
331 readbasname = strncpy(
new char[strlen(filename) + 1], filename, strlen(filename) + 1);
335 else if( strncmp(option,
"writebas=", 9) == 0 )
337 if( writebasname == 0 )
339 char* filename = &option[9];
340 writebasname = strncpy(
new char[strlen(filename) + 1], filename, strlen(filename) + 1);
344 else if( strncmp(option,
"writefile=", 10) == 0 )
346 if( writefilename == 0 )
348 char* filename = &option[10];
349 writefilename = strncpy(
new char[strlen(filename) + 1], filename, strlen(filename) + 1);
353 else if( strncmp(option,
"loadset=", 8) == 0 )
355 if( loadsetname == 0 )
357 char* filename = &option[8];
358 loadsetname = strncpy(
new char[strlen(filename) + 1], filename, strlen(filename) + 1);
363 goto TERMINATE_FREESTRINGS;
373 else if( strncmp(option,
"saveset=", 8) == 0 )
375 if( savesetname == 0 )
377 char* filename = &option[8];
378 savesetname = strncpy(
new char[strlen(filename) + 1], filename, strlen(filename) + 1);
382 else if( strncmp(option,
"diffset=", 8) == 0 )
384 if( diffsetname == 0 )
386 char* filename = &option[8];
387 diffsetname = strncpy(
new char[strlen(filename) + 1], filename, strlen(filename) + 1);
391 else if( strncmp(option,
"readmode=", 9) == 0 )
397 goto TERMINATE_FREESTRINGS;
401 else if( strncmp(option,
"solvemode=", 10) == 0 )
407 goto TERMINATE_FREESTRINGS;
422 goto TERMINATE_FREESTRINGS;
433 goto TERMINATE_FREESTRINGS;
443 goto TERMINATE_FREESTRINGS;
453 goto TERMINATE_FREESTRINGS;
463 goto TERMINATE_FREESTRINGS;
473 goto TERMINATE_FREESTRINGS;
483 goto TERMINATE_FREESTRINGS;
493 goto TERMINATE_FREESTRINGS;
503 goto TERMINATE_FREESTRINGS;
513 goto TERMINATE_FREESTRINGS;
524 printPrimalRational =
true;
534 printDualRational =
true;
539 displayStatistics =
true;
552 goto TERMINATE_FREESTRINGS;
560 if( optidx >= argc && savesetname == 0 && diffsetname == 0 )
564 goto TERMINATE_FREESTRINGS;
570 MSG_ERROR( std::cerr <<
"Error: manual synchronization is invalid on command line. Change parameter int:syncmode.\n" );
572 goto TERMINATE_FREESTRINGS;
576 if( savesetname != 0 )
578 MSG_INFO1( soplex->
spxout, soplex->
spxout <<
"Saving parameters to settings file <" << savesetname <<
"> . . .\n" );
581 MSG_ERROR( std::cerr <<
"Error writing parameters to file <" << savesetname <<
">\n" );
584 if( diffsetname != 0 )
586 MSG_INFO1( soplex->
spxout, soplex->
spxout <<
"Saving modified parameters to settings file <" << diffsetname <<
"> . . .\n" );
589 MSG_ERROR( std::cerr <<
"Error writing modified parameters to file <" << diffsetname <<
">\n" );
596 if( loadsetname != 0 || savesetname != 0 || diffsetname != 0 )
600 goto TERMINATE_FREESTRINGS;
604 readingTime->
start();
615 lpfilename = argv[optidx];
618 <<
" LP file <" << lpfilename <<
"> . . .\n" );
620 if( !soplex->
readFile(lpfilename, &rownames, &colnames) )
622 MSG_ERROR( std::cerr <<
"Error while reading file <" << lpfilename <<
">.\n" );
624 goto TERMINATE_FREESTRINGS;
628 if( writefilename != 0 )
630 if( !soplex->
writeFileReal(writefilename, &rownames, &colnames) )
632 MSG_ERROR( std::cerr <<
"Error while writing file <" << writefilename <<
">.\n\n" );
634 goto TERMINATE_FREESTRINGS;
643 if( readbasname != 0 )
646 if( !soplex->
readBasisFile(readbasname, &rownames, &colnames) )
648 MSG_ERROR( std::cerr <<
"Error while reading file <" << readbasname <<
">.\n" );
650 goto TERMINATE_FREESTRINGS;
658 soplex->
spxout <<
"Reading took " 659 << std::fixed << std::setprecision(2) << readingTime->
time()
660 << std::scientific << std::setprecision(
int(prec))
661 <<
" seconds.\n\n" );
681 << std::setprecision(9)
682 << primal[i] << std::endl; )
686 << std::setprecision(8) << std::fixed <<
")." << std::endl; )
693 if( printPrimalRational )
704 << std::setprecision(9)
705 << primal[i] << std::endl; )
725 << std::setprecision(9)
726 << dual[i] << std::endl; )
730 << std::setprecision(8) << std::fixed <<
")." << std::endl; )
737 if( printDualRational )
758 if( displayStatistics )
765 if( writebasname != 0 )
769 MSG_WARNING( soplex->
spxout, soplex->
spxout <<
"No basis information available. Could not write file <" << writebasname <<
">\n\n" );
771 else if( !soplex->
writeBasisFile(writebasname, &rownames, &colnames) )
773 MSG_ERROR( std::cerr <<
"Error while writing file <" << writebasname <<
">.\n\n" );
775 goto TERMINATE_FREESTRINGS;
779 MSG_INFO1( soplex->
spxout, soplex->
spxout <<
"Written basis information to file <" << writebasname <<
">.\n\n" );
785 MSG_ERROR( std::cerr <<
"Exception caught: " << x.
what() <<
"\n" );
787 goto TERMINATE_FREESTRINGS;
790 TERMINATE_FREESTRINGS:
791 freeStrings(readbasname, writebasname, loadsetname, savesetname, diffsetname);
849 static bool checkMode =
false;
858 class MySoPlex :
public SoPlex 862 MySoPlex(
SPxOut& outstream,
865 :
SoPlex(outstream, p_type, p_rep)
872 void displayQuality()
const 879 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP05 Violations (max/sum)" << std::endl; )
881 m_solver.qualConstraintViolation(maxviol, sumviol);
883 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP06 Constraints :" 884 << std::setw(16) << maxviol <<
" " 885 << std::setw(16) << sumviol << std::endl; )
887 qualConstraintViolation(maxviol, sumviol);
889 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP07 (unscaled) :" 890 << std::setw(16) << maxviol <<
" " 891 << std::setw(16) << sumviol << std::endl; )
893 m_solver.qualBoundViolation(maxviol, sumviol);
895 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP08 Bounds :" 896 << std::setw(16) << maxviol <<
" " 897 << std::setw(16) << sumviol << std::endl; )
899 qualBoundViolation(maxviol, sumviol);
901 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP09 (unscaled) :" 902 << std::setw(16) << maxviol <<
" " 903 << std::setw(16) << sumviol << std::endl; )
907 m_solver.qualSlackViolation(maxviol, sumviol);
909 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP10 Slacks :" 910 << std::setw(16) << maxviol <<
" " 911 << std::setw(16) << sumviol << std::endl; )
913 m_solver.qualRedCostViolation(maxviol, sumviol);
915 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP11 Reduced costs :" 916 << std::setw(16) << maxviol <<
" " 917 << std::setw(16) << sumviol << std::endl; )
919 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP12 Proven dual bound:" 921 << std::setprecision(20)
922 << m_solver.provedDualbound() << std::endl; )
928 MSG_INFO1( (*spxout), (*spxout) <<
"Violations (max/sum)" << std::endl; )
930 m_solver.qualConstraintViolation(maxviol, sumviol);
932 MSG_INFO1( (*spxout), (*spxout) <<
"Constraints :" 933 << std::setw(16) << maxviol <<
" " 934 << std::setw(16) << sumviol << std::endl; )
936 qualConstraintViolation(maxviol, sumviol);
938 MSG_INFO1( (*spxout), (*spxout) <<
" (unscaled) :" 939 << std::setw(16) << maxviol <<
" " 940 << std::setw(16) << sumviol << std::endl; )
942 m_solver.qualBoundViolation(maxviol, sumviol);
944 MSG_INFO1( (*spxout), (*spxout) <<
"Bounds :" 945 << std::setw(16) << maxviol <<
" " 946 << std::setw(16) << sumviol << std::endl; )
948 qualBoundViolation(maxviol, sumviol);
950 MSG_INFO1( (*spxout), (*spxout) <<
" (unscaled) :" 951 << std::setw(16) << maxviol <<
" " 952 << std::setw(16) << sumviol << std::endl; )
956 m_solver.qualSlackViolation(maxviol, sumviol);
958 MSG_INFO1( (*spxout), (*spxout) <<
"Slacks :" 959 << std::setw(16) << maxviol <<
" " 960 << std::setw(16) << sumviol << std::endl; )
962 m_solver.qualRedCostViolation(maxviol, sumviol);
964 MSG_INFO1( (*spxout), (*spxout) <<
"Reduced costs :" 965 << std::setw(16) << maxviol <<
" " 966 << std::setw(16) << sumviol << std::endl; )
968 MSG_INFO1( (*spxout), (*spxout) <<
"Proven dual bound:" 970 << std::setprecision(20)
971 << m_solver.provedDualbound() << std::endl; )
977 void displayInfeasibility()
const 984 if( m_solver.isProvenInfeasible() )
985 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP13 Infeasibility is proven." << std::endl; )
987 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP13 Infeasibility could not be proven!" << std::endl; )
991 if ( m_solver.isProvenInfeasible() )
993 MSG_INFO1( (*spxout), (*spxout) <<
"Infeasibility is proven." << std::endl; )
997 MSG_INFO1( (*spxout), (*spxout) <<
"Infeasibility could not be proven!" << std::endl; )
1010 void print_version_info()
1012 const char* banner1 =
1013 "************************************************************************\n" 1015 "* SoPlex --- the Sequential object-oriented simPlex. *\n" 1018 const char* banner2 =
1020 "* Copyright (C) 1996-2016 Konrad-Zuse-Zentrum *\n" 1021 "* fuer Informationstechnik Berlin *\n" 1023 "* SoPlex is distributed under the terms of the ZIB Academic Licence. *\n" 1024 "* You should have received a copy of the ZIB Academic License *\n" 1025 "* along with SoPlex; If not email to soplex@zib.de. *\n" 1027 "************************************************************************\n" 1031 std::cout << banner1;
1033 #if (SOPLEX_SUBVERSION > 0) 1035 std::cout <<
"* Version ";
1037 std::cout <<
"SoPlex version ";
1043 << std::setw(13) << std::setiosflags(std::ios::left) <<
getGitHash();
1045 std::cout <<
" *\n" << banner2 << std::endl;
1050 std::cout <<
"* Release ";
1052 std::cout <<
"SoPlex release ";
1057 << std::setw(13) << std::setiosflags(std::ios::left) <<
getGitHash();
1059 std::cout <<
" *\n" << banner2 << std::endl;
1065 std::cout <<
"[NDEBUG:" 1073 std::cout <<
"[WITH_WARNINGS:" 1074 #ifdef WITH_WARNINGS 1081 std::cout <<
"[ENABLE_ADDITIONAL_CHECKS:" 1082 #ifdef ENABLE_ADDITIONAL_CHECKS 1089 std::cout <<
"[ENABLE_CONSISTENCY_CHECKS:" 1090 #ifdef ENABLE_CONSISTENCY_CHECKS 1097 std::cout <<
"[SOPLEX_WITH_GMP:" 1098 #ifdef SOPLEX_WITH_GMP 1103 <<
"]" << std::endl;
1105 std::cout << std::endl;
1110 void print_short_version_info()
1112 const char* banner1 =
1113 "************************************************************************\n" 1114 "* SoPlex --- the Sequential object-oriented simPlex. ";
1115 const char* banner2 =
1116 "* Copyright (C) 1996-2016 Konrad-Zuse-Zentrum *\n" 1117 "* fuer Informationstechnik Berlin *\n" 1118 "************************************************************************\n";
1120 std::cout << banner1;
1121 #if (SOPLEX_SUBVERSION > 0) 1122 std::cout <<
"Version " 1129 std::cout <<
"Release " 1135 std::cout << banner2 << std::endl;
1141 void print_usage_and_exit(
const char*
const argv[] )
1144 "[options] LPfile [Basfile]\n\n" 1145 " LPfile can be either in MPS or LPF format\n\n" 1146 "options: (*) indicates default\n" 1147 " (!) indicates experimental features which may give wrong results\n" 1148 " -e select entering algorithm (default is leaving)\n" 1149 " -r select row wise representation (default is column)\n" 1150 " -i select Eta-update (default is Forest-Tomlin)\n" 1151 " -x output solution vector\n" 1152 " -y output dual multipliers\n" 1153 " -q display solution quality\n" 1154 " -br read file with starting basis from Basfile\n" 1155 " -bw write file with optimal basis to Basfile\n" 1156 " -l set time limit in seconds\n" 1157 " -L set iteration limit\n" 1158 " -f set primal feasibility tolerance\n" 1159 " -o set optimality, i.e., dual feasibility tolerance\n" 1160 " -d set primal and dual feasibility tolerance to same value\n" 1161 " -zz set general zero tolerance\n" 1162 " -zf set factorization zero tolerance\n" 1163 " -zu set update zero tolerance\n" 1164 " -v set verbosity Level: from 0 (ERROR) to 5 (INFO3), default 3 (INFO1)\n" 1165 " -V show program version\n" 1166 " -C check mode (for check scripts)\n" 1167 " -h show this help\n\n" 1168 "Simplifier: Scaler: Starter: Pricer: Ratiotester:\n" 1169 " -s0 none -g0 none -c0 none* -p0 Textbook -t0 Textbook\n" 1170 " -s1 Main* -g1 uni-Equi -c1 Weight -p1 ParMult -t1 Harris\n" 1171 " -g2 bi-Equi* -c2 Sum -p2 Devex -t2 Fast\n" 1172 " -g3 bi-Equi+Geo1 -c3 Vector -p3 Hybrid! -t3 Bound Flipping*\n" 1173 " -g4 bi-Equi+Geo8 -p4 Steep*\n" 1175 " -p6 SteepExactSetup\n" 1178 std::cerr <<
"usage: " << argv[0] <<
" " << usage << std::endl;
1184 void check_parameter(
const char param,
const char*
const argv[])
1187 print_usage_and_exit( argv );
1192 void print_algorithm_parameters(
1200 MSG_INFO1( (*work.spxout), (*work.spxout)
1201 <<
"IEXAMP12 Feastol = " 1202 << std::setw(16) << work.feastol() << std::endl
1203 <<
"IEXAMP52 Opttol = " 1204 << std::setw(16) << work.opttol() << std::endl
1205 <<
"IEXAMP13 Epsilon Zero = " 1207 <<
"IEXAMP37 Epsilon Factor = " 1209 <<
"IEXAMP38 Epsilon Update = " 1213 <<
" algorithm" << std::endl
1216 <<
" representation" << std::endl
1219 <<
" update" << std::endl; )
1223 MSG_INFO1( (*work.spxout), (*work.spxout)
1224 <<
"SoPlex parameters: " << std::endl
1226 << std::setw(16) << work.feastol() << std::endl
1228 << std::setw(16) << work.opttol() << std::endl
1229 <<
"Epsilon Zero = " 1231 <<
"Epsilon Factor = " 1233 <<
"Epsilon Update = " 1236 <<
"algorithm = " << (work.type() ==
SPxSolver::ENTER ?
"Entering" :
"Leaving")
1238 <<
"representation = " << (representation ==
SPxSolver::ROW ?
"Row" :
"Column")
1240 <<
"update = " << (update ==
SLUFactor::ETA ?
"Eta" :
"Forest-Tomlin")
1277 assert(pricer != 0);
1279 #ifdef PARTIAL_PRICING 1280 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP17 " << pricer->
getName() <<
" pricing" 1281 <<
" (partial, size = " << MAX_PRICING_CANDIDATES <<
")" 1284 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP17 " << pricer->
getName() <<
" pricing" 1288 #ifdef PARTIAL_PRICING
1290 <<
" (partial, size = " << MAX_PRICING_CANDIDATES <<
")" 1322 assert(ratiotester != 0);
1324 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP18 " << ratiotester->
getName() <<
" ratiotest" << std::endl; )
1326 MSG_INFO1( (*spxout), (*spxout) <<
"ratiotest = " << ratiotester->
getName() << std::endl; )
1367 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP19 " 1368 << ((prescaler != 0) ? prescaler->
getName() :
"no")
1370 << ((postscaler != 0) ? postscaler->
getName() :
"no")
1371 <<
" scaling" << std::endl; )
1375 MSG_INFO1( (*spxout), (*spxout) <<
"scaling = " 1376 << ((prescaler != 0) ? prescaler->
getName() :
"no")
1378 << ((postscaler != 0) ? postscaler->
getName() :
"no")
1396 assert(simplifier == 0);
1401 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP20 " << ((simplifier == 0) ?
"no" : simplifier->
getName()) <<
" simplifier" << std::endl; )
1403 MSG_INFO1( (*spxout), (*spxout) <<
"simplifier = " << ((simplifier == 0) ?
"no" : simplifier->getName()) << std::endl; )
1430 MSG_INFO1( (*spxout), (*spxout) <<
"IEXAMP21 " << ((starter == 0) ?
"no" : starter->
getName()) <<
" starter" << std::endl; )
1432 MSG_INFO1( (*spxout), (*spxout) <<
"starter = " << ((starter == 0) ?
"no" : starter->getName()) << std::endl; )
1438 #ifdef SEND_ALL_OUTPUT_TO_FILES 1440 void redirect_output(
1441 std::ostream& myerrstream,
1442 std::ostream& myinfostream
1445 myerrstream .setf( std::ios::scientific | std::ios::showpoint );
1446 myinfostream.setf( std::ios::scientific | std::ios::showpoint );
1457 void read_input_file(
1459 const char* filename,
1464 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP22 loading LP file " << filename << std::endl; )
1466 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"\nLoading LP file " << filename << std::endl; )
1471 if ( ! work.readFile(filename, &rownames, &colnames, 0) )
1474 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"EEXAMP23 error while reading file \"" << filename <<
"\"" << std::endl; )
1476 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"error while reading file \"" << filename <<
"\"" << std::endl; )
1479 assert(work.isConsistent());
1485 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP24 LP has " 1486 << work.nRows() <<
" rows " 1487 << work.nCols() <<
" columns " 1488 << work.nNzos() <<
" nonzeros" 1491 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP41 LP reading time: " << timer.
time() << std::endl; )
1495 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"LP has " 1496 << work.nRows() <<
" rows " 1497 << work.nCols() <<
" columns " 1498 << work.nNzos() <<
" nonzeros" 1502 std::streamsize prec = (*work.spxout).precision();
1503 (*work.spxout) <<
"LP reading time: " << std::fixed << std::setprecision(2) << timer.
time();
1504 (*work.spxout) << std::scientific << std::setprecision(
int(prec)) << std::endl; )
1510 void read_basis_file(
1512 const char* filename,
1516 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Reading basis from file (disables simplifier)" << std::endl; )
1517 if (!work.readBasisFile(filename, rownames, colnames))
1520 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"EEXAMP25 error while reading file \"" << filename <<
"\"" << std::endl; )
1522 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Error while reading file \"" << filename <<
"\"" << std::endl; )
1529 void solve_LP(MySoPlex& work)
1535 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP26 solving LP" << std::endl; )
1537 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"\nSolving LP ..." << std::endl; )
1542 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"\nSoPlex statistics:\n" << work.statistics(); )
1547 void print_solution_and_status(
1551 const int precision,
1552 const bool print_quality,
1553 const bool print_solution,
1554 const bool print_dual,
1555 const bool write_basis,
1556 const char* basisname
1563 MSG_INFO1( (*work.spxout), (*work.spxout) << std::endl; )
1568 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP29 solution value is: " << std::setprecision( precision ) << work.objValue() << std::endl; )
1570 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Solution value is: " << std::setprecision( precision ) << work.objValue() << std::endl; )
1572 if ( print_quality )
1573 work.displayQuality();
1575 if ( print_solution )
1581 MSG_INFO1( (*work.spxout), (*work.spxout) << std::endl <<
"Primal solution (name, id, value):" << std::endl; )
1582 for(
int i = 0; i < work.nCols(); ++i )
1584 if (
isNotZero( objx[i], 0.001 * work.feastol() ) )
1585 MSG_INFO1( (*work.spxout), (*work.spxout) << colnames[ work.cId(i) ] <<
"\t" 1588 << std::setprecision( precision )
1589 << objx[i] << std::endl; )
1591 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"All other variables are zero (within " << std::setprecision(1) << 0.001*work.feastol() <<
")." << std::endl; )
1597 bool allzero =
true;
1601 MSG_INFO1( (*work.spxout), (*work.spxout) << std::endl <<
"Dual multipliers (name, id, value):" << std::endl; )
1602 for(
int i = 0; i < work.nRows(); ++i )
1604 if (
isNotZero( objy[i] , 0.001 * work.opttol() ) )
1606 MSG_INFO1( (*work.spxout), (*work.spxout) << rownames[ work.rId(i) ] <<
"\t" 1609 << std::setprecision( precision )
1610 << objy[i] << std::endl; )
1615 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"All " << (allzero ?
"" :
"other ") <<
"dual values are zero (within " 1616 << std::setprecision(1) << 0.001*work.opttol() <<
")." << std::endl; )
1622 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Minimizing: a positive/negative value corresponds to left-hand (>=) resp. right-hand (<=) side." 1627 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Maximizing: a positive/negative value corresponds to right-hand (<=) resp. left-hand (>=) side." 1635 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Writing basis of original problem to file " << basisname << std::endl; )
1636 if ( ! work.writeBasisFile( basisname, &rownames, &colnames ) )
1639 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"EEXAMP30 error while writing file \"" << basisname <<
"\"" << std::endl; )
1641 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Error while writing file \"" << basisname <<
"\"" << std::endl; )
1647 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP31 LP is unbounded" << std::endl; )
1649 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"LP is unbounded" << std::endl; )
1651 if ( print_solution )
1656 MSG_INFO1( (*work.spxout), (*work.spxout) << std::endl <<
"Primal solution (name, id, value):" << std::endl; )
1657 for(
int i = 0; i < work.nCols(); ++i )
1659 if (
isNotZero( objx[i], 0.001 * work.feastol() ) )
1660 MSG_INFO1( (*work.spxout), (*work.spxout) << colnames[ work.cId(i) ] <<
"\t" 1663 << std::setprecision( precision )
1664 << objx[i] << std::endl; )
1666 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"All other variables are zero (within " << std::setprecision(1) << 0.001*work.feastol() <<
")." << std::endl; )
1669 DVector objcoef(work.nCols());
1673 Real rayobjval = 0.0;
1675 work.getObj(objcoef);
1677 MSG_INFO1( (*work.spxout), (*work.spxout) << std::endl <<
"Primal ray (name, id, value):" << std::endl; )
1678 for(
int i = 0; i < work.nCols(); ++i )
1680 if (
isNotZero( ray[i], 0.001 * work.feastol() ) )
1682 rayobjval += ray[i] * objcoef[i];
1684 MSG_INFO1( (*work.spxout), (*work.spxout) << colnames[ work.cId(i) ] <<
"\t" 1687 << std::setprecision( precision )
1688 << ray[i] << std::endl; )
1691 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"All other variables have zero value (within " << std::setprecision(1) << 0.001*work.feastol() <<
")." << std::endl; )
1692 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Objective change per unit along primal ray is " << rayobjval <<
"." << std::endl; )
1698 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP32 LP is infeasible" << std::endl; )
1700 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"LP is infeasible" << std::endl; )
1701 if ( print_solution )
1703 DVector farkasx(work.nRows());
1707 DVector proofvec(work.nCols());
1714 for(
int i = 0; i < work.nRows(); ++i )
1716 if (
isNotZero( farkasx[i], 0.001 * work.opttol() ) )
1718 MSG_INFO1( (*work.spxout), (*work.spxout) << rownames[ work.rId(i) ] <<
"\t" 1721 << std::setprecision( precision )
1722 << farkasx[i] <<
"\t"; )
1724 work.getRow(i, row);
1727 MSG_INFO1( (*work.spxout), (*work.spxout) << row.lhs() <<
" <= "; );
1729 for(
int j = 0; j < row.rowVector().size(); ++j )
1731 if( row.rowVector().value(j) > 0 )
1733 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"+"; )
1735 MSG_INFO1( (*work.spxout), (*work.spxout)
1736 << row.rowVector().value(j) <<
" " 1737 << colnames[ work.cId(row.rowVector().index(j)) ]
1742 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"<= " << row.rhs(); );
1744 MSG_INFO1( (*work.spxout), (*work.spxout) << std::endl; )
1745 if( farkasx[i] > 0.0 )
1747 lhs += farkasx[i] * row.lhs();
1748 rhs += farkasx[i] * row.rhs();
1752 lhs += farkasx[i] * row.rhs();
1753 rhs += farkasx[i] * row.lhs();
1761 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"All other row multipliers are zero (within " << std::setprecision(1) << 0.001*work.opttol() <<
")." << std::endl; )
1762 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Farkas infeasibility proof: \t"; )
1763 MSG_INFO1( (*work.spxout), (*work.spxout) << lhs <<
" <= "; )
1765 bool nonzerofound =
false;
1766 for(
int i = 0; i < work.nCols(); ++i )
1768 if (
isNotZero( proofvec[i], 0.001 * work.opttol() ) )
1770 if( proofvec[i] > 0 )
1772 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"+"; )
1774 MSG_INFO1( (*work.spxout), (*work.spxout) << proofvec[i] <<
" " << colnames[ work.cId(i) ] <<
" "; )
1775 nonzerofound =
true;
1780 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"0 "; );
1782 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"<= " << rhs << std::endl; );
1785 if ( print_quality )
1786 work.displayInfeasibility();
1788 if ( ! work.writeBasisFile( basisname, &rownames, &colnames ) )
1791 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"EEXAMP30 error while writing file \"" << basisname <<
"\"" << std::endl; )
1793 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Error while writing file \"" << basisname <<
"\"" << std::endl; )
1798 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"EEXAMP40 aborted due to cycling" << std::endl; )
1800 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Aborted due to cycling" << std::endl; )
1804 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP33 aborted due to time limit" << std::endl; )
1806 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Aborted due to time limit" << std::endl; )
1810 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP34 aborted due to iteration limit" << std::endl; )
1812 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Aborted due to iteration limit" << std::endl; )
1816 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"IEXAMP35 aborted due to objective value limit" << std::endl; )
1818 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Aborted due to objective value limit" << std::endl; )
1822 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"EEXAMP39 basis is singular" << std::endl; )
1824 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"Basis is singular" << std::endl; )
1828 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"EEXAMP36 An error occurred during " <<
"the solution process" << std::endl; )
1830 MSG_INFO1( (*work.spxout), (*work.spxout) <<
"An error occurred during " <<
"the solution process" << std::endl; )
1833 MSG_INFO1( (*work.spxout), (*work.spxout) << std::endl; )
1848 if ( prescaler != 0 )
1853 if ( postscaler != 0 )
1858 if ( simplifier != 0 )
1869 assert( pricer != 0 );
1873 assert( ratiotester != 0 );
1877 if ( basisname != 0 )
1878 delete [] basisname;
1886 int main(
int argc,
char* argv[])
1888 const char* filename;
1889 char* basisname = 0;
1909 int simplifying = 1;
1911 Real timelimit = -1.0;
1919 bool print_solution =
false;
1920 bool print_dual =
false;
1921 bool print_quality =
false;
1922 bool read_basis =
false;
1923 bool write_basis =
false;
1927 for(optidx = 1; optidx < argc; optidx++)
1929 if (*argv[optidx] !=
'-')
1932 switch(argv[optidx][1])
1935 check_parameter(argv[optidx][2], argv);
1936 if (argv[optidx][2] ==
'r')
1938 if (argv[optidx][2] ==
'w')
1942 check_parameter(argv[optidx][2], argv);
1943 starting = atoi(&argv[optidx][2]);
1946 check_parameter(argv[optidx][2], argv);
1947 delta = atof(&argv[optidx][2]);
1950 check_parameter(argv[optidx][2], argv);
1951 feastol = atof(&argv[optidx][2]);
1954 check_parameter(argv[optidx][2], argv);
1955 opttol = atof(&argv[optidx][2]);
1961 check_parameter(argv[optidx][2], argv);
1962 scaling = atoi(&argv[optidx][2]);
1968 if (argv[optidx][2] ==
'\0' )
1969 print_usage_and_exit( argv );
1970 timelimit = atof(&argv[optidx][2]);
1973 if (argv[optidx][2] ==
'\0' )
1974 print_usage_and_exit( argv );
1975 iterlimit = atoi(&argv[optidx][2]);
1978 check_parameter(argv[optidx][2], argv);
1979 pricing = atoi(&argv[optidx][2]);
1982 print_quality =
true;
1988 check_parameter(argv[optidx][2], argv);
1989 simplifying = atoi(&argv[optidx][2]);
1992 check_parameter(argv[optidx][2], argv);
1993 ratiotest = atoi(&argv[optidx][2]);
1996 check_parameter(argv[optidx][2], argv);
1997 if (argv[optidx][2] >=
'0' && argv[optidx][2] <=
'9')
1998 verbose = argv[optidx][2] -
'0';
2001 print_version_info();
2004 print_solution =
true;
2010 check_parameter(argv[optidx][2], argv);
2011 check_parameter(argv[optidx][3], argv);
2012 switch(argv[optidx][2])
2015 epsilon = atof(&argv[optidx][3]);
2018 epsilon_factor = atof(&argv[optidx][3]);
2021 epsilon_update = atof(&argv[optidx][3]);
2024 print_usage_and_exit( argv );
2032 print_version_info();
2035 print_usage_and_exit( argv );
2040 print_version_info();
2043 if ((argc - optidx) < 1 + (read_basis ? 1 : 0) + (write_basis ? 1 : 0))
2044 print_usage_and_exit( argv );
2045 filename = argv[optidx];
2053 if ( read_basis || write_basis )
2054 basisname = strcpy(
new char[strlen(argv[optidx]) + 1], argv[optidx] );
2063 precision = int(-log10(std::min(feastol, opttol))) + 1;
2065 std::cout.setf( std::ios::scientific | std::ios::showpoint );
2066 std::cerr.setf( std::ios::scientific | std::ios::showpoint );
2068 #ifdef SEND_ALL_OUTPUT_TO_FILES 2071 std::ofstream myerrstream (
"errwarn.txt" );
2072 std::ofstream myinfostream(
"infos.txt" );
2073 redirect_output(myerrstream, myinfostream);
2077 MySoPlex work( spxout, type, representation );
2078 work.setOutstream ( spxout );
2079 work.setUtype ( update );
2080 work.setFeastol ( std::min(feastol, delta) );
2081 work.setOpttol ( std::min(opttol, delta) );
2082 work.setTerminationTime ( timelimit );
2083 work.setTerminationIter ( iterlimit );
2084 print_algorithm_parameters( work, representation, update );
2085 assert( work.isConsistent() );
2088 work.setPricer ( pricer = get_pricer (pricing, work.spxout) );
2089 work.setStarter ( starter = get_starter (starting, work.spxout) );
2090 work.setSimplifier( simplifier = get_simplifier (simplifying, work.spxout) );
2091 work.setTester ( ratiotester = get_ratio_tester(ratiotest, work.spxout) );
2092 assert(work.isConsistent());
2095 get_scalers(prescaler, postscaler, scaling, work.spxout);
2096 work.setPreScaler (prescaler);
2097 work.setPostScaler(postscaler);
2098 assert(work.isConsistent());
2101 read_input_file(work, filename, rownames, colnames);
2105 read_basis_file(work, basisname, &rownames, &colnames);
2111 print_solution_and_status(work, rownames, colnames, precision, print_quality,
2112 print_solution, print_dual, write_basis, basisname);
2115 clean_up(prescaler, postscaler, simplifier, starter, pricer, ratiotester, basisname);
2121 std::cout <<
"exception caught : " << x.
what() << std::endl;
2122 delete [] basisname;
Fast shifting ratio test.
bool isNotZero(Real a, Real eps=Param::epsilon())
returns true iff |a| > eps
int numColsReal() const
returns number of columns
virtual void setStream(const Verbosity &verbosity, std::ostream &stream)
Sets the stream for the specified verbosity level.
UpdateType
Specifies how to perform change method.
Bound flipping ratio test ("long step dual") for SoPlex.Class SPxBoundFlippingRT provides an implemen...
#define DEFAULT_EPS_FACTOR
bool getDualViolationRational(Rational &maxviol, Rational &sumviol)
gets violation of dual multipliers; returns true on success
static void setEpsilon(Real eps)
virtual const std::string what() const
returns exception message
Devex pricer.The Devex Pricer for SoPlex implements an approximate steepest edge pricing, that does without solving an extra linear system and computing the scalar products.
#define DEFAULT_BND_VIOL
default allowed bound violation
bool hasBasis() const
is an advanced starting basis available?
Steepest edge pricer.Class SPxSteepExPR implements a steepest edge pricer to be used with SoPlex...
Geometric mean row/column scaling.This SPxScaler implementation performs geometric mean scaling of th...
bool hasDual() const
is a dual feasible solution available?
apply standard floating-point algorithm
virtual const char * getName() const
get name of pricer.
Abstract pricer base class.
bool getPrimalReal(VectorReal &vector)
gets the primal solution vector if available; returns true on success
SPxSolver::Status solve()
solves the LP
bool getDualRational(VectorRational &vector)
gets the dual solution vector if available; returns true on success
Solution vector based start basis.
time limit in seconds (INFTY if unlimited)
mode for iterative refinement strategy
virtual Real time() const =0
Representation
LP basis representation.
virtual ~SoPlex()
destructor
LP geometric mean scaling.
primal feasibility tolerance
int numRowsReal() const
message handler
Abstract ratio test base class.
solve() aborted due to iteration limit.
bool readBasisFile(const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0)
reads basis information from filename and returns true on success; if rowNames and colNames are NULL...
static Real epsilonUpdate()
mode for reading LP files
mode for synchronizing real and rational LP
automatic sync of real and rational LP
iteration limit (-1 if unlimited)
Implementation of Sparse Linear Solver.
Abstract ratio test base class.Class SPxRatioTester is the virtual base class for computing the ratio...
bool getRowViolationReal(Real &maxviol, Real &sumviol)
gets violation of constraints; returns true on success
bool getRowViolationRational(Rational &maxviol, Rational &sumviol)
gets violation of constraints; returns true on success
static Real epsilonFactorization()
SoPlex start basis generation base class.SPxStarter is the virtual base class for classes generating ...
int numColsRational() const
returns number of columns
#define DEFAULT_EPS_UPDATE
LP has been proven to be primal infeasible.
General methods in LP preprocessing.
bool readFile(const char *filename, NameSet *rowNames=0, NameSet *colNames=0, DIdxSet *intVars=0)
reads LP file in LP or MPS format according to READMODE parameter; gets row names, column names, and integer variables if desired; returns true on success
bool setIntParam(const IntParam param, const int value, const bool quiet=false, const bool init=false)
sets integer parameter value; returns true on success
Wrapper for GMP type mpq_class.We wrap mpq_class so that we can replace it by a double type if GMP is...
static void disableListMem()
disables list memory
void printStatistics(std::ostream &os)
prints complete statistics
LP simplification base class.
Real realParam(const RealParam param) const
returns real parameter value
Partial multiple pricing.Class SPxParMultPr is an implementation class for SPxPricer implementing Dan...
Wrapper for different output streams and verbosity levels.
virtual void start()=0
start timer, resume accounting user, system and real time.
virtual Real stop()=0
stop timer, return accounted user time.
void spx_alloc(T &p, int n=1)
Allocate memory.
Fast shifting ratio test.Class SPxFastRT is an implementation class of SPxRatioTester providing fast ...
standard floating-point parsing
Weighted pricing.Class SPxWeightPR is an implemantation class of SPxPricer that uses weights for colu...
int main(int argc, char *argv[])
runs SoPlex command line
virtual const char * getName() const
get name of starter.
bool writeBasisFile(const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const bool cpxFormat=false) const
writes basis information to filename; if rowNames and colNames are NULL, default names are used; retu...
static void printUsage(const char *const argv[], int idx)
bool setRealParam(const RealParam param, const Real value, const bool quiet=false, const bool init=false)
sets real parameter value; returns true on success
LP simplification abstract base class.Instances of classes derived from SPxSimplifier may be loaded t...
LP has been solved to optimality.
std::ostream & getStream(const Verbosity &verbosity) const
Returns the stream for the specified verbosity level.
int numRowsRational() const
returns number of rows
bool getDualViolationReal(Real &maxviol, Real &sumviol)
gets violation of dual multipliers; returns true on success
Wrapper for several output streams. A verbosity level is used to decide which stream to use and wheth...
solve() aborted due to time limit.
#define DEFAULT_EPS_ZERO
default allowed additive zero: 1.0 + EPS_ZERO == 1.0
virtual void setVerbosity(const Verbosity &v)
virtual Real time() const
void printUserSettings()
print non-default parameter values
static void checkSolutionRational(SoPlex &soplex)
performs external feasibility check with rational type
#define MSG_ERROR(x)
Prints out message x if the verbosity level is at least SPxOut::ERROR.
Abstract pricer base class.Class SPxPricer is a pure virtual class defining the interface for pricer ...
bool getPrimalRational(VectorRational &vector)
gets the primal solution vector if available; returns true on success
Solution vector based start basis.This version of SPxWeightST can be used to construct a starting bas...
virtual Real stop()
stop timer, return accounted user time.
#define MSG_INFO1(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::INFO1.
Simple heuristic SPxStarter.
user sync of real and rational LP
virtual const char * getName() const
get name of ratio tester.
bool parseSettingsString(char *line)
parses one setting string and returns true on success; note that string is modified ...
virtual void start()
start timer, resume accounting user, system and real time.
static Timer * createTimer(Timer::TYPE ttype)
create timers and allocate memory for them
(In)equality for LPs.Class LPRowBase provides constraints for linear programs in the form where a is...
Preconfigured SoPlex LP solver.
Bound flipping ratio test (long step dual) for SoPlex.
Debugging, floating point type and parameter definitions.
Set of strings.Class NameSet implements a symbol or name table. It allows to store or remove names (i...
Hybrid pricer.The hybrid pricer for SoPlex tries to guess the best pricing strategy to use for pricin...
Exception base class.This class implements a base class for our SoPlex exceptions We provide a what()...
Everything should be within this namespace.
returns the current git hash of SoPlex
bool loadSettingsFile(const char *filename)
reads settings file; returns true on success
Dantzig pricer.Class SPxDantzigPR is an implementation class of an SPxPricer implementing Dantzig's d...
bool getRedCostViolationRational(Rational &maxviol, Rational &sumviol)
gets violation of reduced costs; returns true on success
Harris pricing with shifting.
solve() aborted due to detection of cycling.
bool getDualReal(VectorReal &vector)
gets the dual solution vector if available; returns true on success
static void checkSolution(SoPlex &soplex)
performs external feasibility check according to check mode
Steepest edge pricer with exact initialization of weights.
Preconfigured SoPlex LP-solver.
#define MSG_WARNING(spxout, x)
Prints out message x if the verbosity level is at least SPxOut::WARNING.
bool writeFileReal(const char *filename, const NameSet *rowNames=0, const NameSet *colNames=0, const DIdxSet *intvars=0) const
writes real LP to file; LP or MPS format is chosen from the extension in filename; if rowNames and co...
static void setEpsilonUpdate(Real eps)
bool getBoundViolationReal(Real &maxviol, Real &sumviol)
gets violation of bounds; returns true on success
Simple heuristic SPxStarter.Testing version of an SPxVectorST using a very simplistic heuristic to bu...
Weighted start basis.Class SPxWeightST is an implementation of a SPxStarter for generating a Simplex ...
decide according to READMODE
void printVersion() const
prints version and compilation options
const char * getGitHash()
mode for a posteriori feasibility checks
Partial multiple pricing.
Verbosity
Verbosity level.
Textbook ratio test for SoPlex.Class SPxDefaultRT provides an implementation of the textbook ratio te...
void clear()
Set vector to 0.
virtual const char * getName() const
get name of simplifier.
LP scaler abstract base class.Instances of classes derived from SPxScaler may be loaded to SoPlex in ...
std::streamsize precision() const
int intParam(const IntParam param) const
returns integer parameter value
bool saveSettingsFile(const char *filename, const bool onlyChanged=false) const
writes settings file; returns true on success
bool getRedCostViolationReal(Real &maxviol, Real &sumviol)
gets violation of reduced costs; returns true on success
#define SOPLEX_SUBVERSION
static void freeStrings(char *&s1, char *&s2, char *&s3, char *&s4, char *&s5)
static void setEpsilonFactorization(Real eps)
dual feasibility tolerance
static void checkSolutionReal(SoPlex &soplex)
performs external feasibility check with real type
std::string rationalToString(const Rational &r, const int precision)
convert rational number to string
Textbook ratio test for SoPlex.
int numNonzerosReal() const
returns number of nonzeros
virtual const char * getName() const
get name of scaler.
Equilibrium row/column scaling.This SPxScaler implementation performs equilibrium scaling of the LPs ...
Wrapper for the system time query methods.
bool hasPrimal() const
is a primal feasible solution available?
solve() aborted due to objective limit.
columnwise representation.
void spx_free(T &p)
Release memory.
Basis is singular, numerical troubles?
Steepest edge pricer.Class SPxSteepPR implements a steepest edge pricer to be used with SoPlex...
Harris pricing with shifting.Class SPxHarrisRT is a stable implementation of a SPxRatioTester class a...
bool getBoundViolationRational(Rational &maxviol, Rational &sumviol)
gets violation of bounds; returns true on success
LP simplifier for removing uneccessary row/columns.This SPxSimplifier is mainly based on the paper "P...
LP has been proven to be primal unbounded.