Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

filterSQP NLP interface

Author
Stefan Vigerske

Definition in file nlpi_filtersqp.c.

#include <string.h>
#include <sys/time.h>
#include <pthread.h>
#include "scip/misc.h"
#include "scip/pub_message.h"
#include "nlpi/nlpi_filtersqp.h"
#include "nlpi/nlpi.h"
#include "nlpi/nlpioracle.h"

Go to the source code of this file.

Data Structures

struct  SCIP_Time
 
struct  SCIP_NlpiProblem
 

Macros

#define NLPI_NAME   "filtersqp" /* short concise name of solver */
 
#define NLPI_DESC   "Sequential Quadratic Programming trust region solver by R. Fletcher and S. Leyffer" /* description of solver */
 
#define NLPI_PRIORITY   -1000 /* priority of NLP solver */
 
#define RANDSEED   26051979
 
#define MAXPERTURB   0.01
 
#define MAXNRUNS   3
 
#define WORKSPACEGROWTHFACTOR   2
 
#define MINEPS   1e-14
 
#define OPTTOLFACTOR   0.5
 
#define DEFAULT_LOBJLIM   (real)(-1e100)
 
#define DEFAULT_FEASOPTTOL   1e-6
 
#define DEFAULT_MAXITER   3000
 

Typedefs

typedef int fint
 
typedef double real
 
typedef long ftnlen
 
typedef struct SCIP_Time SCIP_TIME
 

Functions

void F77_FUNC (filtersqp, FILTERSQP)
 
 F77_FUNC (cpname, CPNAME)
 
struct {
   fint   phl
 
   fint   phr
 
   fint   phc
 
F77_FUNC (hessc, HESSC)
 
struct {
   real   ubd
 
   real   tt
 
F77_FUNC (ubdc, UBDC)
 
struct {
   real   infty
 
   real   eps
 
F77_FUNC (nlp_eps_inf, NLP_EPS_INF)
 
struct {
   fint   n_bqpd_calls
 
   fint   n_bqpd_prfint
 
F77_FUNC (bqpd_count, BQPD_COUNT)
 
struct {
   fint   scale_mode
 
