Scippy

SoPlex

Sequential object-oriented simPlex

soplexmain.cpp File Reference

Command line interface of SoPlex LP solver. More...

#include <assert.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include "soplex.h"
#include "spxgithash.h"
#include "timerfactory.h"
#include "validation.h"

Go to the source code of this file.

Macros

#define EGlpNumStart()   {}
 
#define EGlpNumClear()   {}
 

Functions

int main (int argc, char *argv[])
 runs SoPlex command line More...
 
static void printUsage (const char *const argv[], int idx)
 
static void freeStrings (char *&s1, char *&s2, char *&s3, char *&s4, char *&s5)
 
static void checkSolutionReal (SoPlex &soplex)
 performs external feasibility check with real type More...
 
static void checkSolutionRational (SoPlex &soplex)
 performs external feasibility check with rational type More...
 
static void checkSolution (SoPlex &soplex)
 performs external feasibility check according to check mode More...
 

Detailed Description

Command line interface of SoPlex LP solver.

Definition in file soplexmain.cpp.

Macro Definition Documentation

◆ EGlpNumClear

#define EGlpNumClear ( )    {}

Definition at line 41 of file soplexmain.cpp.

Referenced by main().

◆ EGlpNumStart

#define EGlpNumStart ( )    {}

Definition at line 40 of file soplexmain.cpp.

Referenced by main().

Function Documentation

◆ checkSolution()

static void checkSolution ( SoPlex soplex)
static

performs external feasibility check according to check mode

Definition at line 249 of file soplexmain.cpp.

References SoPlex::CHECKMODE, SoPlex::CHECKMODE_AUTO, SoPlex::CHECKMODE_RATIONAL, checkSolutionRational(), checkSolutionReal(), SoPlex::intParam(), MSG_INFO1, SoPlex::READMODE, SoPlex::READMODE_RATIONAL, and SoPlex::spxout.

Referenced by main().

◆ checkSolutionRational()

static void checkSolutionRational ( SoPlex soplex)
static

performs external feasibility check with rational type

Todo:
implement external check; currently we use the internal methods for convenience

Definition at line 196 of file soplexmain.cpp.

References SoPlex::FEASTOL, SoPlex::getBoundViolationRational(), SoPlex::getDualViolationRational(), SoPlex::getRedCostViolationRational(), SoPlex::getRowViolationRational(), SoPlex::hasDual(), SoPlex::hasPrimal(), MSG_INFO1, SoPlex::OPTTOL, soplex::rationalToString(), SoPlex::realParam(), and SoPlex::spxout.

Referenced by checkSolution().

◆ checkSolutionReal()

static void checkSolutionReal ( SoPlex soplex)
static

performs external feasibility check with real type

Todo:
implement external check; currently we use the internal methods for convenience

Definition at line 138 of file soplexmain.cpp.

References SoPlex::FEASTOL, SoPlex::getBoundViolationReal(), SoPlex::getDualViolationReal(), SoPlex::getRedCostViolationReal(), SoPlex::getRowViolationReal(), SoPlex::hasDual(), SoPlex::hasPrimal(), MSG_INFO1, SoPlex::OPTTOL, SoPlex::realParam(), and SoPlex::spxout.

Referenced by checkSolution().

◆ freeStrings()

static void freeStrings ( char *&  s1,
char *&  s2,
char *&  s3,
char *&  s4,
char *&  s5 
)
static

Definition at line 106 of file soplexmain.cpp.

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

runs SoPlex command line

Todo:
the EGlib version info should be printed after the SoPlex version info

Definition at line 266 of file soplexmain.cpp.

References SPxSolver::ABORT_CYCLING, SPxSolver::ABORT_ITER, SPxSolver::ABORT_TIME, SPxSolver::ABORT_VALUE, checkSolution(), VectorBase< R >::clear(), SPxSolver::COLUMN, TimerFactory::createTimer(), SPxOut::DEBUG, DEFAULT_BND_VIOL, DEFAULT_EPS_FACTOR, DEFAULT_EPS_UPDATE, DEFAULT_EPS_ZERO, DEFAULT_INFINITY, Rational::disableListMem(), EGlpNumClear, EGlpNumStart, SPxSolver::ENTER, Param::epsilon(), Param::epsilonFactorization(), Param::epsilonUpdate(), SPxOut::ERROR, SPxSolver::ERROR, SLUFactor::ETA, SoPlex::FEASTOL, SLUFactor::FOREST_TOMLIN, freeStrings(), SoPlex::getDualFarkasReal(), SoPlex::getDualRational(), SoPlex::getDualReal(), soplex::getGitHash(), SPxRatioTester::getName(), SPxStarter::getName(), SPxPricer::getName(), SPxScaler::getName(), SPxSimplifier::getName(), SoPlex::getPrimalRational(), SoPlex::getPrimalRayReal(), SoPlex::getPrimalReal(), SPxOut::getStream(), SoPlex::hasBasis(), SPxSolver::INFEASIBLE, soplex::infinity, SPxOut::INFO1, SPxOut::INFO2, SPxOut::INFO3, SoPlex::intParam(), soplex::isNotZero(), SoPlex::ITERLIMIT, SPxSolver::LEAVE, SoPlex::loadSettingsFile(), SPxLPBase< Real >::MINIMIZE, MINIMUM, MSG_ERROR, MSG_INFO1, MSG_WARNING, SoPlex::numColsRational(), SoPlex::numColsReal(), SoPlex::numNonzerosReal(), SoPlex::numRowsRational(), SoPlex::numRowsReal(), SPxSolver::OPTIMAL, SoPlex::optimize(), SoPlex::OPTTOL, SoPlex::parseSettingsString(), SPxOut::precision(), SoPlex::PRICER, SoPlex::printStatistics(), printUsage(), SoPlex::printUserSettings(), SoPlex::printVersion(), SoPlex::RATIOTESTER, SoPlex::readBasisFile(), SoPlex::readFile(), SoPlex::READMODE, SoPlex::READMODE_RATIONAL, SoPlex::READMODE_REAL, SPxSolver::ROW, SoPlex::saveSettingsFile(), SoPlex::SCALER, Param::setEpsilon(), Param::setEpsilonFactorization(), Param::setEpsilonUpdate(), SoPlex::setIntParam(), SoPlex::setRealParam(), SPxOut::setStream(), SPxOut::setVerbosity(), SoPlex::SIMPLIFIER, SPxSolver::SINGULAR, SoPlex::SOLVEMODE, SoPlex::SOLVEMODE_REAL, SOPLEX_COPYRIGHT, SOPLEX_SUBVERSION, SOPLEX_VERSION, soplex::spx_alloc(), soplex::spx_free(), SoPlex::spxout, UserTimer::start(), Timer::start(), UserTimer::stop(), Timer::stop(), SoPlex::SYNCMODE, SoPlex::SYNCMODE_AUTO, SoPlex::SYNCMODE_MANUAL, UserTimer::time(), Timer::time(), SoPlex::TIMELIMIT, SPxSolver::UNBOUNDED, Validation::updateExternalSolution(), Validation::updateValidationTolerance(), Timer::USER_TIME, Validation::validate, Validation::validateSolveReal(), SoPlex::VERBOSITY, SPxOut::WARNING, SPxException::what(), SoPlex::writeBasisFile(), SoPlex::writeDualFileReal(), SoPlex::writeFileReal(), SoPlex::~SoPlex(), Timer::~Timer(), and Validation::~Validation().

◆ printUsage()

static void printUsage ( const char *const  argv[],
int  idx 
)
static

Definition at line 51 of file soplexmain.cpp.

Referenced by main().