Bonmin  1.8.8
BonTMINLP2TNLP.hpp
Go to the documentation of this file.
1 // (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2004, 2006
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors :
6 // Pierre Bonami, Carnegie Mellon University,
7 // Carl D. Laird, Carnegie Mellon University,
8 // Andreas Waechter, International Business Machines Corporation
9 //
10 // Date : 12/01/2004
11 
12 #ifndef __TMINLP2TNLP_HPP__
13 #define __TMINLP2TNLP_HPP__
14 
15 #include "IpTNLP.hpp"
16 #include "BonTMINLP.hpp"
17 #include "IpSmartPtr.hpp"
18 #include "IpIpoptApplication.hpp"
19 #include "IpOptionsList.hpp"
20 #include "BonTypes.hpp"
21 
22 namespace Bonmin
23 {
24  class IpoptInteriorWarmStarter;
25 
32  class TMINLP2TNLP : public Ipopt::TNLP
33  {
34  public:
38 #ifdef WARM_STARTER
39  ,
40  const OptionsList& options
41 #endif
42  );
43 
47  TMINLP2TNLP(const TMINLP2TNLP&);
48 
50  virtual TMINLP2TNLP * clone() const{
51  return new TMINLP2TNLP(*this);}
52 
54  virtual ~TMINLP2TNLP();
56 
59 
61  inline Ipopt::Index num_variables() const
62  {
63  assert(x_l_.size() == x_u_.size());
64  return static_cast<int>(x_l_.size());
65  }
66 
69  {
70  assert(g_l_.size() == g_u_.size());
71  return static_cast<int>(g_l_.size());
72  }
75  {
76  return nnz_h_lag_;
77  }
80  {
81  return &var_types_[0];
82  }
83 
85  const Ipopt::Number* x_l()
86  {
87  return &x_l_[0];
88  }
90  const Ipopt::Number* x_u()
91  {
92  return &x_u_[0];
93  }
94 
96  const Ipopt::Number* orig_x_l() const
97  {
98  return &orig_x_l_[0];
99  }
101  const Ipopt::Number* orig_x_u() const
102  {
103  return orig_x_u_();
104  }
105 
108  {
109  return g_l_();
110  }
113  {
114  return g_u_();
115  }
116 
118  const Ipopt::Number * x_init() const
119  {
120  return x_init_();
121  }
122 
124  const Ipopt::Number * x_init_user() const
125  {
126  return x_init_user_();
127  }
128 
130  const Ipopt::Number * duals_init() const
131  {
132  return duals_init_;
133  }
134 
136  const Ipopt::Number* x_sol() const
137  {
138  return x_sol_();
139  }
140 
142  const Ipopt::Number* g_sol() const
143  {
144  return g_sol_();
145  }
146 
148  const Ipopt::Number* duals_sol() const
149  {
150  return duals_sol_();
151  }
152 
155  {
156  return return_status_;
157  }
158 
161  {
162  return obj_value_;
163  }
164 
167  {
168  obj_value_ = value;
169  }
170 
172  void force_fractionnal_sol();
173 
176  const Ipopt::Number * x_l,
177  const Ipopt::Number * x_u);
178 
181  const Ipopt::Number * x_l);
182 
185  const Ipopt::Number * x_u);
186 
189 
192 
195 
197  void resetStartingPoint();
198 
200  void setxInit(Ipopt::Index n,const Ipopt::Number* x_init);
201 
204 
207  int has_x_init(){
208  if(x_init_.empty()) return 0;
209  if(duals_init_) return 2;
210  return 1;
211  }
213  void Set_x_sol(Ipopt::Index n, const Ipopt::Number* x_sol);
214 
216  void Set_dual_sol(Ipopt::Index n, const Ipopt::Number* dual_sol);
217 
221 
225  void outputDiffs(const std::string& probName, const std::string* varNames);
226 
233 
239 
243  {
244  return tminlp_->get_constraints_linearity(m, const_types);
245  }
246 
250  {
251  return tminlp_->get_variables_linearity(n, var_types);
252  }
253 
255  virtual bool hasLinearObjective(){return tminlp_->hasLinearObjective();}
263  virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number* x,
264  bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
265  Ipopt::Index m, bool init_lambda,
266  Ipopt::Number* lambda);
267 
270  virtual bool get_scaling_parameters(Ipopt::Number& obj_scaling,
271  bool& use_x_scaling, Ipopt::Index n,
272  Ipopt::Number* x_scaling,
273  bool& use_g_scaling, Ipopt::Index m,
274  Ipopt::Number* g_scaling);
275 
276 
279  virtual bool get_warm_start_iterate(Ipopt::IteratesVector& warm_start_iterate);
280 
282  virtual bool eval_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
284 
287  virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
288  Ipopt::Number* grad_f);
289 
291  virtual bool eval_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
293 
299  virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
300  Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow,
301  Ipopt::Index *jCol, Ipopt::Number* values);
302 
304  virtual bool eval_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
305  Ipopt::Index i, Ipopt::Number& gi);
308  virtual bool eval_grad_gi(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
309  Ipopt::Index i, Ipopt::Index& nele_grad_gi, Ipopt::Index* jCol,
310  Ipopt::Number* values);
311 
319  virtual bool eval_h(Ipopt::Index n, const Ipopt::Number* x, bool new_x,
320  Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number* lambda,
321  bool new_lambda, Ipopt::Index nele_hess,
322  Ipopt::Index* iRow, Ipopt::Index* jCol, Ipopt::Number* values);
324 
328  virtual void finalize_solution(Ipopt::SolverReturn status,
329  Ipopt::Index n, const Ipopt::Number* x, const Ipopt::Number* z_L, const Ipopt::Number* z_U,
330  Ipopt::Index m, const Ipopt::Number* g, const Ipopt::Number* lambda,
332  const Ipopt::IpoptData* ip_data,
337  virtual bool intermediate_callback(Ipopt::AlgorithmMode mode,
339  Ipopt::Number inf_pr, Ipopt::Number inf_du,
340  Ipopt::Number mu, Ipopt::Number d_norm,
341  Ipopt::Number regularization_size,
342  Ipopt::Number alpha_du, Ipopt::Number alpha_pr,
343  Ipopt::Index ls_trials,
344  const Ipopt::IpoptData* ip_data,
347 
354 
356 
358 
361  return tminlp_->hasUpperBoundingObjective();}
362 
364  double evaluateUpperBoundingFunction(const double * x);
365 
369 
370 
372  virtual void addCuts(unsigned int numberCuts, const OsiRowCut ** cuts){
373  if(numberCuts > 0)
374  throw CoinError("BonTMINLP2TNLP", "addCuts", "Not implemented");}
375 
376 
378  virtual void addCuts(const OsiCuts &cuts){
379  if(cuts.sizeRowCuts() > 0 || cuts.sizeColCuts() > 0)
380  throw CoinError("BonTMINLP2TNLP", "addCuts", "Not implemented");}
381 
383  virtual void removeCuts(unsigned int number ,const int * toRemove){
384  if(number > 0)
385  throw CoinError("BonTMINLP2TNLP", "removeCuts", "Not implemented");}
386 
388 
389 
391  virtual const int * get_const_xtra_id() const{
392  return tminlp_->get_const_xtra_id();
393  }
394 
396  double check_solution(OsiObject ** objects = 0, int nObjects = -1);
397  protected:
432  return nnz_h_lag_;}
435  return nnz_jac_g_;}
436 
439  return index_style_;}
440  private:
450  TMINLP2TNLP();
451 
453  TMINLP2TNLP& operator=(const TMINLP2TNLP&);
455 
457  Ipopt::SmartPtr<TMINLP> tminlp_;
458 
461  Ipopt::Index nnz_jac_g_;
464  Ipopt::Index nnz_h_lag_;
466  TNLP::IndexStyleEnum index_style_;
467 
469  Ipopt::SolverReturn return_status_;
471  Ipopt::Number obj_value_;
473 
479  Ipopt::Number nlp_lower_bound_inf_;
481  Ipopt::Number nlp_upper_bound_inf_;
485  bool warm_start_entire_iterate_;
487  bool need_new_warm_starter_;
489 
490 
493  void throw_exception_on_bad_variable_bound(Ipopt::Index i);
494 
495  private:
496  // Delete all arrays
497  void gutsOfDelete();
498 
504  void gutsOfCopy(const TMINLP2TNLP &source);
505  };
506 
507 } // namespace Ipopt
508 
509 #endif
Bonmin::TMINLP2TNLP::nnz_h_lag
Ipopt::Index nnz_h_lag() const
Access number of entries in tminlp_ hessian.
Definition: BonTMINLP2TNLP.hpp:431
Bonmin::TMINLP2TNLP::orig_x_l
const Ipopt::Number * orig_x_l() const
Get the original values for the lower bounds.
Definition: BonTMINLP2TNLP.hpp:96
Bonmin::TMINLP2TNLP::orig_x_u
const Ipopt::Number * orig_x_u() const
Get the original values for the upper bounds.
Definition: BonTMINLP2TNLP.hpp:101
Bonmin::TMINLP2TNLP::index_style
TNLP::IndexStyleEnum index_style() const
Acces index_style.
Definition: BonTMINLP2TNLP.hpp:438
Bonmin::TMINLP2TNLP::setxInit
void setxInit(Ipopt::Index n, const Ipopt::Number *x_init)
set the starting point to x_init
OsiObject
Bonmin::TMINLP2TNLP::Set_dual_sol
void Set_dual_sol(Ipopt::Index n, const Ipopt::Number *dual_sol)
Set the contiuous dual solution.
IpIpoptApplication.hpp
Bonmin::TMINLP2TNLP::eval_grad_f
virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number *grad_f)
Returns the vector of the gradient of the objective w.r.t.
Ipopt::IpoptData
Bonmin::TMINLP2TNLP::addCuts
virtual void addCuts(const OsiCuts &cuts)
Add some cuts to the problem formulaiton (handles Quadratics).
Definition: BonTMINLP2TNLP.hpp:378
Bonmin::TMINLP2TNLP::get_bounds_info
virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt::Number *x_u, Ipopt::Index m, Ipopt::Number *g_l, Ipopt::Number *g_u)
The caller is allowed to modify the bounds, so this method returns the internal bounds information.
Bonmin
(C) Copyright International Business Machines Corporation 2007
Definition: BonAmplSetup.hpp:15
Bonmin::TMINLP2TNLP::SetVariableUpperBound
void SetVariableUpperBound(Ipopt::Index var_no, Ipopt::Number x_u)
Change the upper bound on the variable.
Ipopt::IpoptCalculatedQuantities
Bonmin::TMINLP2TNLP::var_types
const TMINLP::VariableType * var_types()
Get the variable types.
Definition: BonTMINLP2TNLP.hpp:79
Bonmin::TMINLP2TNLP::x_l
const Ipopt::Number * x_l()
Get the current values for the lower bounds.
Definition: BonTMINLP2TNLP.hpp:85
BonTMINLP.hpp
Bonmin::TMINLP2TNLP::get_starting_point
virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number *x, bool init_z, Ipopt::Number *z_L, Ipopt::Number *z_U, Ipopt::Index m, bool init_lambda, Ipopt::Number *lambda)
Method called by Ipopt to get the starting point.
Ipopt::Number
double Number
Bonmin::TMINLP2TNLP::SetVariableBounds
void SetVariableBounds(Ipopt::Index var_no, Ipopt::Number x_l, Ipopt::Number x_u)
Change the bounds on the variable.
Bonmin::TMINLP2TNLP::hasLinearObjective
virtual bool hasLinearObjective()
returns true if objective is linear.
Definition: BonTMINLP2TNLP.hpp:255
Bonmin::TMINLP2TNLP::eval_jac_g
virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values)
Returns the jacobian of the constraints.
Bonmin::TMINLP2TNLP::duals_sol_
vector< Ipopt::Number > duals_sol_
Dual multipliers of constraints and bounds.
Definition: BonTMINLP2TNLP.hpp:427
Bonmin::TMINLP2TNLP::addCuts
virtual void addCuts(unsigned int numberCuts, const OsiRowCut **cuts)
Methods are not implemented at this point.
Definition: BonTMINLP2TNLP.hpp:372
Bonmin::TMINLP2TNLP::evaluateUpperBoundingFunction
double evaluateUpperBoundingFunction(const double *x)
Evaluate the upper bounding function at given point and store the result.
OsiCuts::sizeColCuts
int sizeColCuts() const
Bonmin::TMINLP2TNLP::SetVariablesLowerBounds
void SetVariablesLowerBounds(Ipopt::Index n, const Ipopt::Number *x_l)
Change the lower bound on the variables.
Bonmin::TMINLP2TNLP::g_sol_
vector< Ipopt::Number > g_sol_
Activities of constraint g( x_sol_)
Definition: BonTMINLP2TNLP.hpp:425
Bonmin::TMINLP2TNLP::get_const_xtra_id
virtual const int * get_const_xtra_id() const
Access array describing constraint to which perspectives should be applied.
Definition: BonTMINLP2TNLP.hpp:391
Bonmin::TMINLP2TNLP::nnz_h_lag
Ipopt::Index nnz_h_lag()
Get the nomber of nz in hessian.
Definition: BonTMINLP2TNLP.hpp:74
Bonmin::TMINLP2TNLP::g_sol
const Ipopt::Number * g_sol() const
get the g solution (activities)
Definition: BonTMINLP2TNLP.hpp:142
Bonmin::TMINLP2TNLP::x_u
const Ipopt::Number * x_u()
Get the current values for the upper bounds.
Definition: BonTMINLP2TNLP.hpp:90
Bonmin::TMINLP2TNLP::has_x_init
int has_x_init()
xInit has been set?
Definition: BonTMINLP2TNLP.hpp:207
Bonmin::TMINLP2TNLP::check_solution
double check_solution(OsiObject **objects=0, int nObjects=-1)
Round and check the current solution, return norm inf of constraint violation.
Bonmin::vector< TMINLP::VariableType >
Bonmin::TMINLP2TNLP::x_l_
vector< Ipopt::Number > x_l_
Current lower bounds on variables.
Definition: BonTMINLP2TNLP.hpp:405
Bonmin::TMINLP2TNLP::x_sol_
vector< Ipopt::Number > x_sol_
Optimal solution.
Definition: BonTMINLP2TNLP.hpp:423
Bonmin::TMINLP2TNLP::x_init_user
const Ipopt::Number * x_init_user() const
get the user provided starting primal point
Definition: BonTMINLP2TNLP.hpp:124
Bonmin::TMINLP2TNLP::x_init
const Ipopt::Number * x_init() const
get the starting primal point
Definition: BonTMINLP2TNLP.hpp:118
Ipopt::Index
int Index
Bonmin::TMINLP2TNLP::orig_x_u_
vector< Ipopt::Number > orig_x_u_
Original upper bounds on variables.
Definition: BonTMINLP2TNLP.hpp:411
Bonmin::TMINLP2TNLP::optimization_status
Ipopt::SolverReturn optimization_status() const
Get Optimization status.
Definition: BonTMINLP2TNLP.hpp:154
BonTypes.hpp
Bonmin::TMINLP2TNLP::g_l_
vector< Ipopt::Number > g_l_
Lower bounds on constraints values.
Definition: BonTMINLP2TNLP.hpp:413
OsiRowCut
Bonmin::TMINLP2TNLP::hasUpperBoundingObjective
virtual bool hasUpperBoundingObjective()
Say if has a specific function to compute upper bounds.
Definition: BonTMINLP2TNLP.hpp:360
Bonmin::TMINLP2TNLP::intermediate_callback
virtual bool intermediate_callback(Ipopt::AlgorithmMode mode, Ipopt::Index iter, Ipopt::Number obj_value, Ipopt::Number inf_pr, Ipopt::Number inf_du, Ipopt::Number mu, Ipopt::Number d_norm, Ipopt::Number regularization_size, Ipopt::Number alpha_du, Ipopt::Number alpha_pr, Ipopt::Index ls_trials, const Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq)
Intermediate Callback method for the user.
Ipopt::SmartPtr
Bonmin::TMINLP2TNLP::x_init_user_
vector< Ipopt::Number > x_init_user_
User-provideed initial prmal point.
Definition: BonTMINLP2TNLP.hpp:421
Bonmin::TMINLP2TNLP::duals_init_
Ipopt::Number * duals_init_
Initial values for all dual multipliers (constraints then lower bounds then upper bounds)
Definition: BonTMINLP2TNLP.hpp:419
Bonmin::TMINLP2TNLP::num_variables
Ipopt::Index num_variables() const
Get the number of variables.
Definition: BonTMINLP2TNLP.hpp:61
Bonmin::TMINLP2TNLP::eval_h
virtual bool eval_h(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number *lambda, bool new_lambda, Ipopt::Index nele_hess, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values)
Return the hessian of the lagrangian.
Bonmin::TMINLP2TNLP::resetStartingPoint
void resetStartingPoint()
reset the starting point to original one.
Bonmin::TMINLP2TNLP
This is an adapter class that converts a TMINLP to a TNLP to be solved by Ipopt.
Definition: BonTMINLP2TNLP.hpp:32
OsiCuts
OsiCuts::sizeRowCuts
int sizeRowCuts() const
Bonmin::TMINLP2TNLP::nnz_jac_g
Ipopt::Index nnz_jac_g() const
Access number of entries in tminlp_ hessian.
Definition: BonTMINLP2TNLP.hpp:434
Bonmin::TMINLP2TNLP::get_warm_start_iterate
virtual bool get_warm_start_iterate(Ipopt::IteratesVector &warm_start_iterate)
Methat that returns an Ipopt IteratesVector that has the starting point for all internal varibles.
Bonmin::TMINLP2TNLP::x_u_
vector< Ipopt::Number > x_u_
Current upper bounds on variables.
Definition: BonTMINLP2TNLP.hpp:407
Bonmin::TMINLP2TNLP::force_fractionnal_sol
void force_fractionnal_sol()
force solution to be fractionnal.
Bonmin::TMINLP2TNLP::removeCuts
virtual void removeCuts(unsigned int number, const int *toRemove)
Remove some cuts to the formulation.
Definition: BonTMINLP2TNLP.hpp:383
Bonmin::TMINLP2TNLP::SetWarmStarter
void SetWarmStarter(Ipopt::SmartPtr< IpoptInteriorWarmStarter > warm_starter)
Bonmin::TMINLP2TNLP::eval_grad_gi
virtual bool eval_grad_gi(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index i, Ipopt::Index &nele_grad_gi, Ipopt::Index *jCol, Ipopt::Number *values)
compute the structure or values of the gradient for one constraint
Bonmin::TMINLP2TNLP::duals_sol
const Ipopt::Number * duals_sol() const
get the dual values
Definition: BonTMINLP2TNLP.hpp:148
Bonmin::TMINLP2TNLP::duals_init
const Ipopt::Number * duals_init() const
get the starting dual point
Definition: BonTMINLP2TNLP.hpp:130
Bonmin::TMINLP2TNLP::g_l
const Ipopt::Number * g_l()
Get the current values for constraints lower bounds.
Definition: BonTMINLP2TNLP.hpp:107
Ipopt::TNLP::LinearityType
LinearityType
Bonmin::TMINLP2TNLP::outputDiffs
void outputDiffs(const std::string &probName, const std::string *varNames)
Procedure to ouptut relevant informations to reproduce a sub-problem.
Bonmin::TMINLP2TNLP::var_types_
vector< TMINLP::VariableType > var_types_
Types of the variable (TMINLP::CONTINUOUS, TMINLP::INTEGER, TMINLP::BINARY).
Definition: BonTMINLP2TNLP.hpp:403
Bonmin::TMINLP2TNLP::get_scaling_parameters
virtual bool get_scaling_parameters(Ipopt::Number &obj_scaling, bool &use_x_scaling, Ipopt::Index n, Ipopt::Number *x_scaling, bool &use_g_scaling, Ipopt::Index m, Ipopt::Number *g_scaling)
Method that returns scaling parameters.
Bonmin::TMINLP::VariableType
VariableType
Type of the variables.
Definition: BonTMINLP.hpp:192
Ipopt::TNLP
Bonmin::TMINLP2TNLP::num_constraints
Ipopt::Index num_constraints() const
Get the number of constraints.
Definition: BonTMINLP2TNLP.hpp:68
Bonmin::TMINLP2TNLP::SetVariablesUpperBounds
void SetVariablesUpperBounds(Ipopt::Index n, const Ipopt::Number *x_u)
Change the upper bound on the variable.
Bonmin::TMINLP2TNLP::~TMINLP2TNLP
virtual ~TMINLP2TNLP()
Default destructor.
Bonmin::TMINLP2TNLP::get_nlp_info
virtual bool get_nlp_info(Ipopt::Index &n, Ipopt::Index &m, Ipopt::Index &nnz_jac_g, Ipopt::Index &nnz_h_lag, TNLP::IndexStyleEnum &index_style)
This call is just passed onto the TMINLP object.
Bonmin::TMINLP2TNLP::get_constraints_linearity
virtual bool get_constraints_linearity(Ipopt::Index m, LinearityType *const_types)
Returns the constraint linearity.
Definition: BonTMINLP2TNLP.hpp:242
IpSmartPtr.hpp
CoinError
Ipopt::TNLP::IndexStyleEnum
IndexStyleEnum
Bonmin::TMINLP2TNLP::eval_f
virtual bool eval_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value)
Returns the value of the objective function in x.
Bonmin::TMINLP2TNLP::finalize_solution
virtual void finalize_solution(Ipopt::SolverReturn status, Ipopt::Index n, const Ipopt::Number *x, const Ipopt::Number *z_L, const Ipopt::Number *z_U, Ipopt::Index m, const Ipopt::Number *g, const Ipopt::Number *lambda, Ipopt::Number obj_value, const Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq)
This method is called when the algorithm is complete so the TNLP can store/write the solution.
Bonmin::TMINLP2TNLP::SetVariableType
void SetVariableType(Ipopt::Index n, TMINLP::VariableType type)
Change the type of the variable.
Bonmin::TMINLP2TNLP::setDualsInit
void setDualsInit(Ipopt::Index n, const Ipopt::Number *duals_init)
set the dual starting point to duals_init
Bonmin::TMINLP2TNLP::GetWarmStarter
Ipopt::SmartPtr< IpoptInteriorWarmStarter > GetWarmStarter()
Bonmin::TMINLP2TNLP::clone
virtual TMINLP2TNLP * clone() const
virtual copy .
Definition: BonTMINLP2TNLP.hpp:50
Bonmin::TMINLP2TNLP::g_u_
vector< Ipopt::Number > g_u_
Upper bounds on constraints values.
Definition: BonTMINLP2TNLP.hpp:415
Bonmin::TMINLP2TNLP::orig_x_l_
vector< Ipopt::Number > orig_x_l_
Original lower bounds on variables.
Definition: BonTMINLP2TNLP.hpp:409
Ipopt::SolverReturn
SolverReturn
Bonmin::TMINLP2TNLP::eval_g
virtual bool eval_g(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Number *g)
Returns the vector of constraint values in x.
Bonmin::TMINLP2TNLP::obj_value
Ipopt::Number obj_value() const
Get the objective value.
Definition: BonTMINLP2TNLP.hpp:160
Bonmin::TMINLP2TNLP::x_init_
vector< Ipopt::Number > x_init_
Initial primal point.
Definition: BonTMINLP2TNLP.hpp:417
Ipopt::OptionsList
Bonmin::TMINLP2TNLP::eval_gi
virtual bool eval_gi(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index i, Ipopt::Number &gi)
compute the value of a single constraint
Bonmin::TMINLP2TNLP::SetVariableLowerBound
void SetVariableLowerBound(Ipopt::Index var_no, Ipopt::Number x_l)
Change the lower bound on the variable.
IpOptionsList.hpp
Bonmin::TMINLP2TNLP::Set_x_sol
void Set_x_sol(Ipopt::Index n, const Ipopt::Number *x_sol)
Set the contiuous solution.
Bonmin::TMINLP2TNLP::x_sol
const Ipopt::Number * x_sol() const
get the solution values
Definition: BonTMINLP2TNLP.hpp:136
Bonmin::TMINLP2TNLP::set_obj_value
void set_obj_value(Ipopt::Number value)
Manually set objective value.
Definition: BonTMINLP2TNLP.hpp:166
Bonmin::TMINLP2TNLP::SetVariablesBounds
void SetVariablesBounds(Ipopt::Index n, const Ipopt::Number *x_l, const Ipopt::Number *x_u)
Change the bounds on the variables.
Bonmin::TMINLP2TNLP::g_u
const Ipopt::Number * g_u()
Get the current values for constraints upper bounds.
Definition: BonTMINLP2TNLP.hpp:112
IpTNLP.hpp
Ipopt::IteratesVector
Bonmin::TMINLP2TNLP::get_variables_linearity
virtual bool get_variables_linearity(Ipopt::Index n, LinearityType *var_types)
Returns the variables linearity.
Definition: BonTMINLP2TNLP.hpp:249