// Copyright (C) 2000, International Business Machines // Corporation and others. All Rights Reserved. // Test individual classes or groups of classes #if defined(_MSC_VER) // Turn off compiler warning about long names # pragma warning(disable:4786) #endif #include #include #include "OsiRowCut.hpp" #include "OsiColCut.hpp" #include "OsiCuts.hpp" #include "CoinHelperFunctions.hpp" #include "CoinSort.hpp" #include "OsiSolverInterface.hpp" #include "OsiRowCutDebugger.hpp" #ifdef COIN_USE_OSL #include "OsiOslSolverInterface.hpp" #endif #ifdef COIN_USE_XPR #include "OsiXprSolverInterface.hpp" #endif #ifdef COIN_USE_CPX #include "OsiCpxSolverInterface.hpp" #endif #ifdef COIN_USE_SPX #include "OsiSpxSolverInterface.hpp" #endif #ifdef COIN_USE_VOL #include "OsiVolSolverInterface.hpp" #endif #ifdef COIN_USE_DYLP #include "OsiDylpSolverInterface.hpp" #endif #ifdef COIN_USE_GLPK #include "OsiGlpkSolverInterface.hpp" #endif #ifdef COIN_USE_CLP #include "OsiClpSolverInterface.hpp" #endif // Function Prototypes. Function definitions is in this file. void testingMessage( const char * const msg ); //---------------------------------------------------------------- // unitTest [-mpsDir=V1] [-netlibDir=V2] [-skipOsiSolverInterface] // // where: // -mpsDir: directory containing mps test files // Default value V1="../Mps/Sample" // -netlibDir: directory containing netlib files // Default value V2="../Mps/Netlib" // -testOsiSolverInterface // If specified, then OsiSolveInterface::unitTest // is skipped over and not run. // // All parameters are optional. //---------------------------------------------------------------- int main (int argc, const char *argv[]) { int i; #ifdef COIN_USE_XPR OsiXprSolverInterface::setLogFileName("xprCallTrace.txt"); #endif // define valid parameter keywords std::set definedKeyWords; definedKeyWords.insert("-mpsDir"); definedKeyWords.insert("-netlibDir"); definedKeyWords.insert("-testOsiSolverInterface"); // Create a map of parmater keys and associated data std::map parms; for ( i=1; i vecSi; # if COIN_USE_OSL OsiSolverInterface * oslSi = new OsiOslSolverInterface; vecSi.push_back(oslSi); #endif # if COIN_USE_XPR OsiSolverInterface * xprSi = new OsiXprSolverInterface; vecSi.push_back(xprSi); #endif # if COIN_USE_CPX OsiSolverInterface * cpxSi = new OsiCpxSolverInterface; vecSi.push_back(cpxSi); #endif # if COIN_USE_SPX OsiSolverInterface * spxSi = new OsiSpxSolverInterface; vecSi.push_back(spxSi); #endif # if COIN_USE_CLP OsiSolverInterface * clpSi = new OsiClpSolverInterface; vecSi.push_back(clpSi); #endif # if COIN_USE_DYLP OsiSolverInterface * dylpSi = new OsiDylpSolverInterface; vecSi.push_back(dylpSi); #endif # if COIN_USE_GLPK OsiSolverInterface * glpkSi = new OsiGlpkSolverInterface; vecSi.push_back(glpkSi); #endif # if COIN_USE_VOL OsiSolverInterface * volSi = new OsiVolSolverInterface; vecSi.push_back(volSi); #endif testingMessage( "Testing OsiSolverInterface\n" ); OsiSolverInterfaceMpsUnitTest(vecSi,netlibDir); unsigned int i; for (i=0; i