Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

Ipopt NLP interface.

Author
Stefan Vigerske
Benjamin Müller

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 "scip/pub_message.h"
#include "scip/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.

Data Structures

struct  SCIP_NlpiProblem
 

Macros

#define NLPI_NAME   "ipopt"
 
#define NLPI_DESC   "Ipopt interface"
 
#define NLPI_PRIORITY   1000
 
#define DEFAULT_PRINTLEVEL   J_ERROR
 
#define DEFAULT_MAXITER   3000
 
#define MAXPERTURB   0.01
 
#define FEASTOLFACTOR   0.05
 
#define DEFAULT_RANDSEED   71
 

Functions

static void invalidateSolution (SCIP_NLPIPROBLEM *problem)
 
static void setFeastol (SCIP_NLPIPROBLEM *nlpiproblem, SCIP_Real feastol)
 
static void setOpttol (SCIP_NLPIPROBLEM *nlpiproblem, SCIP_Real opttol)
 
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)
 
static 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)
 
static SCIP_RETCODE SCIPsolveLinearProb3 (SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
 
SCIP_RETCODE SCIPsolveLinearProb (int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
 

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 }
 
struct SCIP_NlpiData F77_FUNC
 

Macro Definition Documentation

◆ NLPI_NAME

#define NLPI_NAME   "ipopt"

short concise name of solver

Definition at line 69 of file nlpi_ipopt.cpp.

Referenced by SCIPcreateNlpSolverIpopt().

◆ NLPI_DESC

#define NLPI_DESC   "Ipopt interface"

description of solver

Definition at line 70 of file nlpi_ipopt.cpp.

Referenced by SCIPcreateNlpSolverIpopt().

◆ NLPI_PRIORITY

#define NLPI_PRIORITY   1000

priority

Definition at line 71 of file nlpi_ipopt.cpp.

Referenced by SCIPcreateNlpSolverIpopt().

◆ DEFAULT_PRINTLEVEL

#define DEFAULT_PRINTLEVEL   J_ERROR

default print level of Ipopt

Definition at line 76 of file nlpi_ipopt.cpp.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

◆ DEFAULT_MAXITER

#define DEFAULT_MAXITER   3000

default iteration limit for Ipopt

Definition at line 78 of file nlpi_ipopt.cpp.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

◆ MAXPERTURB

#define MAXPERTURB   0.01

maximal perturbation of bounds in starting point heuristic

Definition at line 80 of file nlpi_ipopt.cpp.

Referenced by SCIPsetModifiedDefaultSettingsIpopt().

◆ FEASTOLFACTOR

#define FEASTOLFACTOR   0.05

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

Definition at line 81 of file nlpi_ipopt.cpp.

Referenced by setFeastol().

◆ DEFAULT_RANDSEED

#define DEFAULT_RANDSEED   71

initial random seed

Definition at line 83 of file nlpi_ipopt.cpp.

Referenced by SCIP_NlpiProblem::SCIP_NlpiProblem().

Function Documentation

◆ invalidateSolution()

◆ setFeastol()

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 457 of file nlpi_ipopt.cpp.

References FEASTOLFACTOR, SCIP_NlpiProblem::ipopt, and NULL.

Referenced by SCIP_DECL_NLPICREATEPROBLEM(), and SCIP_DECL_NLPISETREALPAR().

◆ setOpttol()

static void setOpttol ( SCIP_NLPIPROBLEM nlpiproblem,
SCIP_Real  opttol 
)
static

sets optimality tolerance parameters in Ipopt

Sets dual_inf_tol and compl_inf_tol to opttol. We leave acceptable_dual_inf_tol and acceptable_compl_inf_tol untouched, which means that if Ipopt has convergence problems, then it can stop with a solution that is still feasible (see setFeastol), but essentially without a proof of local optimality. Note, that we report the solution as feasible only if Ipopt stopped on an "acceptable point" (see ScipNLP::finalize_solution).

Note, that parameters tol and acceptable_tol (set in setFeastol) also apply.

Definition at line 488 of file nlpi_ipopt.cpp.

References SCIP_NlpiProblem::ipopt, and NULL.

Referenced by SCIP_DECL_NLPICREATEPROBLEM(), and SCIP_DECL_NLPISETREALPAR().

◆ SCIP_DECL_NLPICOPY()

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 507 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPIFREE()

static SCIP_DECL_NLPIFREE ( nlpiFreeIpopt  )
static

destructor of NLP interface to free nlpi data

input:

  • nlpi datastructure for solver interface

Definition at line 538 of file nlpi_ipopt.cpp.

References NULL, SCIP_OKAY, and SCIPnlpiGetData().

◆ SCIP_DECL_NLPIGETSOLVERPOINTER()

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 560 of file nlpi_ipopt.cpp.

References NULL.

◆ SCIP_DECL_NLPICREATEPROBLEM()

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 575 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPIFREEPROBLEM()

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 673 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPIGETPROBLEMPOINTER()

static SCIP_DECL_NLPIGETPROBLEMPOINTER ( nlpiGetProblemPointerIpopt  )
static

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 705 of file nlpi_ipopt.cpp.

References NULL.

◆ SCIP_DECL_NLPIADDVARS()

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 724 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPIADDCONSTRAINTS()

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 769 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPISETOBJECTIVE()

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 809 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPICHGVARBOUNDS()

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 843 of file nlpi_ipopt.cpp.

References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleChgVarBounds(), SCIPnlpiOracleGetVarLbs(), SCIPnlpiOracleGetVarUbs(), and TRUE.

◆ SCIP_DECL_NLPICHGCONSSIDES()

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 877 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPIDELVARSET()

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 902 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPIDELCONSSET()

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 929 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPICHGLINEARCOEFS()

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 957 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPICHGQUADCOEFS()

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 981 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPICHGEXPRTREE()

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 1002 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPICHGNONLINCOEF()

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 1026 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPICHGOBJCONSTANT()

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 1046 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPISETINITIALGUESS()

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 1068 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPISOLVE()

◆ SCIP_DECL_NLPIGETSOLSTAT()

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 1214 of file nlpi_ipopt.cpp.

References NULL.

◆ SCIP_DECL_NLPIGETTERMSTAT()

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 1231 of file nlpi_ipopt.cpp.

References NULL.

◆ SCIP_DECL_NLPIGETSOLUTION()

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
  • objval buffer store the objective value, or NULL if not needed

Definition at line 1251 of file nlpi_ipopt.cpp.

References NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, and SCIPnlpiOracleEvalObjectiveValue().

◆ SCIP_DECL_NLPIGETSTATISTICS()

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 1293 of file nlpi_ipopt.cpp.

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

◆ SCIP_DECL_NLPIGETWARMSTARTSIZE()

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 1315 of file nlpi_ipopt.cpp.

References SCIP_ERROR, and SCIPerrorMessage.

◆ SCIP_DECL_NLPIGETWARMSTARTMEMO()

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 1334 of file nlpi_ipopt.cpp.

References SCIP_ERROR, and SCIPerrorMessage.

◆ SCIP_DECL_NLPISETWARMSTARTMEMO()

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 1350 of file nlpi_ipopt.cpp.

References SCIP_OKAY, SCIPABORT, and SCIPerrorMessage.

◆ SCIP_DECL_NLPIGETINTPAR()

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 1369 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.

◆ SCIP_DECL_NLPISETINTPAR()

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 1465 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().

◆ SCIP_DECL_NLPIGETREALPAR()

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 1607 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().

◆ SCIP_DECL_NLPISETREALPAR()

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 1704 of file nlpi_ipopt.cpp.

References MAX, 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(), setFeastol(), and setOpttol().

◆ SCIP_DECL_NLPIGETSTRINGPAR()

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 1838 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.

◆ SCIP_DECL_NLPISETSTRINGPAR()

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 1927 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.

◆ SCIP_DECL_NLPISETMESSAGEHDLR()

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 2023 of file nlpi_ipopt.cpp.

References NULL, SCIP_OKAY, and SCIPnlpiGetData().

◆ SCIPsolveLinearProb3()

static SCIP_RETCODE SCIPsolveLinearProb3 ( SCIP_Real A,
SCIP_Real b,
SCIP_Real x,
SCIP_Bool success 
)
static

solves a linear problem of the form Ax = b for a regular matrix 3*3 A

Parameters
Amatrix data on input (size 3*3); filled column-wise
bright hand side vector (size 3)
xbuffer to store solution (size 3)
successpointer to store if the solving routine was successful

Definition at line 2886 of file nlpi_ipopt.cpp.

References BMScopyMemoryArray, FALSE, NULL, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, and TRUE.

Referenced by SCIPsolveLinearProb().

Variable Documentation

◆ convcheck_nchecks

const int convcheck_nchecks = 3
static

number of convergence checks

Definition at line 110 of file nlpi_ipopt.cpp.

Referenced by SCIP_NlpiProblem::SCIP_NlpiProblem(), and SCIPsetModifiedDefaultSettingsIpopt().

◆ convcheck_startiter

const int convcheck_startiter = 10
static

iteration where to start convergence checking

Definition at line 111 of file nlpi_ipopt.cpp.

Referenced by SCIPsetModifiedDefaultSettingsIpopt().

◆ convcheck_maxiter

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

maximal number of iterations to achieve each convergence check

Definition at line 112 of file nlpi_ipopt.cpp.

Referenced by SCIPsetModifiedDefaultSettingsIpopt().

◆ convcheck_minred

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 113 of file nlpi_ipopt.cpp.

Referenced by SCIPsetModifiedDefaultSettingsIpopt().

◆ F77_FUNC

struct SCIP_NlpiData F77_FUNC