   fint   phe
 
F77_FUNC (scalec, SCALEC)
 
static SCIP_TIME gettime (void)
 
static SCIP_Real timeelapsed (SCIP_NLPIDATA *nlpidata)
 
static SCIP_Bool timelimitreached (SCIP_NLPIDATA *nlpidata, SCIP_NLPIPROBLEM *nlpiproblem)
 
void F77_FUNC (objfun, OBJFUN)
 
void F77_FUNC (confun, CONFUN)
 
void F77_FUNC (gradient, GRADIENT)
 
void F77_FUNC (objgrad, OBJGRAD)
 
void F77_FUNC (hessian, HESSIAN)
 
static SCIP_RETCODE setupGradients (BMS_BLKMEM *blkmem, SCIP_NLPIORACLE *oracle, fint **la, int *lasize, real **a)
 
static SCIP_RETCODE setupHessian (BMS_BLKMEM *blkmem, SCIP_NLPIORACLE *oracle, fint **la, int *lasize)
 
static SCIP_RETCODE setupStart (SCIP_NLPIDATA *data, SCIP_NLPIPROBLEM *problem, real *x, SCIP_Bool *success)
 
static void invalidateSolution (SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE processSolveOutcome (SCIP_NLPIDATA *nlpidata, SCIP_NLPIPROBLEM *problem, fint ifail, real *x, real *lam)
 
static int calcGrowSize (int num)
 
static SCIP_DECL_NLPICOPY (nlpiCopyFilterSQP)
 
static SCIP_DECL_NLPIFREE (nlpiFreeFilterSQP)
 
static SCIP_DECL_NLPIGETSOLVERPOINTER (nlpiGetSolverPointerFilterSQP)
 
static SCIP_DECL_NLPICREATEPROBLEM (nlpiCreateProblemFilterSQP)
 
static SCIP_DECL_NLPIFREEPROBLEM (nlpiFreeProblemFilterSQP)
 
static SCIP_DECL_NLPIGETPROBLEMPOINTER (nlpiGetProblemPointerFilterSQP)
 
static SCIP_DECL_NLPIADDVARS (nlpiAddVarsFilterSQP)
 
static SCIP_DECL_NLPIADDCONSTRAINTS (nlpiAddConstraintsFilterSQP)
 
static SCIP_DECL_NLPISETOBJECTIVE (nlpiSetObjectiveFilterSQP)
 
static SCIP_DECL_NLPICHGVARBOUNDS (nlpiChgVarBoundsFilterSQP)
 
static SCIP_DECL_NLPICHGCONSSIDES (nlpiChgConsSidesFilterSQP)
 
static SCIP_DECL_NLPIDELVARSET (nlpiDelVarSetFilterSQP)
 
static SCIP_DECL_NLPIDELCONSSET (nlpiDelConstraintSetFilterSQP)
 
static SCIP_DECL_NLPICHGLINEARCOEFS (nlpiChgLinearCoefsFilterSQP)
 
static SCIP_DECL_NLPICHGQUADCOEFS (nlpiChgQuadraticCoefsFilterSQP)
 
static SCIP_DECL_NLPICHGEXPRTREE (nlpiChgExprtreeFilterSQP)
 
static SCIP_DECL_NLPICHGNONLINCOEF (nlpiChgNonlinCoefFilterSQP)
 
static SCIP_DECL_NLPICHGOBJCONSTANT (nlpiChgObjConstantFilterSQP)
 
static SCIP_DECL_NLPISETINITIALGUESS (nlpiSetInitialGuessFilterSQP)
 
static SCIP_DECL_NLPISOLVE (nlpiSolveFilterSQP)
 
static SCIP_DECL_NLPIGETSOLSTAT (nlpiGetSolstatFilterSQP)
 
static SCIP_DECL_NLPIGETTERMSTAT (nlpiGetTermstatFilterSQP)
 
static SCIP_DECL_NLPIGETSOLUTION (nlpiGetSolutionFilterSQP)
 
static SCIP_DECL_NLPIGETSTATISTICS (nlpiGetStatisticsFilterSQP)
 
static SCIP_DECL_NLPIGETWARMSTARTSIZE (nlpiGetWarmstartSizeFilterSQP)
 
static SCIP_DECL_NLPIGETWARMSTARTMEMO (nlpiGetWarmstartMemoFilterSQP)
 
static SCIP_DECL_NLPISETWARMSTARTMEMO (nlpiSetWarmstartMemoFilterSQP)
 
static SCIP_DECL_NLPIGETINTPAR (nlpiGetIntParFilterSQP)
 
static SCIP_DECL_NLPISETINTPAR (nlpiSetIntParFilterSQP)
 
static SCIP_DECL_NLPIGETREALPAR (nlpiGetRealParFilterSQP)
 
static SCIP_DECL_NLPISETREALPAR (nlpiSetRealParFilterSQP)
 
static SCIP_DECL_NLPIGETSTRINGPAR (nlpiGetStringParFilterSQP)
 
static SCIP_DECL_NLPISETSTRINGPAR (nlpiSetStringParFilterSQP)
 
static SCIP_DECL_NLPISETMESSAGEHDLR (nlpiSetMessageHdlrFilterSQP)
 
SCIP_RETCODE SCIPcreateNlpSolverFilterSQP (BMS_BLKMEM *blkmem, SCIP_NLPI **nlpi)
 
const char * SCIPgetSolverNameFilterSQP (void)
 
const char * SCIPgetSolverDescFilterSQP (void)
 
SCIP_Bool SCIPisFilterSQPAvailableFilterSQP (void)
 

Variables

static pthread_mutex_t filtersqpmutex = PTHREAD_MUTEX_INITIALIZER
 

Macro Definition Documentation

◆ NLPI_NAME

#define NLPI_NAME   "filtersqp" /* short concise name of solver */

Definition at line 43 of file nlpi_filtersqp.c.

Referenced by SCIPcreateNlpSolverFilterSQP().

◆ NLPI_DESC

#define NLPI_DESC   "Sequential Quadratic Programming trust region solver by R. Fletcher and S. Leyffer" /* description of solver */

Definition at line 44 of file nlpi_filtersqp.c.

Referenced by SCIPcreateNlpSolverFilterSQP(), and SCIPgetSolverDescFilterSQP().

◆ NLPI_PRIORITY

#define NLPI_PRIORITY   -1000 /* priority of NLP solver */

Definition at line 45 of file nlpi_filtersqp.c.

Referenced by SCIPcreateNlpSolverFilterSQP().

◆ RANDSEED

#define RANDSEED   26051979

initial random seed

Definition at line 47 of file nlpi_filtersqp.c.

Referenced by setupStart().

◆ MAXPERTURB

#define MAXPERTURB   0.01

maximal perturbation of bounds in starting point heuristic

Definition at line 48 of file nlpi_filtersqp.c.

Referenced by setupStart().

◆ MAXNRUNS

#define MAXNRUNS   3

maximal number of FilterSQP calls per NLP solve (several calls if increasing workspace or decreasing eps)

Definition at line 49 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPISOLVE().

◆ WORKSPACEGROWTHFACTOR

#define WORKSPACEGROWTHFACTOR   2

factor by which to increase worksapce

Definition at line 50 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPISOLVE().

◆ MINEPS

#define MINEPS   1e-14

minimal FilterSQP epsilon

Definition at line 51 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPISOLVE().

◆ OPTTOLFACTOR

#define OPTTOLFACTOR   0.5

factor to apply to optimality tolerance, because FilterSQP do scaling

Definition at line 52 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPISOLVE().

◆ DEFAULT_LOBJLIM

#define DEFAULT_LOBJLIM   (real)(-1e100)

default lower objective limit (should mean "unlimited")

Definition at line 53 of file nlpi_filtersqp.c.

Referenced by processSolveOutcome(), and SCIP_DECL_NLPICREATEPROBLEM().

◆ DEFAULT_FEASOPTTOL

#define DEFAULT_FEASOPTTOL   1e-6

default feasibility and optimality tolerance

Definition at line 54 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

◆ DEFAULT_MAXITER

#define DEFAULT_MAXITER   3000

default iteration limit

Definition at line 55 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

Typedef Documentation

◆ fint

typedef int fint

Definition at line 61 of file nlpi_filtersqp.c.

◆ real

typedef double real

Definition at line 62 of file nlpi_filtersqp.c.

◆ ftnlen

typedef long ftnlen

Definition at line 63 of file nlpi_filtersqp.c.

◆ SCIP_TIME

typedef struct SCIP_Time SCIP_TIME

Definition at line 70 of file nlpi_filtersqp.c.

Function Documentation

◆ F77_FUNC() [1/12]

void F77_FUNC ( filtersqp  ,
FILTERSQP   
)

FilterSQP main routine.

Array a has length nnza, which is the number of nonzeros in the gradient of the objective and the Jacobian. The first entries of a is the objective gradient, next are the gradients of the constraints.

Array la has length lamax, which is at least nnza+m+2. la contains the index information of a row-oriented sparse matrix storage. It stores the number of nonzeros, the column indices, and the row starts: la[0] must be set to nnza+1. la[1]..la[nnza] are indices of the variables corresponding to the entries in a (colidx). la[nnza+1]..la[nnza+1+m] contain the index where each row starts in a and la (rowstart).common block for problemname

Definition at line 160 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPISOLVE(), and setupHessian().

◆ F77_FUNC() [2/12]

F77_FUNC ( cpname  ,
CPNAME   
)

◆ F77_FUNC() [3/12]

struct @15 F77_FUNC ( hessc  ,
HESSC   
)

common block for Hessian storage set to 0, i.e. NO Hessian

◆ F77_FUNC() [4/12]

struct @16 F77_FUNC ( ubdc  ,
UBDC   
)

common block for upper bound on filter

◆ F77_FUNC() [5/12]

struct @17 F77_FUNC ( nlp_eps_inf  ,
NLP_EPS_INF   
)

common block for infinity & epsilon

◆ F77_FUNC() [6/12]

struct @18 F77_FUNC ( bqpd_count  ,
BQPD_COUNT   
)

common block for printing from QP solver

◆ F77_FUNC() [7/12]

struct @19 F77_FUNC ( scalec  ,
SCALEC   
)

common for scaling: scale_mode = 0 (none), 1 (variables), 2 (vars+cons)

◆ gettime()

static SCIP_TIME gettime ( void  )
static

Definition at line 265 of file nlpi_filtersqp.c.

References NULL, SCIP_Time::sec, and SCIP_Time::usec.

Referenced by SCIP_DECL_NLPISOLVE(), and timeelapsed().

◆ timeelapsed()

static SCIP_Real timeelapsed ( SCIP_NLPIDATA nlpidata)
static
Parameters
nlpidataNLPI data

Definition at line 287 of file nlpi_filtersqp.c.

References gettime(), NULL, SCIP_Real, SCIP_Time::sec, and SCIP_Time::usec.

Referenced by processSolveOutcome(), and timelimitreached().

◆ timelimitreached()

static SCIP_Bool timelimitreached ( SCIP_NLPIDATA nlpidata,
SCIP_NLPIPROBLEM nlpiproblem 
)
static
Parameters
nlpidataNLPI data
nlpiproblemNLPI problem

Definition at line 305 of file nlpi_filtersqp.c.

References FALSE, SCIP_NlpiProblem::maxtime, and timeelapsed().

Referenced by F77_FUNC(), and SCIP_DECL_NLPISOLVE().

◆ F77_FUNC() [8/12]

void F77_FUNC ( objfun  ,
OBJFUN   
)

Objective function evaluation set to 1 if arithmetic exception occurs, otherwise 0

Definition at line 317 of file nlpi_filtersqp.c.

References NULL, SCIP_NlpiProblem::oracle, SCIP_OKAY, SCIPdebugMessage, SCIPisFinite, SCIPnlpiOracleEvalObjectiveValue(), timelimitreached(), and x.

◆ F77_FUNC() [9/12]

void F77_FUNC ( confun  ,
CONFUN   
)

Constraint functions evaluation set to 1 if arithmetic exception occurs, otherwise 0

Definition at line 352 of file nlpi_filtersqp.c.

References NULL, SCIP_NlpiProblem::oracle, SCIP_OKAY, SCIPdebugMessage, SCIPisFinite, SCIPnlpiOracleEvalConstraintValue(), and x.

◆ F77_FUNC() [10/12]

void F77_FUNC ( gradient  ,
GRADIENT   
)

Objective gradient and Jacobian evaluation

Note
If an arithmetic exception occurred, then the gradients must not be modified.set to 1 if arithmetic exception occurs, otherwise 0

Definition at line 389 of file nlpi_filtersqp.c.

References a, BMScopyMemoryArray, SCIP_NlpiProblem::evalbuffer, SCIP_NlpiProblem::evalbufsize, NULL, SCIP_NlpiProblem::oracle, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPnlpiOracleEvalJacobian(), SCIPnlpiOracleEvalObjectiveGradient(), TRUE, and x.

◆ F77_FUNC() [11/12]

void F77_FUNC ( objgrad  ,
OBJGRAD   
)

Definition at line 445 of file nlpi_filtersqp.c.

References SCIPerrorMessage.

◆ F77_FUNC() [12/12]

void F77_FUNC ( hessian  ,
HESSIAN   
)

Hessian of the Lagrangian evaluation

phase = 1 : Hessian of the Lagrangian without objective Hessian phase = 2 : Hessian of the Lagrangian (including objective Hessian)

Note
If an arithmetic exception occurred, then the Hessian must not be modified.set to 1 if arithmetic exception occurs, otherwise 0

Definition at line 458 of file nlpi_filtersqp.c.

References BMSallocMemoryArray, BMScopyMemoryArray, BMSfreeMemoryArray, SCIP_NlpiProblem::evalbuffer, SCIP_NlpiProblem::evalbufsize, SCIP_NlpiProblem::hessiannz, NULL, SCIP_NlpiProblem::oracle, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPnlpiOracleEvalHessianLag(), TRUE, and x.

◆ setupGradients()

static SCIP_RETCODE setupGradients ( BMS_BLKMEM blkmem,
SCIP_NLPIORACLE oracle,
fint **  la,
int *  lasize,
real **  a 
)
static
Parameters
blkmemblock memory
oracleNLPI oracle
labuffer to store pointer to sparsity structure
lasizebuffer to store length of *la array
abuffer to store pointer to value buffer

Definition at line 516 of file nlpi_filtersqp.c.

References BMSallocBlockMemoryArray, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleGetJacobianSparsity(), SCIPnlpiOracleGetNConstraints(), and SCIPnlpiOracleGetNVars().

Referenced by SCIP_DECL_NLPISOLVE().

◆ setupHessian()

static SCIP_RETCODE setupHessian ( BMS_BLKMEM blkmem,
SCIP_NLPIORACLE oracle,
fint **  la,
int *  lasize 
)
static
Parameters
blkmemblock memory
oracleNLPI oracle
labuffer to store pointer to Hessian sparsity structure
lasizebuffer to store length of *la array

Definition at line 585 of file nlpi_filtersqp.c.

References BMSallocBlockMemoryArray, F77_FUNC(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleGetHessianLagSparsity(), and SCIPnlpiOracleGetNVars().

Referenced by SCIP_DECL_NLPISOLVE().

◆ setupStart()

◆ invalidateSolution()

◆ processSolveOutcome()

static SCIP_RETCODE processSolveOutcome ( SCIP_NLPIDATA nlpidata,
SCIP_NLPIPROBLEM problem,
fint  ifail,
real x,
real lam 
)
static

◆ calcGrowSize()

static int calcGrowSize ( int  num)
static

calculate memory size for dynamically allocated arrays (copied from scip/set.c)

Parameters
numminimum number of entries to store

Definition at line 886 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPIADDVARS(), and SCIP_DECL_NLPISOLVE().

◆ SCIP_DECL_NLPICOPY()

static SCIP_DECL_NLPICOPY ( nlpiCopyFilterSQP  )
static

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

input:

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

Definition at line 913 of file nlpi_filtersqp.c.

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

◆ SCIP_DECL_NLPIFREE()

static SCIP_DECL_NLPIFREE ( nlpiFreeFilterSQP  )
static

destructor of NLP interface to free nlpi data

input:

  • nlpi datastructure for solver interface

Definition at line 938 of file nlpi_filtersqp.c.

References BMSfreeBlockMemory, NULL, SCIP_OKAY, SCIPnlpiGetData(), and SCIPrandomFree().

◆ SCIP_DECL_NLPIGETSOLVERPOINTER()

static SCIP_DECL_NLPIGETSOLVERPOINTER ( nlpiGetSolverPointerFilterSQP  )
static

gets pointer for NLP solver

to do dirty stuff

input:

  • nlpi datastructure for solver interface

return: void pointer to solver

Definition at line 968 of file nlpi_filtersqp.c.

References NULL.

◆ SCIP_DECL_NLPICREATEPROBLEM()

static SCIP_DECL_NLPICREATEPROBLEM ( nlpiCreateProblemFilterSQP  )
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 981 of file nlpi_filtersqp.c.

References BMSallocBlockMemory, BMSclearMemory, DEFAULT_FEASOPTTOL, DEFAULT_LOBJLIM, DEFAULT_MAXITER, invalidateSolution(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), SCIPnlpiOracleCreate(), SCIPnlpiOracleSetInfinity(), and SCIPnlpiOracleSetProblemName().

◆ SCIP_DECL_NLPIFREEPROBLEM()

static SCIP_DECL_NLPIFREEPROBLEM ( nlpiFreeProblemFilterSQP  )
static

free a problem instance

input:

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

Definition at line 1017 of file nlpi_filtersqp.c.

References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), and SCIPnlpiOracleFree().

◆ SCIP_DECL_NLPIGETPROBLEMPOINTER()

static SCIP_DECL_NLPIGETPROBLEMPOINTER ( nlpiGetProblemPointerFilterSQP  )
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 1069 of file nlpi_filtersqp.c.

References NULL.

◆ SCIP_DECL_NLPIADDVARS()

static SCIP_DECL_NLPIADDVARS ( nlpiAddVarsFilterSQP  )
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 1085 of file nlpi_filtersqp.c.

References BMSfreeBlockMemoryArrayNull, BMSreallocBlockMemoryArray, calcGrowSize(), FALSE, invalidateSolution(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), SCIPnlpiOracleAddVars(), SCIPnlpiOracleGetNConstraints(), and SCIPnlpiOracleGetNVars().

◆ SCIP_DECL_NLPIADDCONSTRAINTS()

static SCIP_DECL_NLPIADDCONSTRAINTS ( nlpiAddConstraintsFilterSQP  )
static

add constraints quadratic coefficients: 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
  • nlininds number of linear coefficients for each constraint may be NULL in case of no linear part
  • lininds indices of variables for linear coefficients for each constraint may be NULL in case of no linear part
  • linvals values of linear coefficient for each constraint may be NULL in case of no linear part
  • nquadrows number of columns in matrix of quadratic part for each constraint may be NULL in case of no quadratic part in any constraint
  • quadrowidxs indices of variables for which a quadratic part is specified may be NULL in case of no quadratic part in any constraint
  • quadoffsets start index of each rows quadratic coefficients in quadinds[.] and quadvals[.] indices are given w.r.t. quadrowidxs., i.e., quadoffsets[.][i] gives the start index of row quadrowidxs[.][i] in quadvals[.] quadoffsets[.][nquadrows[.]] gives length of quadinds[.] and quadvals[.] entry of array may be NULL in case of no quadratic part may be NULL in case of no quadratic part in any constraint
  • quadinds column indices w.r.t. quadrowidxs, i.e., quadrowidxs[quadinds[.][i]] gives the index of the variable corresponding to entry i, entry of array may be NULL in case of no quadratic part may be NULL in case of no quadratic part in any constraint
  • quadvals coefficient values entry of array may be NULL in case of no quadratic part may be NULL in case of no quadratic part in any constraint
  • 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 1225 of file nlpi_filtersqp.c.

References BMSfreeBlockMemoryArrayNull, BMSreallocBlockMemoryArray, calcGrowSize(), FALSE, invalidateSolution(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), SCIPnlpiOracleAddConstraints(), SCIPnlpiOracleGetConstraintDegree(), SCIPnlpiOracleGetNConstraints(), and SCIPnlpiOracleGetNVars().

◆ SCIP_DECL_NLPISETOBJECTIVE()

static SCIP_DECL_NLPISETOBJECTIVE ( nlpiSetObjectiveFilterSQP  )
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
  • nquadcols number of columns in matrix of quadratic part
  • quadcols indices of variables for which a quadratic part is specified may be NULL in case of no quadratic part
  • quadoffsets start index of each rows quadratic coefficients in quadinds and quadvals quadoffsets[.][nquadcols] gives length of quadinds and quadvals may be NULL in case of no quadratic part
  • quadinds column indices may be NULL in case of no quadratic part
  • quadvals coefficient values 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 1339 of file nlpi_filtersqp.c.

References BMSfreeBlockMemoryArrayNull, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), and SCIPnlpiOracleSetObjective().

◆ SCIP_DECL_NLPICHGVARBOUNDS()

static SCIP_DECL_NLPICHGVARBOUNDS ( nlpiChgVarBoundsFilterSQP  )
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 1376 of file nlpi_filtersqp.c.

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

◆ SCIP_DECL_NLPICHGCONSSIDES()

static SCIP_DECL_NLPICHGCONSSIDES ( nlpiChgConsSidesFilterSQP  )
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 1412 of file nlpi_filtersqp.c.

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

◆ SCIP_DECL_NLPIDELVARSET()

static SCIP_DECL_NLPIDELVARSET ( nlpiDelVarSetFilterSQP  )
static

delete a set of variables

input:

