15 #include "CoinPragma.hpp"
17 #include "IpoptConfig.h"
18 #include "CbcConfig.h"
19 #include "CoinTime.hpp"
27 using namespace Bonmin;
28 int main (
int argc,
char *argv[])
30 using namespace Ipopt;
35 std::cout<<
" using Cbc "
37 std::cout<<
" and Ipopt "
38 <<IPOPT_VERSION<<std::endl;
40 pbName =
new char[strlen(argv[1])+1];
41 strcpy(pbName, argv[1]);
69 std::cerr<<E.className()<<
"::"<<E.methodName()
71 <<E.message()<<std::endl;
74 std::cerr<<E.className()<<
"::"<<E.methodName()
76 <<E.message()<<std::endl;
78 catch (Ipopt::OPTION_INVALID &E)
80 std::cerr<<
"Ipopt exception : "<<E.Message()<<std::endl;
82 catch (Ipopt::IpoptException &E)
84 std::cerr<<
"Ipopt exception : "<<E.Message()<<std::endl;
88 std::cerr<<pbName<<
" unrecognized exception"<<std::endl;
89 std::cerr<<pbName<<
"\t Finished \t exception"<<std::endl;
void initialize(char **&argv)
initialize bonmin with ampl model using the command line arguments.
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.