Scippy

SCIP

Solving Constraint Integer Programs

nlpi_ipopt.cpp File Reference

Detailed Description

Ipopt NLP interface.

Author
Stefan Vigerske

This file can only be compiled if Ipopt is available. Otherwise, to resolve public functions, use nlpi_ipopt_dummy.c. Since the dummy code is C instead of C++, it has been moved into a separate file.

Definition in file nlpi_ipopt.cpp.

#include "nlpi/nlpi_ipopt.h"
#include "nlpi/nlpi.h"
#include "nlpi/nlpioracle.h"
#include "nlpi/exprinterpret.h"
#include "scip/interrupt.h"
#include "scip/pub_misc.h"
#include <new>
#include <sstream>
#include "IpoptConfig.h"
#include "IpIpoptApplication.hpp"
#include "IpIpoptCalculatedQuantities.hpp"
#include "IpSolveStatistics.hpp"
#include "IpJournalist.hpp"
#include "IpIpoptData.hpp"
#include "IpTNLPAdapter.hpp"
#include "IpOrigIpoptNLP.hpp"
#include "IpLapack.hpp"

Go to the source code of this file.

Macros

#define NLPI_NAME   "ipopt"
 
#define NLPI_DESC   "Ipopt interface"
 
#define NLPI_PRIORITY   0
 
#define DEFAULT_PRINTLEVEL   J_STRONGWARNING
 
#define DEFAULT_MAXITER   3000
 
#define MAXPERTURB   0.01
 
#define FEASTOLFACTOR   0.05
 

Functions

static void invalidateSolution (SCIP_NLPIPROBLEM *problem)
 
static void setFeastol (SCIP_NLPIPROBLEM *nlpiproblem, SCIP_Real feastol)
 
static SCIP_DECL_NLPICOPY (nlpiCopyIpopt)
 
static SCIP_DECL_NLPIFREE (nlpiFreeIpopt)
 
static SCIP_DECL_NLPIGETSOLVERPOINTER (nlpiGetSolverPointerIpopt)
 
static SCIP_DECL_NLPICREATEPROBLEM (nlpiCreateProblemIpopt)
 
static SCIP_DECL_NLPIFREEPROBLEM (nlpiFreeProblemIpopt)
 
 SCIP_DECL_NLPIGETPROBLEMPOINTER (nlpiGetProblemPointerIpopt)
 
static SCIP_DECL_NLPIADDVARS (nlpiAddVarsIpopt)
 
static SCIP_DECL_NLPIADDCONSTRAINTS (nlpiAddConstraintsIpopt)
 
static SCIP_DECL_NLPISETOBJECTIVE (nlpiSetObjectiveIpopt)
 
static SCIP_DECL_NLPICHGVARBOUNDS (nlpiChgVarBoundsIpopt)
 
static SCIP_DECL_NLPICHGCONSSIDES (nlpiChgConsSidesIpopt)
 
static SCIP_DECL_NLPIDELVARSET (nlpiDelVarSetIpopt)
 
static SCIP_DECL_NLPIDELCONSSET (nlpiDelConstraintSetIpopt)
 
static SCIP_DECL_NLPICHGLINEARCOEFS (nlpiChgLinearCoefsIpopt)
 
static SCIP_DECL_NLPICHGQUADCOEFS (nlpiChgQuadraticCoefsIpopt)
 
static SCIP_DECL_NLPICHGEXPRTREE (nlpiChgExprtreeIpopt)
 
static SCIP_DECL_NLPICHGNONLINCOEF (nlpiChgNonlinCoefIpopt)
 
static SCIP_DECL_NLPICHGOBJCONSTANT (nlpiChgObjConstantIpopt)
 
static SCIP_DECL_NLPISETINITIALGUESS (nlpiSetInitialGuessIpopt)
 
static SCIP_DECL_NLPISOLVE (nlpiSolveIpopt)
 
static SCIP_DECL_NLPIGETSOLSTAT (nlpiGetSolstatIpopt)
 
static SCIP_DECL_NLPIGETTERMSTAT (nlpiGetTermstatIpopt)
 
static SCIP_DECL_NLPIGETSOLUTION (nlpiGetSolutionIpopt)
 
static SCIP_DECL_NLPIGETSTATISTICS (nlpiGetStatisticsIpopt)
 