  • nlpi datastructure for solver interface
  • problem datastructure for problem instance
  • 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 1451 of file nlpi_filtersqp.c.

References BMSfreeBlockMemoryArrayNull, FALSE, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), and SCIPnlpiOracleDelVarSet().

◆ SCIP_DECL_NLPIDELCONSSET()

static SCIP_DECL_NLPIDELCONSSET ( nlpiDelConstraintSetFilterSQP  )
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 1495 of file nlpi_filtersqp.c.

References BMSfreeBlockMemoryArrayNull, FALSE, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), and SCIPnlpiOracleDelConsSet().

◆ SCIP_DECL_NLPICHGLINEARCOEFS()

static SCIP_DECL_NLPICHGLINEARCOEFS ( nlpiChgLinearCoefsFilterSQP  )
static

changes (or adds) linear coefficients 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 to change
  • varidxs indices of variables which coefficient to change
  • vals new values for coefficients

Definition at line 1536 of file nlpi_filtersqp.c.

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

◆ SCIP_DECL_NLPICHGQUADCOEFS()

static SCIP_DECL_NLPICHGQUADCOEFS ( nlpiChgQuadraticCoefsFilterSQP  )
static

changes (or adds) coefficients 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
  • nentries number of entries in quadratic matrix to change
  • rows row indices of entries in quadratic matrix where values should be changed
  • cols column indices of entries in quadratic matrix where values should be changed
  • values new values for entries in quadratic matrix

Definition at line 1575 of file nlpi_filtersqp.c.

References BMSfreeBlockMemoryArrayNull, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), SCIPnlpiOracleChgQuadCoefs(), and SCIPnlpiOracleGetConstraintDegree().

◆ SCIP_DECL_NLPICHGEXPRTREE()

static SCIP_DECL_NLPICHGEXPRTREE ( nlpiChgExprtreeFilterSQP  )
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
  • exprvaridxs indices of variables in expression tree, maps variable indices in expression tree to indices in nlp, or NULL
  • exprtree new expression tree for constraint or objective, or NULL to only remove previous tree

Definition at line 1619 of file nlpi_filtersqp.c.

References BMSfreeBlockMemoryArrayNull, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), SCIPnlpiOracleChgExprtree(), and SCIPnlpiOracleGetConstraintDegree().

◆ SCIP_DECL_NLPICHGNONLINCOEF()

static SCIP_DECL_NLPICHGNONLINCOEF ( nlpiChgNonlinCoefFilterSQP  )
static

change one coefficient 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 1660 of file nlpi_filtersqp.c.

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

◆ SCIP_DECL_NLPICHGOBJCONSTANT()

static SCIP_DECL_NLPICHGOBJCONSTANT ( nlpiChgObjConstantFilterSQP  )
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 1693 of file nlpi_filtersqp.c.

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

◆ SCIP_DECL_NLPISETINITIALGUESS()

static SCIP_DECL_NLPISETINITIALGUESS ( nlpiSetInitialGuessFilterSQP  )
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 1717 of file nlpi_filtersqp.c.

References BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArrayNull, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPnlpiGetData(), and SCIPnlpiOracleGetNVars().

◆ SCIP_DECL_NLPISOLVE()

◆ SCIP_DECL_NLPIGETSOLSTAT()

static SCIP_DECL_NLPIGETSOLSTAT ( nlpiGetSolstatFilterSQP  )
static

gives solution status

input:

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

return: Solution Status

Definition at line 2064 of file nlpi_filtersqp.c.

References NULL.

◆ SCIP_DECL_NLPIGETTERMSTAT()

static SCIP_DECL_NLPIGETTERMSTAT ( nlpiGetTermstatFilterSQP  )
static

gives termination reason

input:

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

return: Termination Status

Definition at line 2080 of file nlpi_filtersqp.c.

References NULL.

◆ SCIP_DECL_NLPIGETSOLUTION()

static SCIP_DECL_NLPIGETSOLUTION ( nlpiGetSolutionFilterSQP  )
static

gives primal and dual solution values

solver can return NULL in dual values if not available but if solver provides dual values for one side of variable bounds, then it must also provide those for the other side

for a ranged constraint, the dual variable is positive if the right hand side is active and negative if the left hand side is active

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 2104 of file nlpi_filtersqp.c.

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

◆ SCIP_DECL_NLPIGETSTATISTICS()

static SCIP_DECL_NLPIGETSTATISTICS ( nlpiGetStatisticsFilterSQP  )
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 2161 of file nlpi_filtersqp.c.

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

◆ SCIP_DECL_NLPIGETWARMSTARTSIZE()

static SCIP_DECL_NLPIGETWARMSTARTSIZE ( nlpiGetWarmstartSizeFilterSQP  )
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 2182 of file nlpi_filtersqp.c.

References SCIP_OKAY, SCIPABORT, and SCIPerrorMessage.

◆ SCIP_DECL_NLPIGETWARMSTARTMEMO()

static SCIP_DECL_NLPIGETWARMSTARTMEMO ( nlpiGetWarmstartMemoFilterSQP  )
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 2203 of file nlpi_filtersqp.c.

References SCIP_OKAY, SCIPABORT, and SCIPerrorMessage.

◆ SCIP_DECL_NLPISETWARMSTARTMEMO()

static SCIP_DECL_NLPISETWARMSTARTMEMO ( nlpiSetWarmstartMemoFilterSQP  )
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 2221 of file nlpi_filtersqp.c.

References SCIP_OKAY, SCIPABORT, and SCIPerrorMessage.

◆ SCIP_DECL_NLPIGETINTPAR()

static SCIP_DECL_NLPIGETINTPAR ( nlpiGetIntParFilterSQP  )
static

gets integer parameter of NLP

input:

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

output:

