Bonmin 1.8.9
Loading...
Searching...
No Matches
BonAmplInterface.hpp
Go to the documentation of this file.
1// (C) Copyright International Business Machines Corporation and
2// Carnegie Mellon University 2004, 2007
3//
4// All Rights Reserved.
5// This code is published under the Eclipse Public License.
6//
7// Authors :
8// Pierre Bonami, Carnegie Mellon University,
9// Andreas Waechter, International Business Machines Corporation
10//
11// Date : 12/01/2004
12
13#ifndef BonminAmplInterface_H
14#define BonminAmplInterface_H
16#include "BonAmplTMINLP.hpp"
17
18class BM_lp;
19namespace Bonmin
20{
23 {
24 public:
30 virtual void readAmplNlFile(char **& argv, Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
33 std::string* nl_file_content = NULL);
35
38 virtual OsiSolverInterface * clone(bool CopyData = true);
39
41 virtual ~AmplInterface();
42
43
45 const AmplTMINLP * amplModel() const
46 {
47 return GetRawPtr(amplTminlp_);
48 }
51
52 protected:
54 void readNames() ;
55
58
59 private:
61 int writeAmplSolFile_;
62 };
63}
64#endif
Class for providing an Osi interface to Ipopt with an ampl nl file as input.
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)
const AmplTMINLP * amplModel() const
Fast access to AmplTMINLP.
AmplInterface(const AmplInterface &other)
Copy 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.
void readNames()
Read variables and row names in .col and .row files.
AmplInterface()
Default constructor.
virtual OsiSolverInterface * clone(bool CopyData=true)
Clone.
virtual ~AmplInterface()
Destructor.
Ampl MINLP Interface.
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
const Ipopt::SmartPtr< Ipopt::OptionsList > options() const
Retrieve OsiTMINLPApplication option list.
(C) Copyright International Business Machines Corporation 2007
U * GetRawPtr(const SmartPtr< U > &smart_ptr)