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 "soplex/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...
 
static void printPrimalSolution (SoPlex &soplex, NameSet &colnames, NameSet &rownames, bool real=true, bool rational=false)
 
static void printDualSolution (SoPlex &soplex, NameSet &colnames, NameSet &rownames, bool real=true, bool rational=false)
 

Detailed Description

Command line interface of SoPlex LP solver.

Definition in file soplexmain.cpp.

Macro Definition Documentation

◆ EGlpNumClear

#define EGlpNumClear ( )    {}

Definition at line 37 of file soplexmain.cpp.

Referenced by main().

◆ EGlpNumStart

#define EGlpNumStart ( )    {}

Definition at line 36 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 254 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 197 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 102 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 502 of file soplexmain.cpp.

References checkSolution(), TimerFactory::createTimer(), Rational::disableListMem(), EGlpNumClear, EGlpNumStart, SoPlex::FEASTOL, freeStrings(), SPxOut::getStream(), SoPlex::hasBasis(), SPxOut::INFO1, SoPlex::intParam(), SoPlex::ITERLIMIT, SoPlex::loadSettingsFile(), MSG_ERROR, MSG_INFO1, MSG_WARNING, SoPlex::numColsReal(), SoPlex::numNonzerosReal(), SoPlex::numRowsReal(), SoPlex::optimize(), SoPlex::OPTTOL, SoPlex::parseSettingsString(), SPxOut::precision(), SoPlex::PRICER, printDualSolution(), printPrimalSolution(), SoPlex::printStatistics(), printUsage(), SoPlex::printUserSettings(), SoPlex::printVersion(), SoPlex::RATIOTESTER, SoPlex::readBasisFile(), SoPlex::readFile(), SoPlex::READMODE, SoPlex::READMODE_RATIONAL, SoPlex::READMODE_REAL, SoPlex::saveSettingsFile(), SoPlex::SCALER, SoPlex::setIntParam(), SoPlex::setRealParam(), SoPlex::SIMPLIFIER, SoPlex::SOLVEMODE, SoPlex::SOLVEMODE_REAL, SOPLEX_COPYRIGHT, soplex::spx_alloc(), soplex::spx_free(), SoPlex::spxout, soplex::spxSnprintf(), Timer::start(), Timer::stop(), SoPlex::SYNCMODE, SoPlex::SYNCMODE_AUTO, SoPlex::SYNCMODE_MANUAL, Timer::time(), SoPlex::TIMELIMIT, Validation::updateExternalSolution(), Validation::updateValidationTolerance(), Timer::USER_TIME, Validation::validate, Validation::validateSolveReal(), SoPlex::VERBOSITY, SPxException::what(), SoPlex::writeBasisFile(), SoPlex::writeDualFileReal(), SoPlex::writeFileReal(), SoPlex::~SoPlex(), Timer::~Timer(), and Validation::~Validation().

◆ printDualSolution()

◆ printPrimalSolution()

static void printPrimalSolution ( SoPlex soplex,
NameSet colnames,
NameSet rownames,
bool  real = true,
bool  rational = false 
)
static

◆ printUsage()

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

Definition at line 47 of file soplexmain.cpp.

Referenced by main().