  • ival parameter value

Definition at line 2241 of file nlpi_filtersqp.c.

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 ( nlpiSetIntParFilterSQP  )
static

sets integer parameter of NLP

input:

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

Definition at line 2328 of file nlpi_filtersqp.c.

References NULL, SCIP_Bool, 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, SCIPdebugMessage, and SCIPerrorMessage.

◆ SCIP_DECL_NLPIGETREALPAR()

static SCIP_DECL_NLPIGETREALPAR ( nlpiGetRealParFilterSQP  )
static

gets floating point parameter of NLP

input:

  • nlpi NLP interface structure
  • 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 2449 of file nlpi_filtersqp.c.

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 ( nlpiSetRealParFilterSQP  )
static

sets floating point parameter of NLP

input:

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

Definition at line 2545 of file nlpi_filtersqp.c.

References NULL, SCIP_CALL, 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, SCIPnlpiGetData(), and SCIPnlpiOracleSetInfinity().

◆ SCIP_DECL_NLPIGETSTRINGPAR()

static SCIP_DECL_NLPIGETSTRINGPAR ( nlpiGetStringParFilterSQP  )
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 2669 of file nlpi_filtersqp.c.

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 ( nlpiSetStringParFilterSQP  )
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 2753 of file nlpi_filtersqp.c.

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, SCIPmessagePrintWarning(), and SCIPnlpiGetData().

◆ SCIP_DECL_NLPISETMESSAGEHDLR()

static SCIP_DECL_NLPISETMESSAGEHDLR ( nlpiSetMessageHdlrFilterSQP  )
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 2835 of file nlpi_filtersqp.c.

References NULL, SCIP_OKAY, and SCIPnlpiGetData().

◆ SCIPcreateNlpSolverFilterSQP()

SCIP_RETCODE SCIPcreateNlpSolverFilterSQP ( BMS_BLKMEM blkmem,
SCIP_NLPI **  nlpi 
)

create solver interface for FilterSQP solver

Parameters
blkmemblock memory data structure
nlpipointer to buffer for nlpi address

Definition at line 2854 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPICOPY(), and SCIPincludeDefaultPlugins().

◆ SCIPgetSolverNameFilterSQP()

const char* SCIPgetSolverNameFilterSQP ( void  )

gets string that identifies filterSQP (version number)

Definition at line 2891 of file nlpi_filtersqp.c.

Referenced by SCIPincludeDefaultPlugins().

◆ SCIPgetSolverDescFilterSQP()

const char* SCIPgetSolverDescFilterSQP ( void  )

gets string that describes filterSQP

Definition at line 2899 of file nlpi_filtersqp.c.

Referenced by SCIPincludeDefaultPlugins().

◆ SCIPisFilterSQPAvailableFilterSQP()

SCIP_Bool SCIPisFilterSQPAvailableFilterSQP ( void  )

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

Definition at line 2907 of file nlpi_filtersqp.c.

Variable Documentation

◆ phl

fint phl

Definition at line 227 of file nlpi_filtersqp.c.

◆ phr

fint phr

Definition at line 227 of file nlpi_filtersqp.c.

◆ phc

fint phc

Definition at line 227 of file nlpi_filtersqp.c.

◆ ubd

real ubd

Definition at line 234 of file nlpi_filtersqp.c.

◆ tt

real tt

Definition at line 234 of file nlpi_filtersqp.c.

◆ infty

real infty

Definition at line 240 of file nlpi_filtersqp.c.

◆ eps

◆ n_bqpd_calls

fint n_bqpd_calls

Definition at line 247 of file nlpi_filtersqp.c.

◆ n_bqpd_prfint

fint n_bqpd_prfint

Definition at line 247 of file nlpi_filtersqp.c.

◆ scale_mode

fint scale_mode

Definition at line 256 of file nlpi_filtersqp.c.

◆ phe

fint phe

Definition at line 256 of file nlpi_filtersqp.c.

◆ filtersqpmutex

pthread_mutex_t filtersqpmutex = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 261 of file nlpi_filtersqp.c.

Referenced by SCIP_DECL_NLPISOLVE().