static SCIP_DECL_NLPIGETWARMSTARTSIZE (nlpiGetWarmstartSizeIpopt)
 
static SCIP_DECL_NLPIGETWARMSTARTMEMO (nlpiGetWarmstartMemoIpopt)
 
static SCIP_DECL_NLPISETWARMSTARTMEMO (nlpiSetWarmstartMemoIpopt)
 
static SCIP_DECL_NLPIGETINTPAR (nlpiGetIntParIpopt)
 
static SCIP_DECL_NLPISETINTPAR (nlpiSetIntParIpopt)
 
static SCIP_DECL_NLPIGETREALPAR (nlpiGetRealParIpopt)
 
static SCIP_DECL_NLPISETREALPAR (nlpiSetRealParIpopt)
 
static SCIP_DECL_NLPIGETSTRINGPAR (nlpiGetStringParIpopt)
 
static SCIP_DECL_NLPISETSTRINGPAR (nlpiSetStringParIpopt)
 
static SCIP_DECL_NLPISETMESSAGEHDLR (nlpiSetMessageHdlrIpopt)
 
SCIP_RETCODE SCIPcreateNlpSolverIpopt (BMS_BLKMEM *blkmem, SCIP_NLPI **nlpi)
 
const char * SCIPgetSolverNameIpopt (void)
 
const char * SCIPgetSolverDescIpopt (void)
 
SCIP_Bool SCIPisIpoptAvailableIpopt (void)
 
void * SCIPgetIpoptApplicationPointerIpopt (SCIP_NLPIPROBLEM *nlpiproblem)
 
void * SCIPgetNlpiOracleIpopt (SCIP_NLPIPROBLEM *nlpiproblem)
 
void SCIPsetModifiedDefaultSettingsIpopt (SCIP_NLPI *nlpi, const char *optionsstring)
 
