/home/coin/SVN-release/OS-1.1.1/OS/test/unitTest.cpp File Reference

This file runs the OS unitTest. More...

#include <cppad/cppad.hpp>
#include "OSCoinSolver.h"
#include "OSConfig.h"
#include "OSmps2osil.h"
#include "OSResult.h"
#include "OSiLReader.h"
#include "OSiLWriter.h"
#include "OSrLReader.h"
#include "OSrLWriter.h"
#include "OSInstance.h"
#include "OSFileUtil.h"
#include "CoinError.hpp"
#include "OSDefaultSolver.h"
#include "OSWSUtil.h"
#include "OSSolverAgent.h"
#include "OShL.h"
#include "OSErrorClass.h"
#include "OSBase64.h"
#include "OSCommonUtil.h"
#include <CoinMpsIO.hpp>
#include <CoinPackedMatrix.hpp>
#include "OSMathUtil.h"

Include dependency graph for unitTest.cpp:

Go to the source code of this file.

Functions

int main (int argC, char *argV[])
double getObjVal (std::string osrl)


Detailed Description

This file runs the OS unitTest.

Author:
Robert Fourer, Horand Gassmann, Jun Ma, Kipp Martin,
Version:
1.1, 05/Feb/2008
Since:
OS1.0 stresstest
Remarks:
Copyright (C) 2005-2008, Robert Fourer, Horand Gassmann, Jun Ma, Kipp Martin, Northwestern University, Dalhousie University, and the University of Chicago. All Rights Reserved. This software is licensed under the Common Public License. Please see the accompanying LICENSE file in root directory for terms.
This is the OS unitTest. It currently runs the following tests.

Solvers:

COIN-Ipopt tested on:

  1. avion2.osil
  2. HS071_NLP.osil
  3. rosenbrockmod.osil
  4. parincQuadratic.osil
  5. parincLinear.osil
  6. callBackTest.osil
  7. callBackTestRowMajor.osil

COIN-Clp tested on parincLinearByRow.osil

COIN-Cbc tested on p0033.osil

Knitro tested on:

  1. rosenbrockmod.osil
  2. callBackTest.osil
  3. parincQuadratic.osil
  4. HS071_NLP

COIN-SYMPHONY test on p0033.osil COIN-BONMIN test on bonminEx1.osil and wayneQuadratic

COIN-DyLP tested onparincLinear.osil

COIN-Volume tested on volumeTest.osil

GLPK tested on p0033.osil

Cplex tested on p0033.osil

Lindo tested on:

  1. lindoapiaddins.osil
  2. rosenbrockmode.osil
  3. parincquadratic.osil
  4. wayneQuadratic.osil

We test the mps to osil converter progam OSmps2osil on parincLinear.mps. Solve with Cbc.

We test the AMPL nl file format to osil converter program OSnl2osil on hs71.nl. Solve with Lindo.

We test the base 64 format on problem parincLinear. We first read in the parinc.mps file into an osil string and then set m_bWriteBase64 = true. We then write a new instance in base 64 format and solve it.

We next test the parsers. We test parsing the osil file parincLinear.osil, finplan1.osil and the osrl file parincLinear.osrl. We test the get() and set() methods for osinstance.

Next we test the prefix and postfix routines. For the test problem rosenbrockmod.osil create an OSExpressionTree from the objective function. Then invoke the getPostfix() method and get a postfix vector representation of the expression tree. Then use createExpressionTreeFromPostfix to create an expression tree back. Then use getPrefix() to get a prefix vector from this expression tree. Then use createExpressionTreeFromPrefix to create and expression. Then use getPostfix() to get the postfix vector back and compare with the very first postfix vector and make sure they are the same.

Next test all of the nonlinear operators. The file testOperators.osil uses every nonlinear operator currently defined. Parse this file to make sure the parser works on every operator and then use expTree->m_treeRoot->calculateFunction to make sure the operators are evaluated correctly.

Finally test CppAD. Read in CppADTestLag.osil and make sure gradient and Hessian calculations are working correctly.

Definition in file unitTest.cpp.


Function Documentation

int main ( int  argC,
char *  argV[] 
)

Definition at line 196 of file unitTest.cpp.

References OSmps2osil::createOSInstance(), DoubleVector::el, FileUtil::getFileAsString(), getObjVal(), OSInstance::instanceData, InstanceData::linearConstraintCoefficients, OSiLWriter::m_bWhiteSpace, LinearConstraintCoefficients::numberOfValues, OSmps2osil::osinstance, OSiLReader::readOSiL(), LinearConstraintCoefficients::value, and OSiLWriter::writeOSiL().

double getObjVal ( std::string  osrl  ) 

Definition at line 1845 of file unitTest.cpp.

References os_strtod(), and OSNAN.

Referenced by main().


Generated on Tue Sep 30 03:02:26 2008 by  doxygen 1.4.7