Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

Worhp NLP interface.

Author
Benjamin Mueller
Renke Kuhlmann

Definition in file nlpi_worhp.c.

#include "nlpi/nlpi_worhp.h"
#include "nlpi/nlpi.h"
#include "nlpi/nlpioracle.h"
#include "nlpi/exprinterpret.h"
#include "scip/interrupt.h"
#include "scip/misc.h"
#include <stdio.h>
#include <stdlib.h>
#include "worhp/worhp.h"

Go to the source code of this file.

Macros

#define NLPI_DESC   "Worhp interface"
 
#define NLPI_PRIORITY_IP   0
 
#define NLPI_PRIORITY_SQP   -2000
 
#define DEFAULT_VERBLEVEL   0
 
#define DEFAULT_SCALEDKKT   TRUE
 
#define DEFAULT_MAXITER   3000
 
#define DEFAULT_RANDSEED   107
 
#define MAXPERTURB   0.01
 

Functions

static void invalidateSolution (SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE evaluateWorhpRun (SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE userF (SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE userG (SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE userDF (SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE userDG (SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE userHM (SCIP_NLPIPROBLEM *problem)
 
static void noprint (int mode, const char s[])
 
static SCIP_RETCODE initWorhp (SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE updateWorhp (SCIP_NLPIPROBLEM *problem)
 
static SCIP_RETCODE freeWorhp (SCIP_NLPIPROBLEM *problem)
 
static SCIP_DECL_NLPICOPY (nlpiCopyWorhp)
 
static SCIP_DECL_NLPIFREE (nlpiFreeWorhp)
 
static SCIP_DECL_NLPIGETSOLVERPOINTER (nlpiGetSolverPointerWorhp)
 
static SCIP_DECL_NLPICREATEPROBLEM (nlpiCreateProblemWorhp)
 
static SCIP_DECL_NLPIFREEPROBLEM (nlpiFreeProblemWorhp)
 
static SCIP_DECL_NLPIGETPROBLEMPOINTER (nlpiGetProblemPointerWorhp)
 
static SCIP_DECL_NLPIADDVARS (nlpiAddVarsWorhp)
 
static SCIP_DECL_NLPIADDCONSTRAINTS (nlpiAddConstraintsWorhp)
 
static SCIP_DECL_NLPISETOBJECTIVE (nlpiSetObjectiveWorhp)
 
static SCIP_DECL_NLPICHGVARBOUNDS (nlpiChgVarBoundsWorhp)
 
static SCIP_DECL_NLPICHGCONSSIDES (nlpiChgConsSidesWorhp)
 
static SCIP_DECL_NLPIDELVARSET (nlpiDelVarSetWorhp)
 
static SCIP_DECL_NLPIDELCONSSET (nlpiDelConstraintSetWorhp)
 
static SCIP_DECL_NLPICHGLINEARCOEFS (nlpiChgLinearCoefsWorhp)
 
static SCIP_DECL_NLPICHGQUADCOEFS (nlpiChgQuadraticCoefsWorhp)
 
static SCIP_DECL_NLPICHGEXPRTREE (nlpiChgExprtreeWorhp)
 
static SCIP_DECL_NLPICHGNONLINCOEF (nlpiChgNonlinCoefWorhp)
 
static SCIP_DECL_NLPICHGOBJCONSTANT (nlpiChgObjConstantWorhp)
 
static SCIP_DECL_NLPISETINITIALGUESS (nlpiSetInitialGuessWorhp)
 
static SCIP_DECL_NLPISOLVE (nlpiSolveWorhp)
 
static SCIP_DECL_NLPIGETSOLSTAT (nlpiGetSolstatWorhp)
 
static SCIP_DECL_NLPIGETTERMSTAT (nlpiGetTermstatWorhp)
 
static SCIP_DECL_NLPIGETSOLUTION (nlpiGetSolutionWorhp)
 
static SCIP_DECL_NLPIGETSTATISTICS (nlpiGetStatisticsWorhp)
 
static SCIP_DECL_NLPIGETWARMSTARTSIZE (nlpiGetWarmstartSizeWorhp)
 
static SCIP_DECL_NLPIGETWARMSTARTMEMO (nlpiGetWarmstartMemoWorhp)
 
static SCIP_DECL_NLPISETWARMSTARTMEMO (nlpiSetWarmstartMemoWorhp)
 
static SCIP_DECL_NLPIGETINTPAR (nlpiGetIntParWorhp)
 
static SCIP_DECL_NLPISETINTPAR (nlpiSetIntParWorhp)
 
static SCIP_DECL_NLPIGETREALPAR (nlpiGetRealParWorhp)
 
static SCIP_DECL_NLPISETREALPAR (nlpiSetRealParWorhp)
 
static SCIP_DECL_NLPIGETSTRINGPAR (nlpiGetStringParWorhp)
 
static SCIP_DECL_NLPISETSTRINGPAR (nlpiSetStringParWorhp)
 
static SCIP_DECL_NLPISETMESSAGEHDLR (nlpiSetMessageHdlrWorhp)
 
SCIP_RETCODE SCIPcreateNlpSolverWorhp (BMS_BLKMEM *blkmem, SCIP_NLPI **nlpi, SCIP_Bool useip)
 
const char * SCIPgetSolverNameWorhp (void)
 
const char * SCIPgetSolverDescWorhp (void)
 
SCIP_Bool SCIPisWorhpAvailableWorhp (void)
 

Macro Definition Documentation

◆ NLPI_DESC

#define NLPI_DESC   "Worhp interface"

description of solver

Definition at line 44 of file nlpi_worhp.c.

Referenced by SCIPcreateNlpSolverWorhp().

◆ NLPI_PRIORITY_IP

#define NLPI_PRIORITY_IP   0

priority of NLP solver (Interior Point)

Definition at line 45 of file nlpi_worhp.c.

Referenced by SCIPcreateNlpSolverWorhp().

◆ NLPI_PRIORITY_SQP

#define NLPI_PRIORITY_SQP   -2000

priority of NLP solver (SQP)

Definition at line 46 of file nlpi_worhp.c.

Referenced by SCIPcreateNlpSolverWorhp().

◆ DEFAULT_VERBLEVEL

#define DEFAULT_VERBLEVEL   0

default verbosity level (0: normal 1: full 2: debug >2: more debug)

Definition at line 48 of file nlpi_worhp.c.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

◆ DEFAULT_SCALEDKKT

#define DEFAULT_SCALEDKKT   TRUE

default whether KKT conditions are allowed to be scaled in the solver

Definition at line 49 of file nlpi_worhp.c.

Referenced by SCIP_DECL_NLPISOLVE().

◆ DEFAULT_MAXITER

#define DEFAULT_MAXITER   3000

default iteration limit for Worhp

Definition at line 50 of file nlpi_worhp.c.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

◆ DEFAULT_RANDSEED

#define DEFAULT_RANDSEED   107

initial random seed

Definition at line 51 of file nlpi_worhp.c.

Referenced by SCIP_DECL_NLPICREATEPROBLEM().

◆ MAXPERTURB

#define MAXPERTURB   0.01

maximal perturbation of bounds in starting point heuristic

Definition at line 53 of file nlpi_worhp.c.

Referenced by SCIP_DECL_NLPISOLVE().

Function Documentation

◆ invalidateSolution()

◆ evaluateWorhpRun()

◆ userF()

static SCIP_RETCODE userF ( SCIP_NLPIPROBLEM problem)
static

evaluates objective function and store the result in the corresponding Worhp data fields

Parameters
problempointer to problem data structure

Definition at line 422 of file nlpi_worhp.c.

References SCIP_NlpiProblem::blkmem, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::oracle, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiOracleEvalObjectiveValue(), SCIPnlpiOracleGetNConstraints(), SCIPnlpiOracleGetNVars(), and SCIP_NlpiProblem::wsp.

Referenced by SCIP_DECL_NLPISOLVE().

◆ userG()

static SCIP_RETCODE userG ( SCIP_NLPIPROBLEM problem)
static

evaluates constraints and store the result in the corresponding Worhp data fields

Parameters
problempointer to problem data structure

Definition at line 455 of file nlpi_worhp.c.

References SCIP_NlpiProblem::blkmem, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::oracle, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleEvalConstraintValues(), SCIPnlpiOracleGetNConstraints(), SCIPnlpiOracleGetNVars(), and SCIP_NlpiProblem::wsp.

Referenced by SCIP_DECL_NLPISOLVE().

◆ userDF()

static SCIP_RETCODE userDF ( SCIP_NLPIPROBLEM problem)
static

computes objective gradient and store the result in the corresponding Worhp data fields

Parameters
problempointer to problem data structure

Definition at line 487 of file nlpi_worhp.c.

References SCIP_NlpiProblem::blkmem, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::oracle, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiOracleEvalObjectiveGradient(), SCIPnlpiOracleGetNConstraints(), SCIPnlpiOracleGetNVars(), TRUE, and SCIP_NlpiProblem::wsp.

Referenced by SCIP_DECL_NLPISOLVE().

◆ userDG()

static SCIP_RETCODE userDG ( SCIP_NLPIPROBLEM problem)
static

computes jacobian matrix and store the result in the corresponding Worhp data fields

Parameters
problempointer to problem data structure

Definition at line 531 of file nlpi_worhp.c.

References SCIP_NlpiProblem::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::oracle, SCIP_ALLOC, SCIP_OKAY, SCIP_Real, SCIPnlpiOracleEvalJacobian(), SCIPnlpiOracleGetNConstraints(), SCIPnlpiOracleGetNVars(), TRUE, and SCIP_NlpiProblem::wsp.

Referenced by SCIP_DECL_NLPISOLVE().

◆ userHM()

static SCIP_RETCODE userHM ( SCIP_NLPIPROBLEM problem)
static

computes hessian matrix and store the result in the corresponding Worhp data fields

Parameters
problempointer to problem data structure

Definition at line 576 of file nlpi_worhp.c.

References SCIP_NlpiProblem::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::oracle, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiOracleEvalHessianLag(), SCIPnlpiOracleGetHessianLagSparsity(), SCIPnlpiOracleGetNConstraints(), SCIPnlpiOracleGetNVars(), TRUE, and SCIP_NlpiProblem::wsp.

Referenced by SCIP_DECL_NLPISOLVE().

◆ noprint()

static void noprint ( int  mode,
const char  s[] 
)
static

Worhp print callback function that does nothing

Parameters
modethe mode
sa string

Definition at line 632 of file nlpi_worhp.c.

Referenced by SCIP_DECL_NLPISOLVE(), and SCIPcreateNlpSolverWorhp().

◆ initWorhp()

◆ updateWorhp()

◆ freeWorhp()

static SCIP_RETCODE freeWorhp ( SCIP_NLPIPROBLEM problem)
static

frees Worhp data

Parameters
problempointer to problem data structure

Definition at line 886 of file nlpi_worhp.c.

References SCIP_NlpiProblem::cnt, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::par, SCIP_OKAY, and SCIP_NlpiProblem::wsp.

Referenced by SCIP_DECL_NLPIFREEPROBLEM(), and SCIP_DECL_NLPISOLVE().

◆ SCIP_DECL_NLPICOPY()

static SCIP_DECL_NLPICOPY ( nlpiCopyWorhp  )
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 917 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPIFREE()

static SCIP_DECL_NLPIFREE ( nlpiFreeWorhp  )
static

destructor of NLP interface to free nlpi data

input:

  • nlpi datastructure for solver interface

Definition at line 942 of file nlpi_worhp.c.

References BMSfreeBlockMemory, SCIP_OKAY, and SCIPnlpiGetData().

◆ SCIP_DECL_NLPIGETSOLVERPOINTER()

static SCIP_DECL_NLPIGETSOLVERPOINTER ( nlpiGetSolverPointerWorhp  )
static

gets pointer for NLP solver

to do dirty stuff

input:

  • nlpi datastructure for solver interface

return: void pointer to solver

Definition at line 967 of file nlpi_worhp.c.

◆ SCIP_DECL_NLPICREATEPROBLEM()

static SCIP_DECL_NLPICREATEPROBLEM ( nlpiCreateProblemWorhp  )
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 982 of file nlpi_worhp.c.

References BMSallocBlockMemory, BMSclearMemory, DEFAULT_MAXITER, DEFAULT_RANDSEED, DEFAULT_VERBLEVEL, SCIP_ALLOC, SCIP_CALL, SCIP_DEFAULT_FEASTOL, SCIP_DEFAULT_INFINITY, SCIP_INVALID, SCIP_NOMEMORY, SCIP_OKAY, SCIPnlpiGetData(), SCIPnlpiOracleCreate(), SCIPnlpiOracleSetInfinity(), SCIPnlpiOracleSetProblemName(), SCIPrandomCreate(), and TRUE.

◆ SCIP_DECL_NLPIFREEPROBLEM()

static SCIP_DECL_NLPIFREEPROBLEM ( nlpiFreeProblemWorhp  )
static

free a problem instance

input:

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

Definition at line 1034 of file nlpi_worhp.c.

References BMSfreeBlockMemory, BMSfreeMemoryArrayNull, freeWorhp(), invalidateSolution(), SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), SCIPnlpiOracleFree(), and SCIPrandomFree().

◆ SCIP_DECL_NLPIGETPROBLEMPOINTER()

static SCIP_DECL_NLPIGETPROBLEMPOINTER ( nlpiGetProblemPointerWorhp  )
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 1086 of file nlpi_worhp.c.

◆ SCIP_DECL_NLPIADDVARS()

static SCIP_DECL_NLPIADDVARS ( nlpiAddVarsWorhp  )
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 1105 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPIADDCONSTRAINTS()

static SCIP_DECL_NLPIADDCONSTRAINTS ( nlpiAddConstraintsWorhp  )
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
  • 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 1160 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPISETOBJECTIVE()

static SCIP_DECL_NLPISETOBJECTIVE ( nlpiSetObjectiveWorhp  )
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 1206 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPICHGVARBOUNDS()

static SCIP_DECL_NLPICHGVARBOUNDS ( nlpiChgVarBoundsWorhp  )
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 1241 of file nlpi_worhp.c.

References invalidateSolution(), REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPnlpiOracleChgVarBounds(), SCIPnlpiOracleGetVarLbs(), SCIPnlpiOracleGetVarUbs(), and TRUE.

◆ SCIP_DECL_NLPICHGCONSSIDES()

static SCIP_DECL_NLPICHGCONSSIDES ( nlpiChgConsSidesWorhp  )
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 1290 of file nlpi_worhp.c.

References invalidateSolution(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPnlpiOracleChgConsSides(), SCIPnlpiOracleGetConstraintLhs(), and SCIPnlpiOracleGetConstraintRhs().

◆ SCIP_DECL_NLPIDELVARSET()

static SCIP_DECL_NLPIDELVARSET ( nlpiDelVarSetWorhp  )
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 1330 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPIDELCONSSET()

static SCIP_DECL_NLPIDELCONSSET ( nlpiDelConstraintSetWorhp  )
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 1357 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPICHGLINEARCOEFS()

static SCIP_DECL_NLPICHGLINEARCOEFS ( nlpiChgLinearCoefsWorhp  )
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 1382 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPICHGQUADCOEFS()

static SCIP_DECL_NLPICHGQUADCOEFS ( nlpiChgQuadraticCoefsWorhp  )
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 1408 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPICHGEXPRTREE()

static SCIP_DECL_NLPICHGEXPRTREE ( nlpiChgExprtreeWorhp  )
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 1432 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPICHGNONLINCOEF()

static SCIP_DECL_NLPICHGNONLINCOEF ( nlpiChgNonlinCoefWorhp  )
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 1458 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPICHGOBJCONSTANT()

static SCIP_DECL_NLPICHGOBJCONSTANT ( nlpiChgObjConstantWorhp  )
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 1479 of file nlpi_worhp.c.

References SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgObjConstant().

◆ SCIP_DECL_NLPISETINITIALGUESS()

static SCIP_DECL_NLPISETINITIALGUESS ( nlpiSetInitialGuessWorhp  )
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 1501 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPISOLVE()

◆ SCIP_DECL_NLPIGETSOLSTAT()

static SCIP_DECL_NLPIGETSOLSTAT ( nlpiGetSolstatWorhp  )
static

gives solution status

input:

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

return: Solution Status

Definition at line 1763 of file nlpi_worhp.c.

◆ SCIP_DECL_NLPIGETTERMSTAT()

static SCIP_DECL_NLPIGETTERMSTAT ( nlpiGetTermstatWorhp  )
static

gives termination reason

input:

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

return: Termination Status

Definition at line 1780 of file nlpi_worhp.c.

◆ SCIP_DECL_NLPIGETSOLUTION()

static SCIP_DECL_NLPIGETSOLUTION ( nlpiGetSolutionWorhp  )
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 1805 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPIGETSTATISTICS()

static SCIP_DECL_NLPIGETSTATISTICS ( nlpiGetStatisticsWorhp  )
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 1846 of file nlpi_worhp.c.

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

◆ SCIP_DECL_NLPIGETWARMSTARTSIZE()

static SCIP_DECL_NLPIGETWARMSTARTSIZE ( nlpiGetWarmstartSizeWorhp  )
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 1868 of file nlpi_worhp.c.

References SCIP_OKAY.

◆ SCIP_DECL_NLPIGETWARMSTARTMEMO()

static SCIP_DECL_NLPIGETWARMSTARTMEMO ( nlpiGetWarmstartMemoWorhp  )
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 1888 of file nlpi_worhp.c.

References SCIP_OKAY.

◆ SCIP_DECL_NLPISETWARMSTARTMEMO()

static SCIP_DECL_NLPISETWARMSTARTMEMO ( nlpiSetWarmstartMemoWorhp  )
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 1905 of file nlpi_worhp.c.

References SCIP_OKAY.

◆ SCIP_DECL_NLPIGETINTPAR()

static SCIP_DECL_NLPIGETINTPAR ( nlpiGetIntParWorhp  )
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 1924 of file nlpi_worhp.c.

References 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 ( nlpiSetIntParWorhp  )
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 2011 of file nlpi_worhp.c.

References 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 ( nlpiGetRealParWorhp  )
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 2123 of file nlpi_worhp.c.

References 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_PARAMETERWRONGTYPE, SCIPerrorMessage, and SCIPnlpiGetData().

◆ SCIP_DECL_NLPISETREALPAR()

static SCIP_DECL_NLPISETREALPAR ( nlpiSetRealParWorhp  )
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 2210 of file nlpi_worhp.c.

References 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_PARAMETERWRONGTYPE, SCIPerrorMessage, and SCIPnlpiGetData().

◆ SCIP_DECL_NLPIGETSTRINGPAR()

static SCIP_DECL_NLPIGETSTRINGPAR ( nlpiGetStringParWorhp  )
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 2299 of file nlpi_worhp.c.

References SCIP_NLPPAR_OPTFILE, SCIP_OKAY, SCIP_PARAMETERWRONGTYPE, SCIPerrorMessage, SCIPmessagePrintWarning(), and SCIPnlpiGetData().

◆ SCIP_DECL_NLPISETSTRINGPAR()

static SCIP_DECL_NLPISETSTRINGPAR ( nlpiSetStringParWorhp  )
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 2325 of file nlpi_worhp.c.

References SCIP_NLPPAR_OPTFILE, SCIP_OKAY, SCIP_PARAMETERWRONGTYPE, SCIPerrorMessage, SCIPmessagePrintWarning(), and SCIPnlpiGetData().

◆ SCIP_DECL_NLPISETMESSAGEHDLR()

static SCIP_DECL_NLPISETMESSAGEHDLR ( nlpiSetMessageHdlrWorhp  )
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 2349 of file nlpi_worhp.c.

References SCIP_OKAY, and SCIPnlpiGetData().