Skip to content

Commit

Permalink
Update interfaces for generating and adding cuts. Add doxygen documen…
Browse files Browse the repository at this point in the history
…tations

on cut generation. Convert dependency from CBLAS to BLAS.
  • Loading branch information
aykutbulut committed Jan 13, 2018
1 parent 594b71a commit dffbc41
Show file tree
Hide file tree
Showing 17 changed files with 9,046 additions and 1,050 deletions.
19 changes: 19 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AUX_DIR = @AUX_DIR@
AWK = @AWK@
BLAS_CFLAGS = @BLAS_CFLAGS@
BLAS_CFLAGS_INSTALLED = @BLAS_CFLAGS_INSTALLED@
BLAS_DATA = @BLAS_DATA@
BLAS_DATA_INSTALLED = @BLAS_DATA_INSTALLED@
BLAS_DEPENDENCIES = @BLAS_DEPENDENCIES@
BLAS_LIBS = @BLAS_LIBS@
BLAS_LIBS_INSTALLED = @BLAS_LIBS_INSTALLED@
BUILDTOOLSDIR = @BUILDTOOLSDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
Expand Down Expand Up @@ -154,6 +161,8 @@ COIN_CC_IS_CL_FALSE = @COIN_CC_IS_CL_FALSE@
COIN_CC_IS_CL_TRUE = @COIN_CC_IS_CL_TRUE@
COIN_CXX_IS_CL_FALSE = @COIN_CXX_IS_CL_FALSE@
COIN_CXX_IS_CL_TRUE = @COIN_CXX_IS_CL_TRUE@
COIN_HAS_BLAS_FALSE = @COIN_HAS_BLAS_FALSE@
COIN_HAS_BLAS_TRUE = @COIN_HAS_BLAS_TRUE@
COIN_HAS_CGL_FALSE = @COIN_HAS_CGL_FALSE@
COIN_HAS_CGL_TRUE = @COIN_HAS_CGL_TRUE@
COIN_HAS_COINUTILS_FALSE = @COIN_HAS_COINUTILS_FALSE@
Expand All @@ -162,6 +171,8 @@ COIN_HAS_COLA_FALSE = @COIN_HAS_COLA_FALSE@
COIN_HAS_COLA_TRUE = @COIN_HAS_COLA_TRUE@
COIN_HAS_DOXYGEN_FALSE = @COIN_HAS_DOXYGEN_FALSE@
COIN_HAS_DOXYGEN_TRUE = @COIN_HAS_DOXYGEN_TRUE@
COIN_HAS_LAPACK_FALSE = @COIN_HAS_LAPACK_FALSE@
COIN_HAS_LAPACK_TRUE = @COIN_HAS_LAPACK_TRUE@
COIN_HAS_LATEX_FALSE = @COIN_HAS_LATEX_FALSE@
COIN_HAS_LATEX_TRUE = @COIN_HAS_LATEX_TRUE@
COIN_HAS_OSICLP_FALSE = @COIN_HAS_OSICLP_FALSE@
Expand Down Expand Up @@ -213,6 +224,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FLIBS = @FLIBS@
HAVE_EXTERNALS_FALSE = @HAVE_EXTERNALS_FALSE@
HAVE_EXTERNALS_TRUE = @HAVE_EXTERNALS_TRUE@
INSTALL_DATA = @INSTALL_DATA@
Expand All @@ -221,6 +233,13 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPOPT_IPM_SOLVER_FALSE = @IPOPT_IPM_SOLVER_FALSE@
IPOPT_IPM_SOLVER_TRUE = @IPOPT_IPM_SOLVER_TRUE@
LAPACK_CFLAGS = @LAPACK_CFLAGS@
LAPACK_CFLAGS_INSTALLED = @LAPACK_CFLAGS_INSTALLED@
LAPACK_DATA = @LAPACK_DATA@
LAPACK_DATA_INSTALLED = @LAPACK_DATA_INSTALLED@
LAPACK_DEPENDENCIES = @LAPACK_DEPENDENCIES@
LAPACK_LIBS = @LAPACK_LIBS@
LAPACK_LIBS_INSTALLED = @LAPACK_LIBS_INSTALLED@
LDFLAGS = @LDFLAGS@
LIBEXT = @LIBEXT@
LIBOBJS = @LIBOBJS@
Expand Down
7,555 changes: 7,456 additions & 99 deletions configure

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ test $coin_has_osicplex = yes])

# Check thirdparty libraries
AC_COIN_CHECK_PACKAGE(Sample, [coindatasample])
#AC_COIN_CHECK_PACKAGE_BLAS(CglConicLib)
#AC_COIN_CHECK_PACKAGE_LAPACK(CglConicLib)
AC_COIN_CHECK_PACKAGE_BLAS(CglConicLib)
AC_COIN_CHECK_PACKAGE_LAPACK(CglConicLib)

#############################################################################
# Solvers for unittesting #
Expand Down
1 change: 1 addition & 0 deletions examples/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ CYGPATH_W = @CYGPATH_W@
# Here we list all possible generated objects or executables to delete them
CLEANFILES = \
gd1.@OBJEXT@ gd1@EXEEXT@ \
dual.@OBJEXT@ dual@EXEEXT@ \
bental.@OBJEXT@ bental@EXEEXT@ \
milp_cuts.@OBJEXT@ milp_cuts@EXEEXT@ \
canonical.@OBJEXT@ canonical@EXEEXT@ \
Expand Down
14 changes: 13 additions & 1 deletion examples/gd1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <iostream>
#include <string>
#include <cassert>
#include <sstream>
// CoinUtils headers
#include <CoinError.hpp>
#include <CoinWarmStartBasis.hpp>
Expand Down Expand Up @@ -61,6 +62,8 @@ using std::string;
int main(int argc, const char *argv[]) {
// If no parms specified then use these
string mpsFileName = argv[1];
string baseName = mpsFileName.substr(mpsFileName.rfind("/")+1,
mpsFileName.rfind(".")-mpsFileName.rfind("/")-1);
try {
// Instantiate a specific solver interface
//OsiConicSolverInterface * si = new ColaModel();
Expand All @@ -84,13 +87,20 @@ int main(int argc, const char *argv[]) {
do {
// Get current solution value
obj = si->getObjValue();
std::cout << "Obj value is " << obj << std::endl;
// Generate and apply cuts
//OsiConicSolverInterface * nsi = cg.generateAndAddBestCut(*si);
OsiConicSolverInterface * nsi = cg.generateAndAddCuts(*si);
delete si;
si = nsi;
//si->writeMps("after_cut");
std::stringstream msg_stream;
//msg_stream << baseName << "dc" << cg.getNumCutsAdded();
msg_stream << baseName;
si->writeMps(msg_stream.str().c_str());
msg_stream.str();
si->resolve();
equalObj = eq(si->getObjValue(), obj);
break;
} while (!equalObj);
// double const * sol = si->getColSolution();
// Print total number of cuts applied,
Expand All @@ -105,6 +115,8 @@ int main(int argc, const char *argv[]) {
cout << "----------------------------------------------------------"
<<endl;
cout <<endl <<endl;
// write mps file
si->writeMps("after_cuts", "mps", 0.0);
delete si;
}
catch (CoinError e) {
Expand Down
Loading

0 comments on commit dffbc41

Please sign in to comment.