66 std::cerr<<
"FIXME"<<std::endl;
97 std::string name) = 0;
108 const std::string &
prefix);
We will throw this error when a problem is not solved.
virtual const std::string & solverName() const =0
Return the name of the solver.
virtual ~UnsolvedError()
destructor.
void writeDiffFiles(const std::string prefix=std::string()) const
write files with differences between input model and this one
virtual const std::string & errorName() const =0
Get the string corresponding to error.
void printError(std::ostream &os)
Print error message.
UnsolvedError(int errorNum=-10000, Ipopt::SmartPtr< TMINLP2TNLP > model=NULL, std::string name="")
Constructor.
int errorNum() const
Return error number.
This is a generic class for calling an NLP solver to solve a TNLP.
virtual int IterationCount()=0
Get the iteration count of the last optimization.
ReturnStatus
Standard return statuses for a solver.
@ numReturnCodes
Fake member to know size.
virtual ReturnStatus ReOptimizeTNLP(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)=0
Resolves a problem expresses as a TNLP.
virtual void setOutputToDefault()=0
turn off all output from the solver
bool isRecoverable(ReturnStatus &r)
Say if an optimization status for a problem which failed is recoverable (problem may be solvable).
Ipopt::SmartPtr< Ipopt::Journalist > journalist_
Storage of Journalist for output.
double start_time_
Global start time.
static void RegisterOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register this solver options into passed roptions.
virtual CoinWarmStart * getEmptyWarmStart() const =0
virtual bool warmStartIsValid(const CoinWarmStart *ws) const =0
Check that warm start object is valid.
virtual void enableWarmStart()=0
Enable the warm start options in the solver.
virtual double CPUTime()=0
Get the CpuTime of the last optimization.
Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions_
Registered Options.
void setup_global_time_limit(double time_limit)
Setup for a global time limit for solver.
TNLPSolver()
default Constructor
virtual void disableWarmStart()=0
Disable the warm start options in the solver.
virtual int errorCode() const =0
Error code (solver specific).
bool isError(ReturnStatus &r)
Say if return status is an error.
Ipopt::SmartPtr< Ipopt::Journalist > journalist()
Get a pointer to a journalist.
virtual std::string & solverName()=0
Get the solver name.
virtual CoinWarmStart * getWarmStart(Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const =0
Get the warm start form the solver.
virtual bool Initialize(std::istream &is)=0
Initialize the TNLPSolver (read options from istream is)
bool zeroDimension(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp, ReturnStatus &optimization_status)
Determine if problem is of dimension zero and if it is check if solution is feasible.
virtual bool Initialize(std::string params_file)=0
Initialize the TNLPSolver (read options from params_file)
virtual UnsolvedError * newUnsolvedError(int num, Ipopt::SmartPtr< TMINLP2TNLP > problem, std::string name)=0
Ipopt::SmartPtr< Ipopt::OptionsList > options()
Get the options (for getting and setting their values).
int default_log_level_
To record default log level.
TNLPSolver(const TNLPSolver &other)
Copy Constructor.
Ipopt::SmartPtr< const Ipopt::OptionsList > options() const
Get the options (for getting their values).
virtual void forceSolverOutput(int log_level)=0
turn on all output from the solver
virtual bool setWarmStart(const CoinWarmStart *warm, Ipopt::SmartPtr< TMINLP2TNLP > tnlp)=0
Set the warm start in the solver.
double time_limit_
Global time limit.
Ipopt::SmartPtr< Ipopt::OptionsList > options_
List of Options.
Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions()
Get a pointer to RegisteredOptions (generally used to add new ones)
std::string prefix_
Prefix to use for reading bonmin's options.
const char * prefix()
Get the prefix.
void initializeOptionsAndJournalist()
Initializes options and journalist.
virtual ReturnStatus OptimizeTNLP(const Ipopt::SmartPtr< Ipopt::TNLP > &tnlp)=0
Solves a problem expresses as a TNLP.
virtual Ipopt::SmartPtr< TNLPSolver > clone()=0
virtual copy constructor
TNLPSolver(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist, const std::string &prefix)
Constructor with options initialization.
virtual CoinWarmStart * getUsedWarmStart(Ipopt::SmartPtr< TMINLP2TNLP > tnlp) const =0
Get warm start used in last optimization.
virtual ~TNLPSolver()
Virtual destructor.
(C) Copyright International Business Machines Corporation 2007
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)