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.

Functions

int main (int argc, char *argv[])
 runs SoPlexBase 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)
 
template<class R >
static void checkSolutionReal (SoPlexBase< R > &soplex)
 performs external feasibility check with real type More...
 
template<class R >
static void checkSolutionRational (SoPlexBase< R > &soplex)
 performs external feasibility check with rational type More...
 
template<class R >
void checkSolution (SoPlexBase< R > &soplex)
 performs external feasibility check according to check mode More...
 
template<class R >
static void printPrimalSolution (SoPlexBase< R > &soplex, NameSet &colnames, NameSet &rownames, bool real=true, bool rational=false)
 
template<class R >
static void printDualSolution (SoPlexBase< R > &soplex, NameSet &colnames, NameSet &rownames, bool real=true, bool rational=false)
 
template<class R >
int runSoPlex (int argc, char *argv[])
 

Detailed Description

Command line interface of SoPlex LP solver.

Definition in file soplexmain.cpp.

Function Documentation

◆ checkSolution()

void checkSolution ( SoPlexBase< R > &  soplex)

performs external feasibility check according to check mode

Definition at line 252 of file soplexmain.cpp.

References checkSolutionRational(), checkSolutionReal(), SoPlexBase< R >::intParam(), MSG_INFO1, and SoPlexBase< R >::spxout.

◆ checkSolutionRational()

static void checkSolutionRational ( SoPlexBase< R > &  soplex)
static

◆ checkSolutionReal()

static void checkSolutionReal ( SoPlexBase< R > &  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 SoPlexBase< R >::getBoundViolation(), SoPlexBase< R >::getDualViolation(), SoPlexBase< R >::getRedCostViolation(), SoPlexBase< R >::getRowViolation(), SoPlexBase< R >::hasDual(), SoPlexBase< R >::hasPrimal(), MSG_INFO1, SoPlexBase< R >::realParam(), and SoPlexBase< R >::spxout.

Referenced by checkSolution().

◆ freeStrings()

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

Definition at line 100 of file soplexmain.cpp.

Referenced by runSoPlex().

◆ main()

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

runs SoPlexBase command line

Definition at line 1102 of file soplexmain.cpp.

References MSG_ERROR, and printUsage().

◆ printDualSolution()

◆ printPrimalSolution()

◆ printUsage()

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

Definition at line 38 of file soplexmain.cpp.

Referenced by main(), and runSoPlex().

◆ runSoPlex()

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

Definition at line 501 of file soplexmain.cpp.

References TimerFactory::createTimer(), SoPlexBase< R >::FEASTOL, freeStrings(), SPxOut::INFO1, SoPlexBase< R >::intParam(), SoPlexBase< R >::ITERLIMIT, SoPlexBase< R >::loadSettingsFile(), MSG_ERROR, MSG_INFO1, MSG_WARNING, SoPlexBase< R >::numCols(), SoPlexBase< R >::numNonzeros(), SoPlexBase< R >::numRows(), SoPlexBase< R >::optimize(), SoPlexBase< R >::OPTTOL, SoPlexBase< R >::parseSettingsString(), SPxOut::precision(), SoPlexBase< R >::PRICER, printDualSolution(), printPrimalSolution(), printUsage(), SoPlexBase< R >::printUserSettings(), SoPlexBase< R >::printVersion(), SoPlexBase< R >::RATIOTESTER, SoPlexBase< R >::readBasisFile(), SoPlexBase< R >::readFile(), SoPlexBase< R >::READMODE, SoPlexBase< R >::READMODE_RATIONAL, SoPlexBase< R >::READMODE_REAL, SoPlexBase< R >::saveSettingsFile(), SoPlexBase< R >::SCALER, SoPlexBase< R >::setIntParam(), SoPlexBase< R >::setRealParam(), SoPlexBase< R >::SIMPLIFIER, SoPlexBase< R >::SOLVEMODE, SoPlexBase< R >::SOLVEMODE_REAL, SOPLEX_COPYRIGHT, soplex::spx_alloc(), soplex::spx_free(), SoPlexBase< R >::spxout, soplex::spxSnprintf(), Timer::start(), Timer::stop(), SoPlexBase< R >::SYNCMODE, SoPlexBase< R >::SYNCMODE_AUTO, SoPlexBase< R >::SYNCMODE_MANUAL, Timer::time(), SoPlexBase< R >::TIMELIMIT, Validation< R >::updateExternalSolution(), Validation< R >::updateValidationTolerance(), Timer::USER_TIME, Validation< R >::validate, Validation< R >::validateSolveReal(), SoPlexBase< R >::VERBOSITY, SPxException::what(), SoPlexBase< R >::writeDualFileReal(), SoPlexBase< R >::writeFile(), SoPlexBase< R >::~SoPlexBase(), Timer::~Timer(), and Validation< R >::~Validation().