Detailed Description
Worhp NLP interface.
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 "scip/pub_message.h"
#include <stdio.h>
#include <stdlib.h>
#include "worhp/worhp.h"
Go to the source code of this file.
Data Structures | |
struct | SCIP_NlpiProblem |
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 45 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 46 of file nlpi_worhp.c.
Referenced by SCIPcreateNlpSolverWorhp().
◆ NLPI_PRIORITY_SQP
#define NLPI_PRIORITY_SQP -2000 |
priority of NLP solver (SQP)
Definition at line 47 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 49 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 50 of file nlpi_worhp.c.
Referenced by SCIP_DECL_NLPISOLVE().
◆ DEFAULT_MAXITER
#define DEFAULT_MAXITER 3000 |
default iteration limit for Worhp
Definition at line 51 of file nlpi_worhp.c.
Referenced by SCIP_DECL_NLPICREATEPROBLEM().
◆ DEFAULT_RANDSEED
#define DEFAULT_RANDSEED 107 |
initial random seed
Definition at line 52 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 54 of file nlpi_worhp.c.
Referenced by SCIP_DECL_NLPISOLVE().
Function Documentation
◆ invalidateSolution()
|
static |
clears the last solution information
- Parameters
-
problem pointer to problem data structure
Definition at line 114 of file nlpi_worhp.c.
References SCIP_NlpiProblem::blkmem, BMSfreeBlockMemoryArrayNull, SCIP_NlpiProblem::lastdualcons, SCIP_NlpiProblem::lastdualconssize, SCIP_NlpiProblem::lastduallb, SCIP_NlpiProblem::lastduallbsize, SCIP_NlpiProblem::lastdualub, SCIP_NlpiProblem::lastdualubsize, SCIP_NlpiProblem::lastprimal, SCIP_NlpiProblem::lastprimalsize, SCIP_NlpiProblem::lastsolstat, SCIP_NlpiProblem::lasttermstat, NULL, SCIP_NLPSOLSTAT_UNKNOWN, and SCIP_NLPTERMSTAT_OTHER.
Referenced by evaluateWorhpRun(), SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPIADDVARS(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPICHGEXPRTREE(), SCIP_DECL_NLPICHGLINEARCOEFS(), SCIP_DECL_NLPICHGNONLINCOEF(), SCIP_DECL_NLPICHGQUADCOEFS(), SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPIDELCONSSET(), SCIP_DECL_NLPIDELVARSET(), SCIP_DECL_NLPIFREEPROBLEM(), and SCIP_DECL_NLPISETOBJECTIVE().
◆ evaluateWorhpRun()
|
static |
evaluate last Worhp run
- Parameters
-
problem pointer to problem data structure
Definition at line 136 of file nlpi_worhp.c.
References SCIP_NlpiProblem::blkmem, BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSduplicateBlockMemoryArray, SCIP_NlpiProblem::cnt, invalidateSolution(), SCIP_NlpiProblem::lastdualcons, SCIP_NlpiProblem::lastdualconssize, SCIP_NlpiProblem::lastduallb, SCIP_NlpiProblem::lastduallbsize, SCIP_NlpiProblem::lastdualub, SCIP_NlpiProblem::lastdualubsize, SCIP_NlpiProblem::lastprimal, SCIP_NlpiProblem::lastprimalsize, SCIP_NlpiProblem::lastsolstat, SCIP_NlpiProblem::lasttermstat, NULL, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::par, SCIP_ALLOC, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_EVALERR, SCIP_NLPTERMSTAT_ITLIM, SCIP_NLPTERMSTAT_LICERR, SCIP_NLPTERMSTAT_MEMERR, SCIP_NLPTERMSTAT_NUMERR, SCIP_NLPTERMSTAT_OKAY, SCIP_NLPTERMSTAT_OTHER, SCIP_NLPTERMSTAT_TILIM, SCIP_OKAY, SCIPdebugMessage, SCIPerrorMessage, and SCIP_NlpiProblem::wsp.
Referenced by SCIP_DECL_NLPISOLVE().
◆ userF()
|
static |
evaluates objective function and store the result in the corresponding Worhp data fields
- Parameters
-
problem pointer to problem data structure
Definition at line 423 of file nlpi_worhp.c.
References SCIP_NlpiProblem::blkmem, NULL, 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 |
evaluates constraints and store the result in the corresponding Worhp data fields
- Parameters
-
problem pointer to problem data structure
Definition at line 456 of file nlpi_worhp.c.
References SCIP_NlpiProblem::blkmem, NULL, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::oracle, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleEvalConstraintValues(), SCIPnlpiOracleGetNConstraints(), SCIPnlpiOracleGetNVars(), and SCIP_NlpiProblem::wsp.
Referenced by SCIP_DECL_NLPISOLVE().
◆ userDF()
|
static |
computes objective gradient and store the result in the corresponding Worhp data fields
- Parameters
-
problem pointer to problem data structure
Definition at line 488 of file nlpi_worhp.c.
References SCIP_NlpiProblem::blkmem, NULL, 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 |
computes jacobian matrix and store the result in the corresponding Worhp data fields
- Parameters
-
problem pointer to problem data structure
Definition at line 532 of file nlpi_worhp.c.
References SCIP_NlpiProblem::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, NULL, 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 |
computes hessian matrix and store the result in the corresponding Worhp data fields
- Parameters
-
problem pointer to problem data structure
Definition at line 577 of file nlpi_worhp.c.
References SCIP_NlpiProblem::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, NULL, 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 |
Worhp print callback function that does nothing
- Parameters
-
mode the mode s a string
Definition at line 633 of file nlpi_worhp.c.
Referenced by SCIP_DECL_NLPISOLVE(), and SCIPcreateNlpSolverWorhp().
◆ initWorhp()
|
static |
initialize Worhp data
- Parameters
-
nlpi pointer to NLPI datastructure problem pointer to problem data structure
Definition at line 642 of file nlpi_worhp.c.
References BMScopyMemoryArray, SCIP_NlpiProblem::cnt, FALSE, SCIP_NlpiProblem::firstrun, NULL, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::oracle, SCIP_NlpiProblem::par, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPdebugPrintf, SCIPerrorMessage, SCIPmessagePrintWarning(), SCIPnlpiGetData(), SCIPnlpiOracleGetConstraintLhs(), SCIPnlpiOracleGetConstraintRhs(), SCIPnlpiOracleGetHessianLagSparsity(), SCIPnlpiOracleGetJacobianSparsity(), SCIPnlpiOracleGetNConstraints(), SCIPnlpiOracleGetNVars(), SCIPnlpiOracleGetVarLbs(), SCIPnlpiOracleGetVarUbs(), TRUE, and SCIP_NlpiProblem::wsp.
Referenced by SCIP_DECL_NLPISOLVE().
◆ updateWorhp()
|
static |
update Worhp data
- Parameters
-
problem pointer to problem data structure
Definition at line 847 of file nlpi_worhp.c.
References SCIP_NlpiProblem::cnt, NULL, SCIP_NlpiProblem::opt, SCIP_NlpiProblem::oracle, SCIP_NlpiProblem::par, SCIP_OKAY, SCIP_Real, SCIPnlpiOracleGetConstraintLhs(), SCIPnlpiOracleGetConstraintRhs(), SCIPnlpiOracleGetNConstraints(), SCIPnlpiOracleGetNVars(), SCIPnlpiOracleGetVarLbs(), SCIPnlpiOracleGetVarUbs(), and SCIP_NlpiProblem::wsp.
Referenced by SCIP_DECL_NLPISOLVE().
◆ freeWorhp()
|
static |
frees Worhp data
- Parameters
-
problem pointer to problem data structure
Definition at line 887 of file nlpi_worhp.c.
References SCIP_NlpiProblem::cnt, NULL, 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 |
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 918 of file nlpi_worhp.c.
References NULL, SCIP_CALL, SCIP_NLPPAR_INFINITY, SCIP_OKAY, SCIPcreateNlpSolverWorhp(), SCIPnlpiGetData(), SCIPnlpiSetMessageHdlr(), and SCIPnlpiSetRealPar().
◆ SCIP_DECL_NLPIFREE()
|
static |
destructor of NLP interface to free nlpi data
input:
- nlpi datastructure for solver interface
Definition at line 943 of file nlpi_worhp.c.
References BMSfreeBlockMemory, NULL, SCIP_OKAY, and SCIPnlpiGetData().
◆ SCIP_DECL_NLPIGETSOLVERPOINTER()
|
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_worhp.c.
References NULL.
◆ SCIP_DECL_NLPICREATEPROBLEM()
|
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 983 of file nlpi_worhp.c.
References BMSallocBlockMemory, BMSclearMemory, DEFAULT_MAXITER, DEFAULT_RANDSEED, DEFAULT_VERBLEVEL, NULL, 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 |
free a problem instance
input:
- nlpi datastructure for solver interface
- problem pointer where problem data is stored
Definition at line 1035 of file nlpi_worhp.c.
References BMSfreeBlockMemory, BMSfreeMemoryArrayNull, freeWorhp(), invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetData(), SCIPnlpiOracleFree(), and SCIPrandomFree().
◆ SCIP_DECL_NLPIGETPROBLEMPOINTER()
|
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 1087 of file nlpi_worhp.c.
References NULL.
◆ SCIP_DECL_NLPIADDVARS()
|
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 1106 of file nlpi_worhp.c.
References BMSfreeMemoryArrayNull, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleAddVars(), and TRUE.
◆ SCIP_DECL_NLPIADDCONSTRAINTS()
|
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 1161 of file nlpi_worhp.c.
References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleAddConstraints(), and TRUE.
◆ SCIP_DECL_NLPISETOBJECTIVE()
|
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 1207 of file nlpi_worhp.c.
References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleGetConstraintDegree(), SCIPnlpiOracleSetObjective(), and TRUE.
◆ SCIP_DECL_NLPICHGVARBOUNDS()
|
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 1242 of file nlpi_worhp.c.
References invalidateSolution(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPnlpiOracleChgVarBounds(), SCIPnlpiOracleGetVarLbs(), SCIPnlpiOracleGetVarUbs(), and TRUE.
◆ SCIP_DECL_NLPICHGCONSSIDES()
|
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 1291 of file nlpi_worhp.c.
References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPnlpiOracleChgConsSides(), SCIPnlpiOracleGetConstraintLhs(), and SCIPnlpiOracleGetConstraintRhs().
◆ SCIP_DECL_NLPIDELVARSET()
|
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 1331 of file nlpi_worhp.c.
References BMSfreeMemoryArrayNull, invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleDelVarSet(), and TRUE.
◆ SCIP_DECL_NLPIDELCONSSET()
|
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 1358 of file nlpi_worhp.c.
References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleDelConsSet(), and TRUE.
◆ SCIP_DECL_NLPICHGLINEARCOEFS()
|
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 1383 of file nlpi_worhp.c.
References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleChgLinearCoefs(), and TRUE.
◆ SCIP_DECL_NLPICHGQUADCOEFS()
|
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 1409 of file nlpi_worhp.c.
References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleChgQuadCoefs(), and TRUE.
◆ SCIP_DECL_NLPICHGEXPRTREE()
|
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 1433 of file nlpi_worhp.c.
References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiOracleChgExprtree(), and TRUE.
◆ SCIP_DECL_NLPICHGNONLINCOEF()
|
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 1459 of file nlpi_worhp.c.
References invalidateSolution(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgExprParam().
◆ SCIP_DECL_NLPICHGOBJCONSTANT()
|
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 1480 of file nlpi_worhp.c.
References NULL, SCIP_CALL, SCIP_OKAY, and SCIPnlpiOracleChgObjConstant().
◆ SCIP_DECL_NLPISETINITIALGUESS()
|
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 1502 of file nlpi_worhp.c.
References BMScopyMemoryArray, BMSduplicateMemoryArray, BMSfreeMemoryArrayNull, NULL, SCIP_NOMEMORY, SCIP_OKAY, and SCIPnlpiOracleGetNVars().
◆ SCIP_DECL_NLPISOLVE()
|
static |
tries to solve NLP
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
Definition at line 1535 of file nlpi_worhp.c.
References BMScopyMemoryArray, DEFAULT_SCALEDKKT, evaluateWorhpRun(), FALSE, freeWorhp(), initWorhp(), MAX, MAXPERTURB, MIN, noprint(), NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_NUMERR, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPmessagePrintWarning(), SCIPnlpiGetData(), SCIPnlpiOracleGetVarLbs(), SCIPnlpiOracleGetVarUbs(), SCIPnlpiOraclePrintProblem(), SCIPrandomGetReal(), TRUE, updateWorhp(), userDF(), userDG(), userF(), userG(), and userHM().
◆ SCIP_DECL_NLPIGETSOLSTAT()
|
static |
gives solution status
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
return: Solution Status
Definition at line 1764 of file nlpi_worhp.c.
References NULL.
◆ SCIP_DECL_NLPIGETTERMSTAT()
|
static |
gives termination reason
input:
- nlpi datastructure for solver interface
- problem datastructure for problem instance
return: Termination Status
Definition at line 1781 of file nlpi_worhp.c.
References NULL.
◆ SCIP_DECL_NLPIGETSOLUTION()
|
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 1806 of file nlpi_worhp.c.
References NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, and SCIPnlpiOracleEvalObjectiveValue().
◆ SCIP_DECL_NLPIGETSTATISTICS()
|
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 1847 of file nlpi_worhp.c.
References NULL, SCIP_OKAY, SCIPnlpStatisticsSetNIterations(), and SCIPnlpStatisticsSetTotalTime().
◆ SCIP_DECL_NLPIGETWARMSTARTSIZE()
|
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 1869 of file nlpi_worhp.c.
References SCIP_OKAY.
◆ SCIP_DECL_NLPIGETWARMSTARTMEMO()
|
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 1889 of file nlpi_worhp.c.
References SCIP_OKAY.
◆ SCIP_DECL_NLPISETWARMSTARTMEMO()
|
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 1906 of file nlpi_worhp.c.
References SCIP_OKAY.
◆ SCIP_DECL_NLPIGETINTPAR()
|
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 1925 of file nlpi_worhp.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 |
sets integer parameter of NLP
input:
- nlpi NLP interface structure
- problem datastructure for problem instance
- type parameter number
- ival parameter value
Definition at line 2012 of file nlpi_worhp.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, SCIP_PARAMETERWRONGVAL, SCIPdebugMessage, and SCIPerrorMessage.
◆ SCIP_DECL_NLPIGETREALPAR()
|
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 2124 of file nlpi_worhp.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_PARAMETERWRONGTYPE, SCIPerrorMessage, and SCIPnlpiGetData().
◆ SCIP_DECL_NLPISETREALPAR()
|
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 2211 of file nlpi_worhp.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_PARAMETERWRONGTYPE, SCIPerrorMessage, and SCIPnlpiGetData().
◆ SCIP_DECL_NLPIGETSTRINGPAR()
|
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 2300 of file nlpi_worhp.c.
References SCIP_NLPPAR_OPTFILE, SCIP_OKAY, SCIP_PARAMETERWRONGTYPE, SCIPerrorMessage, SCIPmessagePrintWarning(), and SCIPnlpiGetData().
◆ SCIP_DECL_NLPISETSTRINGPAR()
|
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 2326 of file nlpi_worhp.c.
References SCIP_NLPPAR_OPTFILE, SCIP_OKAY, SCIP_PARAMETERWRONGTYPE, SCIPerrorMessage, SCIPmessagePrintWarning(), and SCIPnlpiGetData().
◆ SCIP_DECL_NLPISETMESSAGEHDLR()
|
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 2350 of file nlpi_worhp.c.
References NULL, SCIP_OKAY, and SCIPnlpiGetData().