Commit 1f07c649 authored by David Bommes's avatar David Bommes

improved small_miqp example

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@226 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent c7ea0e8e
......@@ -369,3 +369,13 @@ endif()
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/small_cplex_soc/CMakeLists.txt" )
add_subdirectory (Examples/small_cplex_soc)
endif()
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/small_adolc/CMakeLists.txt" )
add_subdirectory (Examples/small_adolc)
endif()
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/vector1_adolc/CMakeLists.txt" )
add_subdirectory (Examples/vector1_adolc)
endif()
if( EXISTS "${CMAKE_SOURCE_DIR}/Examples/vector2_adolc/CMakeLists.txt" )
add_subdirectory (Examples/vector2_adolc)
endif()
......@@ -30,6 +30,7 @@
#include <CoMISo/NSolver/NPDerivativeChecker.hh>
#include <CoMISo/NSolver/GUROBISolver.hh>
#include <CoMISo/NSolver/CPLEXSolver.hh>
#include <CoMISo/NSolver/COMISOSolver.hh>
#include <CoMISo/NSolver/LinearConstraint.hh>
#include <CoMISo/NSolver/VariableType.hh>
......@@ -136,21 +137,28 @@ int main(void)
std::cout << "---------- 5) Get GUROBI solver... " << std::endl;
COMISO::GUROBISolver gsol;
std::cout << "---------- 4) Solve..." << std::endl;
std::cout << "---------- 6) Solve..." << std::endl;
gsol.solve(&snp, constraints, discrete_variables);
#endif
// check if TAO solver available in current configuration
#if( COMISO_CPLEX_AVAILABLE)
std::cout << "---------- 5) Solve with CPLEX solver... " << std::endl;
std::cout << "---------- 7) Solve with CPLEX solver... " << std::endl;
COMISO::CPLEXSolver csol;
std::cout << "---------- 4) Solve..." << std::endl;
std::cout << "---------- 8) Solve..." << std::endl;
csol.solve(&snp, constraints, discrete_variables);
#endif
std::cout << "---------- 9) Approximate with COMISO solver... " << std::endl;
COMISO::COMISOSolver cosol;
std::cout << "---------- 10) Solve..." << std::endl;
cosol.solve(&snp, constraints, discrete_variables);
return 0;
}
......@@ -55,7 +55,7 @@ public:
std::vector<NConstraintInterface*>& _constraints, // linear constraints
std::vector<PairUiV>& _discrete_constraints, // discrete constraint
double _reg_factor = 0.0, // reguluarization factor
bool _show_miso_settings = true, // show settings dialog
bool _show_miso_settings = false, // show settings dialog
bool _show_timings = true ); // show timings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment