64#include "IpoptConfig.h"
66#if defined(__GNUC__) && IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
67#pragma GCC diagnostic ignored "-Wshadow"
69#include "IpIpoptApplication.hpp"
70#include "IpIpoptCalculatedQuantities.hpp"
71#include "IpSolveStatistics.hpp"
72#include "IpJournalist.hpp"
73#include "IpIpoptData.hpp"
74#include "IpTNLPAdapter.hpp"
75#include "IpOrigIpoptNLP.hpp"
76#include "IpLapack.hpp"
77#if defined(__GNUC__) && IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
78#pragma GCC diagnostic warning "-Wshadow"
81#if IPOPT_VERSION_MAJOR < 3 || (IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 12)
82#error "The Ipopt interface requires at least 3.12.0"
91#if defined(SCIP_THREADSAFE) && __cplusplus >= 201103L && IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
92#define PROTECT_SOLVE_BY_MUTEX
99#define NLPI_NAME "ipopt"
100#define NLPI_DESC "Ipopt interface"
101#define NLPI_PRIORITY 1000
103#define MAXPERTURB 0.01
104#define FEASTOLFACTOR 0.9
106#define DEFAULT_RANDSEED 71
152 "linear_system_scaling",
153 "nlp_scaling_method",
155 "hessian_approximation"
165 SCIP_Real warm_start_push;
168 explicit SCIP_NlpiData()
169 : optfile(
NULL), print_level(-1), warm_start_push(1
e-9)
214class ScipNLP :
public TNLP
224 int conv_lastrestoiter;
226 unsigned int current_x;
227 unsigned int last_f_eval_x;
228 unsigned int last_g_eval_x;
240 conv_lastrestoiter(-1),
241 current_x(1), last_f_eval_x(0), last_g_eval_x(0),
253 void initializeSolve(
278 bool get_bounds_info(
288 bool get_starting_point(
301 Index get_number_of_nonlinear_variables();
304 bool get_list_of_nonlinear_variables(
310 bool get_var_con_metadata(
388 bool intermediate_callback(
405 void finalize_solution(
421class ScipJournal :
public Ipopt::Journal {
441 Ipopt::EJournalLevel level,
458 Ipopt::EJournalLevel level,
474 void FlushBufferImpl() { }
524 SCIPdebugMsg(
scip,
"Disable warmstart as no primal or dual solution available.\n");
543 warmstart ?
"warm" :
"cold",
548 SCIPdebugMsg(
scip,
"Starting solution for coldstart not available. Making up something by projecting 0 onto variable bounds and adding a random perturbation.\n");
562 for(
int i = 0;
i < n; ++
i )
590 if( nlpidata->print_level < 0 )
595 (
void) nlpiproblem->
ipopt->Options()->SetIntegerValue(
"print_level",
J_ERROR);
612#ifdef SCIP_DISABLED_CODE
615 if( nlpidata->autoiterlim > 0 )
633 for(
int i = 0;
i < n; ++
i )
653 for(
int i = 0;
i < m; ++
i )
722 (
void) nlpiproblem->
ipopt->Options()->SetNumericValue(
"dual_inf_tol", param.
opttol);
723 (
void) nlpiproblem->
ipopt->Options()->SetNumericValue(
"compl_inf_tol", param.
opttol);
727#if IPOPT_VERSION_MAJOR > 3 || IPOPT_VERSION_MINOR > 14 || (IPOPT_VERSION_MINOR == 14 && IPOPT_VERSION_RELEASE >= 2)
728 (
void) nlpiproblem->
ipopt->Options()->UnsetValue(
"tol");
730 (
void) nlpiproblem->
ipopt->Options()->SetNumericValue(
"tol", 1
e-8);
734#if IPOPT_VERSION_MAJOR > 3 || IPOPT_VERSION_MINOR >= 14
743 (
void) nlpiproblem->
ipopt->Options()->SetIntegerValue(
"acceptable_iter", 0);
745#if IPOPT_VERSION_MAJOR > 3 || IPOPT_VERSION_MINOR > 14 || (IPOPT_VERSION_MINOR == 14 && IPOPT_VERSION_RELEASE >= 2)
746 (
void) nlpiproblem->
ipopt->Options()->UnsetValue(
"acceptable_iter");
748 (
void) nlpiproblem->
ipopt->Options()->SetIntegerValue(
"acceptable_iter", 15);
751 (
void) nlpiproblem->
ipopt->Options()->SetStringValue(
"expect_infeasible_problem", param.
expectinfeas ?
"yes" :
"no");
753 if( !nlpiproblem->
ipopt->Options()->SetStringValue(
"warm_start_init_point", param.
warmstart ?
"yes" :
"no") && !param.
warmstart )
756 SCIPerrorMessage(
"Failed to set Ipopt warm_start_init_point option to no.");
763#ifdef COLLECT_SOLVESTATS
789 for(
int i = 0;
i < n; ++
i )
814 for(
int i = 0;
i < m; ++
i )
855 for(
int i = 0;
i < n; ++
i )
870 problem->
ipopt->Options()->GetBoolValue(
"expect_infeasible_problem", expectinfeas,
"");
875 printf(
"IPOPTSTAT status,iter,time,nvars,nnlvars,nvarlb,nvarub,nlincons,nnlcons,objnl,jacnnz,hesnnz,linsys11nz,linsys13nz,linsys11density,linsys13density,expectinfeas\n");
879 printf(
"IPOPTSTAT %d,%d,%g,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%f,%d\n",
880 status, stats->IterationCount(), stats->TotalWallclockTime(),
881 nvars,
nnlvars,
nvarlb,
nvarub,
nlincons,
nnlcons,
objnl,
jacnnz, hesnnz,
linsys11nz,
linsys13nz,
linsys11density,
linsys13density, expectinfeas);
910 if( problem ==
NULL )
941 if( !(*problem)->ipopt->Jnlst()->AddJournal(
jrnl) )
947 (*problem)->nlp =
new ScipNLP(*problem,
scip);
949 catch(
const std::bad_alloc& )
996#if IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
1000 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"bound_relax_factor", 0.0);
1006 (
void) (*problem)->ipopt->Options()->SetStringValue(
"print_user_options",
"yes");
1008 (
void) (*problem)->ipopt->Options()->SetStringValue(
"sb",
"yes");
1009 (
void) (*problem)->ipopt->Options()->SetStringValueIfUnset(
"mu_strategy",
"adaptive");
1010 (
void) (*problem)->ipopt->Options()->SetIntegerValue(
"max_iter",
INT_MAX);
1011 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"nlp_lower_bound_inf", -
SCIPinfinity(
scip),
false);
1012 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"nlp_upper_bound_inf",
SCIPinfinity(
scip),
false);
1013 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"diverging_iterates_tol",
SCIPinfinity(
scip),
false);
1016 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"warm_start_bound_push", data->warm_start_push);
1017 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"warm_start_bound_frac", data->warm_start_push);
1018 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"warm_start_slack_bound_push", data->warm_start_push);
1019 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"warm_start_slack_bound_frac", data->warm_start_push);
1020 (
void) (*problem)->ipopt->Options()->SetNumericValue(
"warm_start_mult_bound_push", data->warm_start_push);
1026 SCIPerrorMessage(
"Error during initialization of Ipopt using optionfile \"%s\"\n", data->optfile);
1055 if( (*problem)->randnumgen !=
NULL )
1394 if( primalvalues !=
NULL )
1411 SCIPdebugMsg(
scip,
"invalidate initial guess primal values on user-request\n");
1417 if( consdualvalues !=
NULL && varlbdualvalues !=
NULL && varubdualvalues !=
NULL )
1471 if( nlpidata->print_level >=
J_SUMMARY || param.verblevel > 0 )
1479 if( param.timelimit == 0.0 )
1490#ifdef COLLECT_SOLVESTATS
1493 param.iterlimit = 1000;
1504 problem->
nlp->initializeSolve(problem, param);
1511#ifdef PROTECT_SOLVE_BY_MUTEX
1536 SCIPerrorMessage(
"Do not have expression interpreter that can compute function values and gradients. Cannot solve NLP with Ipopt.\n");
1545 (
void) problem->
ipopt->Options()->SetStringValueIfUnset(
"hessian_approximation",
"limited-memory");
1546 problem->
nlp->approxhessian =
true;
1549 problem->
nlp->approxhessian =
false;
1553 problem->
ipopt->Options()->SetStringValue(
"derivative_test", problem->
nlp->approxhessian ?
"first-order" :
"second-order");
1561 problem->
ipopt->Options()->SetStringValue(
"warm_start_same_structure", problem->
samestructure ?
"yes" :
"no");
1579#if IPOPT_VERSION_MAJOR > 3 || IPOPT_VERSION_MINOR >= 14
1597 SCIPdebugMsg(
scip,
"Ipopt failed because of an invalid number in function or derivative value\n");
1617 SCIPerrorMessage(
"Ipopt returned with application return status %d\n", status);
1626 SCIPerrorMessage(
"Ipopt returned with application return status %d\n", status);
1630#if IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
1635 problem->
lastniter = stats->IterationCount();
1636 problem->
lasttime = stats->TotalWallclockTime();
1638#ifdef COLLECT_SOLVESTATS
1648 problem->
lasttime =
ip_data->TimingStats().OverallAlgorithm().TotalWallclockTime();
1693 if( primalvalues !=
NULL )
1696 if( consdualvalues !=
NULL )
1699 if( varlbdualvalues !=
NULL )
1702 if( varubdualvalues !=
NULL )
1757 &nlpidata->warm_start_push,
FALSE, 1
e-9, 0.0, 1.0,
NULL,
NULL) );
1760 IpoptApplication::RegisterAllIpoptOptions(
reg_options);
1777 std::stringstream
descr;
1782 std::vector<RegisteredOption::string_entry>
validvals =
option->GetValidStrings();
1785 descr <<
" Valid values if not empty:";
1786 for( std::vector<RegisteredOption::string_entry>::iterator val =
validvals.begin(); val !=
validvals.end(); ++val )
1787 descr <<
' ' << val->value_;
1790#if IPOPT_VERSION_MAJOR > 3 || IPOPT_VERSION_MINOR >= 14
1823 std::stringstream
descr;
1825 descr <<
' ' << (
lower-1) <<
" to use NLPI or Ipopt default.";
1827#if IPOPT_VERSION_MAJOR > 3 || IPOPT_VERSION_MINOR >= 14
1850 return "Interior Point Optimizer developed by A. Waechter et.al. (github.com/coin-or/Ipopt)";
1866 return nlpiproblem->
oracle;
1870bool ScipNLP::get_nlp_info(
1893 if( !approxhessian )
1912bool ScipNLP::get_bounds_info(
1936 for(
int i = 0;
i < n; ++
i )
1946 for(
int i = 0;
i < n; ++
i )
1956 for(
int i = 0;
i < m; ++
i )
1967bool ScipNLP::get_starting_point(
1987 assert(nlpiproblem->solprimalvalid);
1994 assert(nlpiproblem->soldualvalid);
2003 assert(nlpiproblem->soldualvalid);
2012Index ScipNLP::get_number_of_nonlinear_variables()
2023 for(
int i = 0;
i < n; ++
i )
2031bool ScipNLP::get_list_of_nonlinear_variables(
2045 for(
int i = 0;
i < n; ++
i )
2060bool ScipNLP::get_var_con_metadata(
2077 if( varnames !=
NULL )
2081 for(
int i = 0;
i < n; ++
i )
2083 if( varnames[
i] !=
NULL )
2098 for(
int i = 0;
i < m; ++
i )
2116bool ScipNLP::eval_f(
2130 last_f_eval_x = current_x;
2136bool ScipNLP::eval_grad_f(
2155 new_x = last_f_eval_x < current_x;
2159 last_f_eval_x = current_x;
2165bool ScipNLP::eval_g(
2180 last_g_eval_x = current_x;
2189bool ScipNLP::eval_jac_g(
2206 if( values ==
NULL )
2222 for(
i = 0;
i < m; ++
i )
2235 new_x = last_g_eval_x < current_x;
2239 last_f_eval_x = current_x;
2252bool ScipNLP::eval_h(
2272 if( values ==
NULL )
2288 for(
i = 0;
i < n; ++
i )
2308 last_f_eval_x = current_x;
2309 last_g_eval_x = current_x;
2323bool ScipNLP::intermediate_callback(
2361 conv_lastrestoiter = -1;
2365 conv_lastrestoiter =
iter;
2367 else if( conv_lastrestoiter ==
iter-1 )
2389 if(
inf_pr <= conv_prtarget[
i] )
2398 else if(
iter >= conv_iterlim[
i] )
2401 SCIPdebugMsg(
scip,
"convcheck %d: inf_pr = %e > target %e; inf_du = %e target %e: ",
2408 SCIPdebugPrintf(
"continue, because restoration phase only %d iters ago\n",
iter - conv_lastrestoiter);
2413 SCIPdebugPrintf(
"continue, because dual infeas. red. sufficient and only %d iters above limit\n",
iter - conv_iterlim[
i]);
2418 if(
inf_pr <= param.feastol )
2434void ScipNLP::finalize_solution(
2478#if IPOPT_VERSION_MAJOR > 3 || IPOPT_VERSION_MINOR >= 14
2534 SCIPerrorMessage(
"Ipopt returned with unknown solution status %d\n", status);
2547 if( nlpiproblem->soldualcons ==
NULL )
2551 if( nlpiproblem->soldualvarlb ==
NULL )
2555 if( nlpiproblem->soldualvarub ==
NULL )
2559 if( nlpiproblem->soldualcons ==
NULL || nlpiproblem->soldualvarlb ==
NULL || nlpiproblem->soldualvarub ==
NULL )
2571 nlpiproblem->solprimalvalid =
true;
2572 nlpiproblem->solprimalgiven =
false;
2573 nlpiproblem->soldualvalid =
true;
2574 nlpiproblem->soldualgiven =
false;
2577#if IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
2578 nlpiproblem->solboundviol = 0.0;
2582 nlpiproblem->solconsviol = 0.0;
2587 nlpiproblem->solboundviol =
cq->unscaled_curr_orig_bounds_violation(Ipopt::NORM_MAX);
2591 nlpiproblem->solconsviol =
cq->unscaled_curr_nlp_constraint_violation(Ipopt::NORM_MAX);
2597 if(
MAX(nlpiproblem->solconsviol, nlpiproblem->solboundviol) <= param.feastol )
2603 catch(
const IpoptNLP::Eval_Error&
exc )
2605 SCIPdebugMsg(
scip,
"Eval error when checking constraint viol: %s\n",
exc.Message().c_str());
2625 (
void) nlpiproblem->ipopt->Options()->GetNumericValue(
"tol",
tol,
"");
2637 if( lambda[
i] < 0.0 )
2645 SCIPdebugMessage(
"inconsistent dual, lambda = %g, but lhs = %g\n", lambda[
i], side);
2657 SCIPdebugMessage(
"inconsistent dual, lambda = %g, but rhs = %g\n", lambda[
i], side);
2694#if IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
2702 SCIPerrorMessage(
"There was an error when calling DSYEV. INFO = %d\n", info);
2733#if IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
2741 SCIPdebugMessage(
"There was an error when calling Dgetrf. INFO = %d\n", info);
2749#if IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
2804#if IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
2812 SCIPdebugMessage(
"There was an error when calling Dgetrf. INFO = %d\n", info);
2820#if IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR < 14
#define SCIP_CALL_ABORT(x)
methods to interpret (evaluate) an expression "fast"
int SCIPgetSubscipDepth(SCIP *scip)
SCIP_EXPRINTCAPABILITY SCIPexprintGetCapability(void)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
SCIP_RETCODE SCIPincludeNlpSolverIpopt(SCIP *scip)
SCIP_RETCODE SCIPnlpiOracleEvalObjectiveValue(SCIP *scip, SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Real *objval)
SCIP_RETCODE SCIPnlpiOracleChgLinearCoefs(SCIP *scip, SCIP_NLPIORACLE *oracle, int considx, int nentries, const int *varidxs, const SCIP_Real *newcoefs)
SCIP_RETCODE SCIPnlpiOracleChgVarBounds(SCIP *scip, SCIP_NLPIORACLE *oracle, int nvars, const int *indices, const SCIP_Real *lbs, const SCIP_Real *ubs)
SCIP_RETCODE SCIPnlpiOracleAddConstraints(SCIP *scip, SCIP_NLPIORACLE *oracle, int nconss, const SCIP_Real *lhss, const SCIP_Real *rhss, const int *nlininds, int *const *lininds, SCIP_Real *const *linvals, SCIP_EXPR **exprs, const char **consnames)
SCIP_Bool SCIPnlpiOracleIsConstraintNonlinear(SCIP_NLPIORACLE *oracle, int considx)
SCIP_RETCODE SCIPnlpiOracleDelVarSet(SCIP *scip, SCIP_NLPIORACLE *oracle, int *delstats)
SCIP_RETCODE SCIPnlpiOracleEvalConstraintValues(SCIP *scip, SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Real *convals)
SCIP_RETCODE SCIPnlpiOracleCreate(SCIP *scip, SCIP_NLPIORACLE **oracle)
SCIP_RETCODE SCIPnlpiOracleGetJacobianSparsity(SCIP *scip, SCIP_NLPIORACLE *oracle, const int **offset, const int **col)
void SCIPnlpiOracleGetVarCounts(SCIP *scip, SCIP_NLPIORACLE *oracle, const int **lincounts, const int **nlcounts)
SCIP_RETCODE SCIPnlpiOracleGetHessianLagSparsity(SCIP *scip, SCIP_NLPIORACLE *oracle, const int **offset, const int **col)
char * SCIPnlpiOracleGetConstraintName(SCIP_NLPIORACLE *oracle, int considx)
SCIP_RETCODE SCIPnlpiOracleEvalObjectiveGradient(SCIP *scip, SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Bool isnewx, SCIP_Real *objval, SCIP_Real *objgrad)
SCIP_RETCODE SCIPnlpiOracleResetEvalTime(SCIP *scip, SCIP_NLPIORACLE *oracle)
SCIP_RETCODE SCIPnlpiOracleSetObjective(SCIP *scip, SCIP_NLPIORACLE *oracle, const SCIP_Real constant, int nlin, const int *lininds, const SCIP_Real *linvals, SCIP_EXPR *expr)
SCIP_Real SCIPnlpiOracleGetConstraintRhs(SCIP_NLPIORACLE *oracle, int considx)
SCIP_Real SCIPnlpiOracleGetEvalTime(SCIP *scip, SCIP_NLPIORACLE *oracle)
SCIP_RETCODE SCIPnlpiOracleChgConsSides(SCIP *scip, SCIP_NLPIORACLE *oracle, int nconss, const int *indices, const SCIP_Real *lhss, const SCIP_Real *rhss)
SCIP_Real SCIPnlpiOracleGetConstraintLhs(SCIP_NLPIORACLE *oracle, int considx)
SCIP_RETCODE SCIPnlpiOracleAddVars(SCIP *scip, SCIP_NLPIORACLE *oracle, int nvars, const SCIP_Real *lbs, const SCIP_Real *ubs, const char **varnames)
int SCIPnlpiOracleGetNVars(SCIP_NLPIORACLE *oracle)
int SCIPnlpiOracleGetNConstraints(SCIP_NLPIORACLE *oracle)
SCIP_EXPRINTCAPABILITY SCIPnlpiOracleGetEvalCapability(SCIP *scip, SCIP_NLPIORACLE *oracle)
SCIP_Real SCIPnlpiOracleGetObjectiveConstant(SCIP_NLPIORACLE *oracle)
SCIP_RETCODE SCIPnlpiOracleEvalHessianLag(SCIP *scip, SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Bool isnewx_obj, SCIP_Bool isnewx_cons, SCIP_Real objfactor, const SCIP_Real *lambda, SCIP_Real *hessian)
SCIP_Bool SCIPnlpiOracleIsVarNonlinear(SCIP *scip, SCIP_NLPIORACLE *oracle, int varidx)
SCIP_RETCODE SCIPnlpiOracleEvalJacobian(SCIP *scip, SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Bool isnewx, SCIP_Real *convals, SCIP_Real *jacobi)
SCIP_RETCODE SCIPnlpiOracleDelConsSet(SCIP *scip, SCIP_NLPIORACLE *oracle, int *delstats)
SCIP_RETCODE SCIPnlpiOracleSetProblemName(SCIP *scip, SCIP_NLPIORACLE *oracle, const char *name)
SCIP_RETCODE SCIPnlpiOracleChgObjConstant(SCIP *scip, SCIP_NLPIORACLE *oracle, SCIP_Real objconstant)
char ** SCIPnlpiOracleGetVarNames(SCIP_NLPIORACLE *oracle)
const SCIP_Real * SCIPnlpiOracleGetVarLbs(SCIP_NLPIORACLE *oracle)
const SCIP_Real * SCIPnlpiOracleGetVarUbs(SCIP_NLPIORACLE *oracle)
SCIP_RETCODE SCIPnlpiOracleFree(SCIP *scip, SCIP_NLPIORACLE **oracle)
const char * SCIPnlpiOracleGetProblemName(SCIP_NLPIORACLE *oracle)
SCIP_RETCODE SCIPnlpiOracleChgExpr(SCIP *scip, SCIP_NLPIORACLE *oracle, int considx, SCIP_EXPR *expr)
const char * SCIPgetSolverNameIpopt(void)
SCIP_RETCODE SCIPcallLapackDsyevIpopt(SCIP_Bool computeeigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
SCIP_RETCODE SCIPsolveLinearEquationsIpopt(int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
void * SCIPgetNlpiOracleIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
SCIP_Bool SCIPisIpoptAvailableIpopt(void)
const char * SCIPgetSolverDescIpopt(void)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_PARAM * SCIPgetParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPaddStringParam(SCIP *scip, const char *name, const char *desc, char **valueptr, SCIP_Bool isadvanced, const char *defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
SCIP_RETCODE SCIPincludeNlpi(SCIP *scip, const char *name, const char *description, int priority, SCIP_DECL_NLPICOPY((*nlpicopy)), SCIP_DECL_NLPIFREE((*nlpifree)), SCIP_DECL_NLPIGETSOLVERPOINTER((*nlpigetsolverpointer)), SCIP_DECL_NLPICREATEPROBLEM((*nlpicreateproblem)), SCIP_DECL_NLPIFREEPROBLEM((*nlpifreeproblem)), SCIP_DECL_NLPIGETPROBLEMPOINTER((*nlpigetproblempointer)), SCIP_DECL_NLPIADDVARS((*nlpiaddvars)), SCIP_DECL_NLPIADDCONSTRAINTS((*nlpiaddconstraints)), SCIP_DECL_NLPISETOBJECTIVE((*nlpisetobjective)), SCIP_DECL_NLPICHGVARBOUNDS((*nlpichgvarbounds)), SCIP_DECL_NLPICHGCONSSIDES((*nlpichgconssides)), SCIP_DECL_NLPIDELVARSET((*nlpidelvarset)), SCIP_DECL_NLPIDELCONSSET((*nlpidelconsset)), SCIP_DECL_NLPICHGLINEARCOEFS((*nlpichglinearcoefs)), SCIP_DECL_NLPICHGEXPR((*nlpichgexpr)), SCIP_DECL_NLPICHGOBJCONSTANT((*nlpichgobjconstant)), SCIP_DECL_NLPISETINITIALGUESS((*nlpisetinitialguess)), SCIP_DECL_NLPISOLVE((*nlpisolve)), SCIP_DECL_NLPIGETSOLSTAT((*nlpigetsolstat)), SCIP_DECL_NLPIGETTERMSTAT((*nlpigettermstat)), SCIP_DECL_NLPIGETSOLUTION((*nlpigetsolution)), SCIP_DECL_NLPIGETSTATISTICS((*nlpigetstatistics)), SCIP_NLPIDATA *nlpidata)
SCIP_NLPIDATA * SCIPnlpiGetData(SCIP_NLPI *nlpi)
SCIP_Bool SCIPisSolveInterrupted(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeRandom(scip, &heurdata->randnumgen)
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
static const char * paramname[]
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMScopyMemoryArray(ptr, source, num)
void SCIPmessageVPrintError(const char *formatstr, va_list ap)
void SCIPmessageVPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
void SCIPmessagePrintErrorHeader(const char *sourcefile, int sourceline)
static const SCIP_Real convcheck_minred[convcheck_nchecks]
static const char * ipopt_int_params[]
integer parameters of Ipopt to make available via SCIP parameters
static const int convcheck_startiter
static const int convcheck_nchecks
static SCIP_RETCODE solveLinearProb3(SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
static SCIP_RETCODE handleNlpParam(SCIP *scip, SCIP_NLPIDATA *nlpidata, SCIP_NLPIPROBLEM *nlpiproblem, const SCIP_NLPPARAM param)
pass NLP solve parameters to Ipopt
static const char * ipopt_string_params[]
string parameters of Ipopt to make available via SCIP parameters
static SCIP_RETCODE ensureStartingPoint(SCIP *scip, SCIP_NLPIPROBLEM *problem, SCIP_Bool &warmstart)
static const int convcheck_maxiter[convcheck_nchecks]
static void invalidateSolved(SCIP_NLPIPROBLEM *problem)
static void invalidateSolution(SCIP_NLPIPROBLEM *problem)
methods to store an NLP and request function, gradient, and Hessian values
char * SCIPparamGetString(SCIP_PARAM *param)
int SCIPparamGetInt(SCIP_PARAM *param)
int SCIPparamGetIntDefault(SCIP_PARAM *param)
public data structures and miscellaneous methods
public methods for handling parameter settings
public methods for problem copies
public methods for memory management
public methods for message handling
public methods for NLPI solver interfaces
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for random numbers
SCIP_NLPPARAM_FASTFAIL fastfail
SmartPtr< IpoptApplication > ipopt
SCIP_RANDNUMGEN * randnumgen
SCIP_NLPTERMSTAT termstat
#define SCIP_EXPRINTCAPABILITY_GRADIENT
#define SCIP_EXPRINTCAPABILITY_HESSIAN
#define SCIP_EXPRINTCAPABILITY_FUNCVALUE
unsigned int SCIP_EXPRINTCAPABILITY
#define SCIP_DECL_NLPISOLVE(x)
#define SCIP_DECL_NLPICHGLINEARCOEFS(x)
#define SCIP_DECL_NLPICHGOBJCONSTANT(x)
#define SCIP_NLPPARAM_PRINT(param)
#define SCIP_DECL_NLPIGETSOLUTION(x)
#define SCIP_DECL_NLPISETOBJECTIVE(x)
#define SCIP_DECL_NLPICREATEPROBLEM(x)
#define SCIP_DECL_NLPIGETSTATISTICS(x)
#define SCIP_DECL_NLPIDELCONSSET(x)
#define SCIP_DECL_NLPICHGCONSSIDES(x)
#define SCIP_DECL_NLPIDELVARSET(x)
#define SCIP_DECL_NLPICHGEXPR(x)
#define SCIP_DECL_NLPIADDVARS(x)
@ SCIP_NLPPARAM_FASTFAIL_OFF
@ SCIP_NLPPARAM_FASTFAIL_AGGRESSIVE
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
#define SCIP_DECL_NLPISETINITIALGUESS(x)
#define SCIP_DECL_NLPIFREEPROBLEM(x)
@ SCIP_NLPTERMSTAT_TIMELIMIT
@ SCIP_NLPTERMSTAT_NUMERICERROR
@ SCIP_NLPTERMSTAT_EVALERROR
@ SCIP_NLPTERMSTAT_LOBJLIMIT
@ SCIP_NLPTERMSTAT_ITERLIMIT
@ SCIP_NLPTERMSTAT_OUTOFMEMORY
@ SCIP_NLPTERMSTAT_INTERRUPT
#define SCIP_DECL_NLPICOPY(x)
#define SCIP_DECL_NLPIGETSOLVERPOINTER(x)
#define SCIP_DECL_NLPIGETSOLSTAT(x)
#define SCIP_DECL_NLPICHGVARBOUNDS(x)
#define SCIP_DECL_NLPIGETPROBLEMPOINTER(x)
#define SCIP_DECL_NLPIFREE(x)
#define SCIP_DECL_NLPIADDCONSTRAINTS(x)
@ SCIP_NLPSOLSTAT_UNBOUNDED
@ SCIP_NLPSOLSTAT_LOCINFEASIBLE
@ SCIP_NLPSOLSTAT_FEASIBLE
@ SCIP_NLPSOLSTAT_UNKNOWN
#define SCIP_DECL_NLPIGETTERMSTAT(x)
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
struct SCIP_NlpiData SCIP_NLPIDATA
enum SCIP_Retcode SCIP_RETCODE