SCIP_RETCODE LapackDsyev (SCIP_Bool computeeigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
 

Variables

static const int convcheck_nchecks = 3
 
static const int convcheck_startiter = 10
 
static const int convcheck_maxiter [convcheck_nchecks] = { 5, 15, 30 }
 
static const SCIP_Real convcheck_minred [convcheck_nchecks] = { 1.0, 0.5, 0.1 }
 

Macro Definition Documentation

#define NLPI_NAME   "ipopt"

short concise name of solver

Definition at line 59 of file nlpi_ipopt.cpp.

Referenced by SCIPcreateNlpSolverIpopt().

#define NLPI_DESC   "Ipopt interface"

description of solver

Definition at line 60 of file nlpi_ipopt.cpp.

Referenced by SCIPcreateNlpSolverIpopt().

#define NLPI_PRIORITY   0

priority

Definition at line 61 of file nlpi_ipopt.cpp.

Referenced by SCIPcreateNlpSolverIpopt().

#define DEFAULT_PRINTLEVEL   J_STRONGWARNING

default print level of Ipopt

Definition at line 66 of file nlpi_ipopt.cpp.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

#define DEFAULT_MAXITER   3000

default iteration limit for Ipopt

Definition at line 68 of file nlpi_ipopt.cpp.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

#define MAXPERTURB   0.01

maximal perturbation of bounds in starting point heuristic

Definition at line 70 of file nlpi_ipopt.cpp.

#define FEASTOLFACTOR   0.05

factor for user-given feasibility tolerance to get feasibility tolerance that is actually passed to Ipopt

Definition at line 71 of file nlpi_ipopt.cpp.

Referenced by setFeastol().

Function Documentation

static void setFeastol ( SCIP_NLPIPROBLEM nlpiproblem,
SCIP_Real  feastol 
)
static

sets feasibility tolerance parameters in Ipopt

Sets tol and constr_viol_tol to FEASTOLFACTOR*feastol and acceptable_tol and acceptable_viol_tol to feastol. Since the users and Ipopts conception of feasibility may differ, we let Ipopt try to compute solutions that are more accurate (w.r.t. constraint violation) than requested by the user. Only if Ipopt has problems to achieve this accuracy, we also accept solutions that are accurate w.r.t. feastol only. The additional effort for computing a more accurate solution should be small if one can assume fast convergence when close to a local minimizer.

Definition at line 435 of file nlpi_ipopt.cpp.

References FEASTOLFACTOR, and SCIP_NlpiProblem::ipopt.

Referenced by SCIP_DECL_NLPICREATEPROBLEM(), and SCIP_DECL_NLPISETREALPAR().

static SCIP_DECL_NLPICOPY ( nlpiCopyIpopt  )
static

copy method of NLP interface (called when SCIP copies plugins)

input:

  • blkmem block memory of target SCIP
  • sourcenlpi the NLP interface to copy
  • targetnlpi buffer to store pointer to copy of NLP interface

Definition at line 462 of file nlpi_ipopt.cpp.

References NULL, SCIP_CALL, SCIP_NLPPAR_INFINITY, SCIP_OKAY, SCIPcreateNlpSolverIpopt(), SCIPnlpiGetData(), SCIPnlpiSetMessageHdlr(), and SCIPnlpiSetRealPar().

static SCIP_DECL_NLPIFREE ( nlpiFreeIpopt  )
static

destructor of NLP interface to free nlpi data

input:

  • nlpi datastructure for solver interface

Definition at line 493 of file nlpi_ipopt.cpp.

References NULL, SCIP_OKAY, and SCIPnlpiGetData().

static SCIP_DECL_NLPIGETSOLVERPOINTER ( nlpiGetSolverPointerIpopt  )
static

gets pointer for NLP solver

to do dirty stuff

input:

  • nlpi datastructure for solver interface

return: void pointer to solver

Definition at line 517 of file nlpi_ipopt.cpp.

References NULL.

static SCIP_DECL_NLPICREATEPROBLEM ( nlpiCreateProblemIpopt  )
static

creates a problem instance

input:

  • nlpi datastructure for solver interface
  • problem pointer to store the problem data
  • name name of problem, can be NULL

Definition at line 532 of file nlpi_ipopt.cpp.

References DEFAULT_MAXITER, DEFAULT_PRINTLEVEL, NULL, SCIP_CALL, SCIP_DEFAULT_FEASTOL, SCIP_ERROR, SCIP_NOMEMORY, SCIP_OKAY, SCIPerrorMessage, SCIPnlpiGetData(), SCIPnlpiOracleCreate(), SCIPnlpiOracleSetInfinity(), SCIPnlpiOracleSetProblemName(), and setFeastol().

static SCIP_DECL_NLPIFREEPROBLEM ( nlpiFreeProblemIpopt  )
static

free a problem instance

input:

  • nlpi datastructure for solver interface
  • problem pointer where problem data is stored

Definition at line 625 of file nlpi_ipopt.cpp.

References BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleFree().

SCIP_DECL_NLPIGETPROBLEMPOINTER ( nlpiGetProblemPointerIpopt  )

gets pointer to solver-internal problem instance

to do dirty stuff

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance

return: void pointer to problem instance

Definition at line 658 of file nlpi_ipopt.cpp.

References NULL.

static SCIP_DECL_NLPIADDVARS ( nlpiAddVarsIpopt  )
static

add variables

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • nvars number of variables
  • lbs lower bounds of variables, can be NULL if -infinity
  • ubs upper bounds of variables, can be NULL if +infinity
  • varnames names of variables, can be NULL

Definition at line 677 of file nlpi_ipopt.cpp.

References BMSfreeMemoryArrayNull, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleAddVars(), and TRUE.

static SCIP_DECL_NLPIADDCONSTRAINTS ( nlpiAddConstraintsIpopt  )
static

add constraints quadratic coefficiens: row oriented matrix for each constraint

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • ncons number of added constraints
  • lhss left hand sides of constraints
  • rhss right hand sides of constraints
  • linoffsets start index of each constraints linear coefficients in lininds and linvals length: ncons + 1, linoffsets[ncons] gives length of lininds and linvals may be NULL in case of no linear part
  • lininds variable indices may be NULL in case of no linear part
  • linvals coefficient values may be NULL in case of no linear part
  • nquadelems number of quadratic elements for each constraint may be NULL in case of no quadratic part
  • quadelems quadratic elements for each constraint may be NULL in case of no quadratic part
  • exprvaridxs indices of variables in expression tree, maps variable indices in expression tree to indices in nlp entry of array may be NULL in case of no expression tree may be NULL in case of no expression tree in any constraint
  • exprtrees expression tree for nonquadratic part of constraints entry of array may be NULL in case of no nonquadratic part may be NULL in case of no nonquadratic part in any constraint
  • names of constraints, may be NULL or entries may be NULL

Definition at line 721 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleAddConstraints(), and TRUE.

static SCIP_DECL_NLPISETOBJECTIVE ( nlpiSetObjectiveIpopt  )
static

sets or overwrites objective, a minimization problem is expected May change sparsity pattern.

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • nlins number of linear variables
  • lininds variable indices may be NULL in case of no linear part
  • linvals coefficient values may be NULL in case of no linear part
  • nquadelems number of elements in matrix of quadratic part
  • quadelems elements of quadratic part may be NULL in case of no quadratic part
  • exprvaridxs indices of variables in expression tree, maps variable indices in expression tree to indices in nlp may be NULL in case of no expression tree
  • exprtree expression tree for nonquadratic part of objective function may be NULL in case of no nonquadratic part
  • constant objective value offset

Definition at line 760 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleSetObjective(), and TRUE.

static SCIP_DECL_NLPICHGVARBOUNDS ( nlpiChgVarBoundsIpopt  )
static

change variable bounds

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • nvars number of variables to change bounds
  • indices indices of variables to change bounds
  • lbs new lower bounds
  • ubs new upper bounds

Definition at line 788 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgVarBounds().

static SCIP_DECL_NLPICHGCONSSIDES ( nlpiChgConsSidesIpopt  )
static

change constraint bounds

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • nconss number of constraints to change sides
  • indices indices of constraints to change sides
  • lhss new left hand sides
  • rhss new right hand sides

Definition at line 812 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgConsSides().

static SCIP_DECL_NLPIDELVARSET ( nlpiDelVarSetIpopt  )
static

delete a set of variables

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • nlpi datastructure for solver interface
  • dstats deletion status of vars; 1 if var should be deleted, 0 if not

output:

  • dstats new position of var, -1 if var was deleted

Definition at line 837 of file nlpi_ipopt.cpp.

References BMSfreeMemoryArrayNull, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleDelVarSet(), and TRUE.

static SCIP_DECL_NLPIDELCONSSET ( nlpiDelConstraintSetIpopt  )
static

delete a set of constraints

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • dstats deletion status of rows; 1 if row should be deleted, 0 if not

output:

  • dstats new position of row, -1 if row was deleted

Definition at line 864 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleDelConsSet(), and TRUE.

static SCIP_DECL_NLPICHGLINEARCOEFS ( nlpiChgLinearCoefsIpopt  )
static

change one linear coefficient in a constraint or objective

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • idx index of constraint or -1 for objective
  • nvals number of values in linear constraint
  • varidxs indices of variable
  • vals new values for coefficient

return: Error if coefficient did not exist before

Definition at line 892 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgLinearCoefs().

static SCIP_DECL_NLPICHGQUADCOEFS ( nlpiChgQuadraticCoefsIpopt  )
static

change one coefficient in the quadratic part of a constraint or objective

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • idx index of constraint or -1 for objective
  • nquadelems number of entries in quadratic matrix to change
  • quadelems new elements in quadratic matrix (replacing already existing ones or adding new ones)

return: Error if coefficient did not exist before

Definition at line 916 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgQuadCoefs().

static SCIP_DECL_NLPICHGEXPRTREE ( nlpiChgExprtreeIpopt  )
static

replaces the expression tree of a constraint or objective

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • idxcons index of constraint or -1 for objective
  • exprtree new expression tree for constraint or objective, or NULL to only remove previous tree

Definition at line 937 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgExprtree().

static SCIP_DECL_NLPICHGNONLINCOEF ( nlpiChgNonlinCoefIpopt  )
static

change the value of one parameter in the nonlinear part

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • idxcons index of constraint or -1 for objective
  • idxparam index of parameter
  • value new value for nonlinear parameter

return: Error if parameter does not exist

Definition at line 961 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgExprParam().

static SCIP_DECL_NLPICHGOBJCONSTANT ( nlpiChgObjConstantIpopt  )
static

change the constant offset in the objective

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • objconstant new value for objective constant

Definition at line 981 of file nlpi_ipopt.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgObjConstant().

static SCIP_DECL_NLPISETINITIALGUESS ( nlpiSetInitialGuessIpopt  )
static

sets initial guess for primal variables

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • primalvalues initial primal values for variables, or NULL to clear previous values
  • consdualvalues initial dual values for constraints, or NULL to clear previous values
  • varlbdualvalues initial dual values for variable lower bounds, or NULL to clear previous values
  • varubdualvalues initial dual values for variable upper bounds, or NULL to clear previous values

Definition at line 1003 of file nlpi_ipopt.cpp.

References BMScopyMemoryArray, BMSduplicateMemoryArray, BMSfreeMemoryArrayNull, NULL, SCIP_NOMEMORY, SCIP_OKAY, and SCIPnlpiOracleGetNVars().

static SCIP_DECL_NLPISOLVE ( nlpiSolveIpopt  )
static
static SCIP_DECL_NLPIGETSOLSTAT ( nlpiGetSolstatIpopt  )
static

gives solution status

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance

return: Solution Status

Definition at line 1144 of file nlpi_ipopt.cpp.

References NULL.

static SCIP_DECL_NLPIGETTERMSTAT ( nlpiGetTermstatIpopt  )
static

gives termination reason

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance

return: Termination Status

Definition at line 1161 of file nlpi_ipopt.cpp.

References NULL.

static SCIP_DECL_NLPIGETSOLUTION ( nlpiGetSolutionIpopt  )
static

gives primal and dual solution values

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • primalvalues buffer to store pointer to array to primal values, or NULL if not needed
  • consdualvalues buffer to store pointer to array to dual values of constraints, or NULL if not needed
  • varlbdualvalues buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed
  • varubdualvalues buffer to store pointer to array to dual values of variable lower bounds, or NULL if not needed

Definition at line 1180 of file nlpi_ipopt.cpp.

References NULL, and SCIP_OKAY.

static SCIP_DECL_NLPIGETSTATISTICS ( nlpiGetStatisticsIpopt  )
static

gives solve statistics

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • statistics pointer to store statistics

output:

  • statistics solve statistics

Definition at line 1211 of file nlpi_ipopt.cpp.

References NULL, SCIP_OKAY, SCIPnlpStatisticsSetNIterations(), and SCIPnlpStatisticsSetTotalTime().

static SCIP_DECL_NLPIGETWARMSTARTSIZE ( nlpiGetWarmstartSizeIpopt  )
static

gives required size of a buffer to store a warmstart object

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • size pointer to store required size for warmstart buffer

output:

  • size required size for warmstart buffer

Definition at line 1233 of file nlpi_ipopt.cpp.

References SCIP_ERROR, and SCIPerrorMessage.

static SCIP_DECL_NLPIGETWARMSTARTMEMO ( nlpiGetWarmstartMemoIpopt  )
static

stores warmstart information in buffer

required size of buffer should have been obtained by SCIPnlpiGetWarmstartSize before

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • buffer memory to store warmstart information

output:

  • buffer warmstart information in solver specific data structure

Definition at line 1252 of file nlpi_ipopt.cpp.

References SCIP_ERROR, and SCIPerrorMessage.

static SCIP_DECL_NLPISETWARMSTARTMEMO ( nlpiSetWarmstartMemoIpopt  )
static

sets warmstart information in solver

write warmstart to buffer

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • buffer warmstart information

Definition at line 1268 of file nlpi_ipopt.cpp.

References SCIP_OKAY, SCIPABORT, and SCIPerrorMessage.

static SCIP_DECL_NLPIGETINTPAR ( nlpiGetIntParIpopt  )
static

gets integer parameter of NLP

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • type parameter number
  • ival pointer to store the parameter value

output:

  • ival parameter value

Definition at line 1287 of file nlpi_ipopt.cpp.

References NULL, SCIP_NLPPAR_FASTFAIL, SCIP_NLPPAR_FEASTOL, SCIP_NLPPAR_FROMSCRATCH, SCIP_NLPPAR_INFINITY, SCIP_NLPPAR_ITLIM, SCIP_NLPPAR_LOBJLIM, SCIP_NLPPAR_OPTFILE, SCIP_NLPPAR_RELOBJTOL, SCIP_NLPPAR_TILIM, SCIP_NLPPAR_VERBLEVEL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_PARAMETERWRONGTYPE, and SCIPerrorMessage.

static SCIP_DECL_NLPISETINTPAR ( nlpiSetIntParIpopt  )
static

sets integer parameter of NLP

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • type parameter number
  • ival parameter value

Definition at line 1383 of file nlpi_ipopt.cpp.

References MIN, NULL, SCIP_NLPPAR_FASTFAIL, SCIP_NLPPAR_FEASTOL, SCIP_NLPPAR_FROMSCRATCH, SCIP_NLPPAR_INFINITY, SCIP_NLPPAR_ITLIM, SCIP_NLPPAR_LOBJLIM, SCIP_NLPPAR_OPTFILE, SCIP_NLPPAR_RELOBJTOL, SCIP_NLPPAR_TILIM, SCIP_NLPPAR_VERBLEVEL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_PARAMETERWRONGTYPE, SCIP_PARAMETERWRONGVAL, SCIPerrorMessage, SCIPmessagePrintWarning(), and SCIPnlpiGetData().

static SCIP_DECL_NLPIGETREALPAR ( nlpiGetRealParIpopt  )
static

gets floating point parameter of NLP

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance, can be NULL only if type == SCIP_NLPPAR_INFINITY
  • type parameter number
  • dval pointer to store the parameter value

output:

  • dval parameter value

Definition at line 1525 of file nlpi_ipopt.cpp.

References NULL, SCIP_NLPPAR_FASTFAIL, SCIP_NLPPAR_FEASTOL, SCIP_NLPPAR_FROMSCRATCH, SCIP_NLPPAR_INFINITY, SCIP_NLPPAR_ITLIM, SCIP_NLPPAR_LOBJLIM, SCIP_NLPPAR_OPTFILE, SCIP_NLPPAR_RELOBJTOL, SCIP_NLPPAR_TILIM, SCIP_NLPPAR_VERBLEVEL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_PARAMETERWRONGTYPE, SCIPerrorMessage, SCIPnlpiGetData(), and SCIPnlpiOracleGetInfinity().

static SCIP_DECL_NLPISETREALPAR ( nlpiSetRealParIpopt  )
static

sets floating point parameter of NLP

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance, can be NULL only if type == SCIP_NLPPAR_INFINITY
  • type parameter number
  • dval parameter value

Definition at line 1622 of file nlpi_ipopt.cpp.

References NULL, SCIP_NLPPAR_FASTFAIL, SCIP_NLPPAR_FEASTOL, SCIP_NLPPAR_FROMSCRATCH, SCIP_NLPPAR_INFINITY, SCIP_NLPPAR_ITLIM, SCIP_NLPPAR_LOBJLIM, SCIP_NLPPAR_OPTFILE, SCIP_NLPPAR_RELOBJTOL, SCIP_NLPPAR_TILIM, SCIP_NLPPAR_VERBLEVEL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_PARAMETERWRONGTYPE, SCIP_PARAMETERWRONGVAL, SCIPerrorMessage, SCIPmessagePrintWarning(), SCIPnlpiGetData(), SCIPnlpiOracleSetInfinity(), and setFeastol().

static SCIP_DECL_NLPIGETSTRINGPAR ( nlpiGetStringParIpopt  )
static

gets string parameter of NLP

input:

  • nlpi NLP interface structure
  • problem datastructure for problem instance
  • type parameter number
  • sval pointer to store the string value, the user must not modify the string

output:

  • sval parameter value

Definition at line 1755 of file nlpi_ipopt.cpp.

References NULL, SCIP_NLPPAR_FASTFAIL, SCIP_NLPPAR_FEASTOL, SCIP_NLPPAR_FROMSCRATCH, SCIP_NLPPAR_INFINITY, SCIP_NLPPAR_ITLIM, SCIP_NLPPAR_LOBJLIM, SCIP_NLPPAR_OPTFILE, SCIP_NLPPAR_RELOBJTOL, SCIP_NLPPAR_TILIM, SCIP_NLPPAR_VERBLEVEL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_PARAMETERWRONGTYPE, and SCIPerrorMessage.

static SCIP_DECL_NLPISETSTRINGPAR ( nlpiSetStringParIpopt  )
static

sets string parameter of NLP

input:

  • nlpi NLP interface structure
  • problem datastructure for problem instance
  • type parameter number
  • sval parameter value

Definition at line 1844 of file nlpi_ipopt.cpp.

References NULL, SCIP_ERROR, SCIP_NLPPAR_FASTFAIL, SCIP_NLPPAR_FEASTOL, SCIP_NLPPAR_FROMSCRATCH, SCIP_NLPPAR_INFINITY, SCIP_NLPPAR_ITLIM, SCIP_NLPPAR_LOBJLIM, SCIP_NLPPAR_OPTFILE, SCIP_NLPPAR_RELOBJTOL, SCIP_NLPPAR_TILIM, SCIP_NLPPAR_VERBLEVEL, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_PARAMETERWRONGTYPE, SCIPerrorMessage, and TRUE.

static SCIP_DECL_NLPISETMESSAGEHDLR ( nlpiSetMessageHdlrIpopt  )
static

sets message handler for message output

input:

  • nlpi NLP interface structure
  • messagehdlr SCIP message handler, or NULL to suppress all output

Definition at line 1940 of file nlpi_ipopt.cpp.

References NULL, SCIP_OKAY, and SCIPnlpiGetData().

SCIP_RETCODE SCIPcreateNlpSolverIpopt ( BMS_BLKMEM blkmem,
SCIP_NLPI **  nlpi 
)

create solver interface for Ipopt solver

Parameters
blkmemblock memory data structure
nlpipointer to buffer for nlpi address

Definition at line 1955 of file nlpi_ipopt.cpp.

Referenced by SCIP_DECL_NLPICOPY(), and SCIPincludeDefaultPlugins().

const char* SCIPgetSolverNameIpopt ( void  )

gets string that identifies Ipopt (version number)

Definition at line 1985 of file nlpi_ipopt.cpp.

Referenced by SCIPincludeDefaultPlugins().

const char* SCIPgetSolverDescIpopt ( void  )

gets string that describes Ipopt (version number)

Definition at line 1991 of file nlpi_ipopt.cpp.

Referenced by SCIPincludeDefaultPlugins().

SCIP_Bool SCIPisIpoptAvailableIpopt ( void  )

returns whether Ipopt is available, i.e., whether it has been linked in

Definition at line 1997 of file nlpi_ipopt.cpp.

Referenced by checkCurvature(), checkFactorable(), and SCIP_DECL_CONSINITSOL().

void* SCIPgetIpoptApplicationPointerIpopt ( SCIP_NLPIPROBLEM nlpiproblem)

gives a pointer to the IpoptApplication object stored in Ipopt-NLPI's NLPI problem data structure

Parameters
nlpiproblemNLP problem of Ipopt-NLPI

Definition at line 2003 of file nlpi_ipopt.cpp.

void* SCIPgetNlpiOracleIpopt ( SCIP_NLPIPROBLEM nlpiproblem)

gives a pointer to the NLPIORACLE object stored in Ipopt-NLPI's NLPI problem data structure

Parameters
nlpiproblemNLP problem of Ipopt-NLPI

Definition at line 2013 of file nlpi_ipopt.cpp.

void SCIPsetModifiedDefaultSettingsIpopt ( SCIP_NLPI nlpi,
const char *  optionsstring 
)

sets modified default settings that are used when setting up an Ipopt problem

Do not forget to add a newline after the last option in optionsstring.

Parameters
nlpiIpopt NLP interface
optionsstringstring with options as in Ipopt options file

Definition at line 2026 of file nlpi_ipopt.cpp.

SCIP_RETCODE LapackDsyev ( SCIP_Bool  computeeigenvectors,
int  N,
SCIP_Real a,
SCIP_Real w 
)

Calls Lapacks Dsyev routine to compute eigenvalues and eigenvectors of a dense matrix. It's here, because we use Ipopt's interface to Lapack.

Parameters
computeeigenvectorsshould also eigenvectors should be computed ?
Ndimension
amatrix data on input (size N*N); eigenvectors on output if computeeigenvectors == TRUE
wbuffer to store eigenvalues (size N)

Definition at line 2792 of file nlpi_ipopt.cpp.

Referenced by checkCurvature(), and checkFactorable().

Variable Documentation

const int convcheck_nchecks = 3
static

number of convergence checks

Definition at line 98 of file nlpi_ipopt.cpp.

const int convcheck_startiter = 10
static

iteration where to start convergence checking

Definition at line 99 of file nlpi_ipopt.cpp.

const int convcheck_maxiter[convcheck_nchecks] = { 5, 15, 30 }
static

maximal number of iterations to achieve each convergence check

Definition at line 100 of file nlpi_ipopt.cpp.

const SCIP_Real convcheck_minred[convcheck_nchecks] = { 1.0, 0.5, 0.1 }
static

minimal required infeasibility reduction in each convergence check

Definition at line 101 of file nlpi_ipopt.cpp.