14 #include "CoinPragma.hpp"
16 #include "IpoptConfig.h"
17 #include "CbcConfig.h"
18 #include "CoinTime.hpp"
23 int main (
int argc,
char *argv[])
25 using namespace Ipopt;
30 std::cout<<
" using Cbc "
32 std::cout<<
" and Ipopt "
33 <<IPOPT_VERSION<<std::endl;
35 pbName =
new char[strlen(argv[1])+1];
36 strcpy(pbName, argv[1]);
62 std::cerr<<E.className()<<
"::"<<E.methodName()
64 <<E.message()<<std::endl;
67 std::cerr<<E.className()<<
"::"<<E.methodName()
69 <<E.message()<<std::endl;
71 catch (Ipopt::OPTION_INVALID &E)
73 std::cerr<<
"Ipopt exception : "<<E.Message()<<std::endl;
75 catch (Ipopt::IpoptException &E)
77 std::cerr<<
"Ipopt exception : "<<E.Message()<<std::endl;
80 std::cerr<<pbName<<
" unrecognized exception"<<std::endl;
81 std::cerr<<pbName<<
"\t Finished \t exception"<<std::endl;
void initialize(Ipopt::SmartPtr< Bonmin::TMINLP > tminlp, bool createContinuousSolver=true)
Initialize, read options and create appropriate bonmin setup.
int main(int argc, char *argv[])
void writeDiffFiles(const std::string prefix=std::string()) const
write files with differences between input model and this one
Error class to throw exceptions from OsiTMINLPInterface.
void printError(std::ostream &os)
Print error message.
We will throw this error when a problem is not solved.