72 return tminlp_->get_variables_types(n - 1, var_types);
109 for(
int i = 0 ; i < n ; i++){
148 bool r_val = tminlp_->get_variables_linearity(n-1, c);
159 return tminlp_->finalize_solution(status, n - 1, x,
166 return tminlp_->branchingInfo();
172 return tminlp_->sosConstraints();
177 return tminlp_->perturbInfo();
183 return tminlp_->hasUpperBoundingObjective();}
189 return tminlp_->eval_upper_bound_f(n - 1, x, obj_value); }
197 void gutsOfDestructor();
From a TMINLP, this class adapts to another TMINLP where the original objective is transformed into a...
void setTminlp(Ipopt::SmartPtr< TMINLP > tminlp)
set reference TMINLP
virtual const BranchingInfo * branchingInfo() const
Use tminlp_ function.
virtual bool hasLinearObjective()
Say if problem has a linear objective (for OA)
virtual void finalize_solution(TMINLP::SolverReturn status, Ipopt::Index n, const Ipopt::Number *x, Ipopt::Number obj_value)
Use tminlp_ function.
Ipopt::SmartPtr< TMINLP > tminlp()
return pointer to tminlp_.
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)
Return the information about the bound on the variables and constraints.
virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number *grad_f)
Return the vector of the gradient of the objective w.r.t.
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.
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)
Return scaling parameters.
virtual bool eval_upper_bound_f(Ipopt::Index n, const Ipopt::Number *x, Ipopt::Number &obj_value)
Use tminlp_ function.
virtual bool hasUpperBoundingObjective()
Use tminlp_ function.
virtual const SosInfo * sosConstraints() const
Use tminlp_ function.
virtual bool get_constraints_linearity(Ipopt::Index m, Ipopt::TNLP::LinearityType *const_types)
Return the constraints linearity.
virtual const PerturbInfo * perturbInfo() const
Use tminlp_ function.
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.
virtual bool get_variables_linearity(Ipopt::Index n, Ipopt::TNLP::LinearityType *c)
overload this method to provide the variables linearity.
TMINLPLinObj()
Default constructor.
virtual bool eval_g(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Number *g)
Return the vector of constraint values.
virtual bool eval_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value)
Return the value of the objective function.
virtual ~TMINLPLinObj()
destructor.
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.
virtual bool get_nlp_info(Ipopt::Index &n, Ipopt::Index &m, Ipopt::Index &nnz_jac_g, Ipopt::Index &nnz_h_lag, Ipopt::TNLP::IndexStyleEnum &index_style)
Return the number of variables and constraints, and the number of non-zeros in the jacobian and the h...
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)
Return the starting point.
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)
Return the jacobian of the constraints.
virtual bool get_variables_types(Ipopt::Index n, VariableType *var_types)
Get the variable type.
Class to store perturbation radii for variables in the model.
Base class for all MINLPs that use a standard triplet matrix form and dense vectors.
VariableType
Type of the variables.
SolverReturn
Return statuses of algorithm.
(C) Copyright International Business Machines Corporation 2007
bool IsValid(const SmartPtr< U > &smart_ptr)
Stores branching priorities information.
Class to store sos constraints for model.