13 #include "CoinPragma.hpp"
15 #include "IpoptConfig.h"
16 #include "CbcConfig.h"
17 #include "CoinTime.hpp"
22 using namespace Bonmin;
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]);
61 std::cerr<<E.className()<<
"::"<<E.methodName()
63 <<E.message()<<std::endl;
66 std::cerr<<E.className()<<
"::"<<E.methodName()
68 <<E.message()<<std::endl;
70 catch (Ipopt::OPTION_INVALID &E)
72 std::cerr<<
"Ipopt exception : "<<E.Message()<<std::endl;
74 catch (Ipopt::IpoptException &E)
76 std::cerr<<
"Ipopt exception : "<<E.Message()<<std::endl;
79 std::cerr<<pbName<<
" unrecognized exception"<<std::endl;
80 std::cerr<<pbName<<
"\t Finished \t exception"<<std::endl;
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.
void initialize(Ipopt::SmartPtr< TMINLP > tminlp, bool createContinuousSolver=true)
Initialize, read options and create appropriate bonmin setup.