18 #ifdef COIN_HAS_FILTERSQP
56 std::string* nl_file_content
60 createApplication(roptions, options, journalist,
"bonmin.");
65 NULL, appName() , nl_file_content);
72 newAmpl->
Initialize(
ConstPtr(app_->journalist()), app_->roptions(), app_->options(), argv,
73 NULL, appName() , nl_file_content);
79 NULL, appName() , nl_file_content);
86 if(feasibility_mode_){
87 problem_to_optimize_ =
GetRawPtr(feasibilityProblem_);
90 problem_to_optimize_ =
GetRawPtr(problem_);
96 obj_ =
new double[numcols];
97 CoinFillN(obj_,numcols,1.);
99 extractInterfaceParams();
100 hasBeenOptimized_ =
false;
113 std::string probName;
119 setColNames(colNames, 0, static_cast<int>(colNames.size()), 0);
126 setRowNames(rowNames, 0, static_cast<int>(rowNames.size()), 0);
virtual void Initialize(const Ipopt::SmartPtr< const Ipopt::Journalist > &jnlst, const Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, const Ipopt::SmartPtr< Ipopt::OptionsList > options, char **&argv, Ipopt::AmplSuffixHandler *suffix_handler=NULL, const std::string &appName="bonmin", std::string *nl_file_content=NULL)
Constructor.
void copyNames(OsiSolverInterface::OsiNameVec &Names)
Copy the names to Names.
virtual ~AmplInterface()
Destructor.
virtual OsiSolverInterface * clone(bool CopyData=true)
Clone.
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
bool IsValid(const OSSmartPtr< U > &smart_ptr)
void readNames()
Read variables and row names in .col and .row files.
bool readFile()
Reads the .col file.
virtual int getNumCols() const
Get number of columns.
Class for providing an Osi interface to Ipopt with an ampl nl file as input.
bool getStrParam(OsiStrParam key, std::string &value) const
virtual void readAmplNlFile(char **&argv, Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist, std::string *nl_file_content=NULL)
OSSmartPtr< const U > ConstPtr(const OSSmartPtr< U > &smart_ptr)
bool setStrParam(OsiStrParam key, const std::string &value)
U * GetRawPtr(const OSSmartPtr< U > &smart_ptr)
A class for reading a .col or .row file containing name for variables and constraints (usually ampl g...
virtual AmplTMINLP * createEmpty()
Constructor.
AmplInterface()
Default constructor.
Ipopt::SmartPtr< Bonmin::AmplTMINLP > amplTminlp_
TMINLP problem (the original problem usually an AmplTMINLP).
virtual void setAppDefaultOptions(Ipopt::SmartPtr< Ipopt::OptionsList > Options)
To set some application specific defaults.
This is an adapter class that converts a TMINLP to a TNLP to be solved by Ipopt.
This is an adapter class to convert an NLP to a Feasibility Pump NLP by changing the objective functi...