Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

NLP management methods and datastructures.

Author
Thorsten Gellermann
Stefan Vigerske

In NLP management, we have to differ between the current NLP and the NLPI problem stored in the NLP solver. All NLP methods affect the current NLP only. Before solving the current NLP with the NLP solver, the NLP solvers data has to be updated to the current NLP with a call to nlpFlush().

Definition in file nlp.c.

#include "nlpi/nlpi.h"
#include "nlpi/pub_expr.h"
#include "nlpi/struct_expr.h"
#include "scip/clock.h"
#include "scip/event.h"
#include "scip/intervalarith.h"
#include "scip/nlp.h"
#include "scip/primal.h"
#include "scip/pub_event.h"
#include "scip/pub_lp.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_misc_sort.h"
#include "scip/pub_nlp.h"
#include "scip/pub_var.h"
#include "scip/set.h"
#include "scip/sol.h"
#include "scip/struct_nlp.h"
#include "scip/struct_scip.h"
#include "scip/struct_set.h"
#include "scip/struct_stat.h"
#include "scip/var.h"
#include <string.h>

Go to the source code of this file.

Macros

#define EVENTHDLR_NAME   "nlpEventHdlr"
 
#define EVENTHDLR_DESC   "handles all events necessary for maintaining NLP data"
 
#define ADDNAMESTONLPI   0
 

Functions

BMS_BLKMEMSCIPblkmem (SCIP *scip)
 
static SCIP_DECL_EVENTEXEC (eventExecNlp)
 
static SCIP_RETCODE nlpRowChanged (SCIP_NLP *nlp, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLROW *nlrow)
 
SCIP_VAR ** SCIPexprtreeGetVars (SCIP_EXPRTREE *tree)
 
SCIP_RETCODE SCIPexprtreeSetVars (SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
 
SCIP_RETCODE SCIPexprtreeAddVars (SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
 
SCIP_RETCODE SCIPexprtreePrintWithNames (SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
 
int SCIPexprtreeFindVar (SCIP_EXPRTREE *tree, SCIP_VAR *var)
 
SCIP_RETCODE SCIPexprtreeRemoveFixedVars (SCIP_EXPRTREE *tree, SCIP_SET *set, SCIP_Bool *changed, int *varpos, int *newvarsstart)
 
static SCIP_RETCODE nlrowLinearCoefChanged (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real coef, SCIP_NLP *nlp)
 
static SCIP_RETCODE nlrowQuadElemChanged (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_QUADELEM quadelem, SCIP_NLP *nlp)
 
static SCIP_RETCODE nlrowExprtreeChanged (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
 
static SCIP_RETCODE nlrowExprtreeParamChanged (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, int paramidx, SCIP_NLP *nlp)
 
static SCIP_RETCODE nlrowSideChanged (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
 
static SCIP_RETCODE nlrowConstantChanged (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
 
static void nlrowSortLinear (SCIP_NLROW *nlrow)
 
static int nlrowSearchLinearCoef (SCIP_NLROW *nlrow, SCIP_VAR *var)
 
static void nlrowMoveLinearCoef (SCIP_NLROW *nlrow, int oldpos, int newpos)
 
static SCIP_RETCODE nlrowAddLinearCoef (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real coef)
 
static SCIP_RETCODE nlrowAddToLinearCoef (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real coef, SCIP_Bool removefixed)
 
static SCIP_RETCODE nlrowDelLinearCoefPos (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos)
 
static SCIP_RETCODE nlrowChgLinearCoefPos (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos, SCIP_Real coef)
 
static SCIP_RETCODE nlrowSetupQuadVarsHash (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem)
 
static void nlrowSortQuadElem (SCIP_NLROW *nlrow)
 
static int nlrowSearchQuadElem (SCIP_NLROW *nlrow, int idx1, int idx2)
 
static void nlrowMoveQuadElement (SCIP_NLROW *nlrow, int oldpos, int newpos)
 
static SCIP_RETCODE nlrowAddQuadElement (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_QUADELEM elem)
 
static SCIP_RETCODE nlrowDelQuadElemPos (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos)
 
static SCIP_RETCODE nlrowChgQuadElemPos (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos, SCIP_Real coef)
 
static SCIP_RETCODE nlrowCalcActivityBounds (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat)
 
static SCIP_RETCODE nlrowRemoveFixedLinearCoefPos (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos)
 
static SCIP_RETCODE nlrowRemoveFixedLinearCoefs (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
 
static SCIP_RETCODE nlrowRemoveFixedQuadVars (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
 
static SCIP_RETCODE nlrowRemoveFixedExprtreeVars (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
 
static SCIP_RETCODE nlrowRemoveFixedVar (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var)
 
SCIP_RETCODE SCIPnlrowCreate (SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvars, SCIP_VAR **quadvars, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_EXPRTREE *exprtree, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
 
SCIP_RETCODE SCIPnlrowCreateCopy (SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_NLROW *sourcenlrow)
 
SCIP_RETCODE SCIPnlrowCreateFromRow (SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_ROW *row)
 
SCIP_RETCODE SCIPnlrowFree (SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem)
 
SCIP_RETCODE SCIPnlrowPrint (SCIP_NLROW *nlrow, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
 
void SCIPnlrowCapture (SCIP_NLROW *nlrow)
 
SCIP_RETCODE SCIPnlrowRelease (SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
SCIP_RETCODE SCIPnlrowEnsureLinearSize (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
SCIP_RETCODE SCIPnlrowAddLinearCoef (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real val)
 
SCIP_RETCODE SCIPnlrowDelLinearCoef (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var)
 
SCIP_RETCODE SCIPnlrowChgLinearCoef (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_RETCODE SCIPnlrowEnsureQuadVarsSize (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
SCIP_RETCODE SCIPnlrowAddQuadVar (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var)
 
SCIP_RETCODE SCIPnlrowEnsureQuadElementsSize (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
SCIP_RETCODE SCIPnlrowAddQuadElement (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_QUADELEM elem)
 
SCIP_RETCODE SCIPnlrowDelQuadElement (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int idx1, int idx2)
 
SCIP_RETCODE SCIPnlrowChgQuadElem (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_QUADELEM elem)
 
SCIP_RETCODE SCIPnlrowChgExprtree (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_EXPRTREE *exprtree)
 
SCIP_RETCODE SCIPnlrowChgExprtreeParam (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int paramidx, SCIP_Real paramval)
 
SCIP_RETCODE SCIPnlrowChgExprtreeParams (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *paramvals)
 
SCIP_RETCODE SCIPnlrowChgConstant (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real constant)
 
SCIP_RETCODE SCIPnlrowChgLhs (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real lhs)
 
SCIP_RETCODE SCIPnlrowChgRhs (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real rhs)
 
SCIP_RETCODE SCIPnlrowRemoveFixedVars (SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPnlrowRecalcNLPActivity (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPnlrowGetNLPActivity (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *activity)
 
SCIP_RETCODE SCIPnlrowGetNLPFeasibility (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *feasibility)
 
SCIP_RETCODE SCIPnlrowRecalcPseudoActivity (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_RETCODE SCIPnlrowGetPseudoActivity (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudoactivity)
 
SCIP_RETCODE SCIPnlrowGetPseudoFeasibility (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudofeasibility)
 
SCIP_RETCODE SCIPnlrowGetSolActivity (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Real *activity)
 
SCIP_RETCODE SCIPnlrowGetSolFeasibility (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Real *feasibility)
 
SCIP_RETCODE SCIPnlrowGetActivityBounds (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *minactivity, SCIP_Real *maxactivity)
 
SCIP_RETCODE SCIPnlrowIsRedundant (SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool *isredundant)
 
SCIP_Real SCIPnlrowGetConstant (SCIP_NLROW *nlrow)
 
int SCIPnlrowGetNLinearVars (SCIP_NLROW *nlrow)
 
SCIP_VAR ** SCIPnlrowGetLinearVars (SCIP_NLROW *nlrow)
 
SCIP_RealSCIPnlrowGetLinearCoefs (SCIP_NLROW *nlrow)
 
int SCIPnlrowGetNQuadVars (SCIP_NLROW *nlrow)
 
SCIP_VAR ** SCIPnlrowGetQuadVars (SCIP_NLROW *nlrow)
 
int SCIPnlrowSearchQuadVar (SCIP_NLROW *nlrow, SCIP_VAR *var)
 
int SCIPnlrowGetNQuadElems (SCIP_NLROW *nlrow)
 
SCIP_QUADELEMSCIPnlrowGetQuadElems (SCIP_NLROW *nlrow)
 
void SCIPnlrowGetQuadData (SCIP_NLROW *nlrow, int *nquadvars, SCIP_VAR ***quadvars, int *nquadelems, SCIP_QUADELEM **quadelems)
 
SCIP_EXPRTREESCIPnlrowGetExprtree (SCIP_NLROW *nlrow)
 
SCIP_Real SCIPnlrowGetLhs (SCIP_NLROW *nlrow)
 
SCIP_Real SCIPnlrowGetRhs (SCIP_NLROW *nlrow)
 
SCIP_EXPRCURV SCIPnlrowGetCurvature (SCIP_NLROW *nlrow)
 
void SCIPnlrowSetCurvature (SCIP_NLROW *nlrow, SCIP_EXPRCURV curvature)
 
const char * SCIPnlrowGetName (SCIP_NLROW *nlrow)
 
int SCIPnlrowGetNLPPos (SCIP_NLROW *nlrow)
 
SCIP_Bool SCIPnlrowIsInNLP (SCIP_NLROW *nlrow)
 
SCIP_Real SCIPnlrowGetDualsol (SCIP_NLROW *nlrow)
 
static SCIP_RETCODE nlpAddNlRows (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, int nnlrows, SCIP_NLROW **nlrows)
 
static void nlpMoveNlrow (SCIP_NLP *nlp, int oldpos, int newpos)
 
static SCIP_RETCODE nlpDelNlRowPos (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int pos)
 
static SCIP_RETCODE nlpUpdateVarBounds (SCIP_NLP *nlp, SCIP_SET *set, SCIP_VAR *var, SCIP_Bool tightened)
 
static SCIP_RETCODE nlpUpdateObjCoef (SCIP_NLP *nlp, SCIP_VAR *var)
 
static SCIP_RETCODE nlpAddVars (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int nvars, SCIP_VAR **vars)
 
static SCIP_RETCODE nlpMoveVar (SCIP_NLP *nlp, int oldpos, int newpos)
 
static SCIP_RETCODE nlpDelVarPos (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, int pos)
 
static SCIP_RETCODE nlpRemoveFixedVar (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_VAR *var)
 
static SCIP_RETCODE nlpSetupNlpiIndices (SCIP_NLP *nlp, SCIP_SET *set, SCIP_NLROW *nlrow, int **linidxs, SCIP_QUADELEM **quadelems, int **nlinidxs)
 
static SCIP_RETCODE nlpEnsureVarsSolverSize (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
static SCIP_RETCODE nlpEnsureNlRowsSolverSize (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
static SCIP_RETCODE nlpFlushNlRowDeletions (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
static SCIP_RETCODE nlpFlushVarDeletions (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
static SCIP_RETCODE nlpFlushNlRowAdditions (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
static SCIP_RETCODE nlpFlushVarAdditions (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
static SCIP_RETCODE nlpFlushObjective (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
static SCIP_RETCODE nlpSolve (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat)
 
static SCIP_RETCODE nlpCalcFracVars (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_RETCODE SCIPnlpInclude (SCIP_SET *set, BMS_BLKMEM *blkmem)
 
SCIP_RETCODE SCIPnlpCreate (SCIP_NLP **nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, const char *name, int nvars_estimate)
 
SCIP_RETCODE SCIPnlpFree (SCIP_NLP **nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
 
SCIP_RETCODE SCIPnlpReset (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
 
SCIP_Bool SCIPnlpHasCurrentNodeNLP (SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPnlpEnsureVarsSize (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
SCIP_RETCODE SCIPnlpAddVar (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var)
 
SCIP_RETCODE SCIPnlpAddVars (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int nvars, SCIP_VAR **vars)
 
SCIP_RETCODE SCIPnlpDelVar (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_VAR *var)
 
SCIP_RETCODE SCIPnlpEnsureNlRowsSize (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
 
SCIP_RETCODE SCIPnlpAddNlRow (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLROW *nlrow)
 
SCIP_RETCODE SCIPnlpAddNlRows (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, int nnlrows, SCIP_NLROW **nlrows)
 
SCIP_RETCODE SCIPnlpDelNlRow (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_NLROW *nlrow)
 
SCIP_RETCODE SCIPnlpFlush (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
SCIP_RETCODE SCIPnlpSolve (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat)
 
SCIP_Real SCIPnlpGetObjval (SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPnlpGetPseudoObjval (SCIP_NLP *nlp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudoobjval)
 
SCIP_RETCODE SCIPnlpGetFracVars (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR ***fracvars, SCIP_Real **fracvarssol, SCIP_Real **fracvarsfrac, int *nfracvars, int *npriofracvars)
 
SCIP_RETCODE SCIPnlpRemoveRedundantNlRows (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_RETCODE SCIPnlpSetInitialGuess (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_Real *initguess)
 
SCIP_RETCODE SCIPnlpWrite (SCIP_NLP *nlp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *fname)
 
SCIP_VAR ** SCIPnlpGetVars (SCIP_NLP *nlp)
 
int SCIPnlpGetNVars (SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPnlpGetVarsNonlinearity (SCIP_NLP *nlp, int *nlcount)
 
SCIP_Bool SCIPnlpHasContinuousNonlinearity (SCIP_NLP *nlp)
 
SCIP_RealSCIPnlpGetVarsLbDualsol (SCIP_NLP *nlp)
 
SCIP_RealSCIPnlpGetVarsUbDualsol (SCIP_NLP *nlp)
 
SCIP_NLROW ** SCIPnlpGetNlRows (SCIP_NLP *nlp)
 
int SCIPnlpGetNNlRows (SCIP_NLP *nlp)
 
SCIP_NLPISCIPnlpGetNLPI (SCIP_NLP *nlp)
 
SCIP_NLPIPROBLEMSCIPnlpGetNLPIProblem (SCIP_NLP *nlp)
 
SCIP_Bool SCIPnlpIsDiving (SCIP_NLP *nlp)
 
SCIP_NLPSOLSTAT SCIPnlpGetSolstat (SCIP_NLP *nlp)
 
SCIP_NLPTERMSTAT SCIPnlpGetTermstat (SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPnlpGetStatistics (SCIP_NLP *nlp, SCIP_NLPSTATISTICS *statistics)
 
SCIP_Bool SCIPnlpHasSolution (SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPnlpGetIntPar (SCIP_NLP *nlp, SCIP_NLPPARAM type, int *ival)
 
SCIP_RETCODE SCIPnlpSetIntPar (SCIP_NLP *nlp, SCIP_NLPPARAM type, int ival)
 
SCIP_RETCODE SCIPnlpGetRealPar (SCIP_NLP *nlp, SCIP_NLPPARAM type, SCIP_Real *dval)
 
SCIP_RETCODE SCIPnlpSetRealPar (SCIP_NLP *nlp, SCIP_NLPPARAM type, SCIP_Real dval)
 
SCIP_RETCODE SCIPnlpGetStringPar (SCIP_NLP *nlp, SCIP_NLPPARAM type, const char **sval)
 
SCIP_RETCODE SCIPnlpSetStringPar (SCIP_NLP *nlp, SCIP_NLPPARAM type, const char *sval)
 
SCIP_RETCODE SCIPnlpStartDive (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
SCIP_RETCODE SCIPnlpEndDive (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
 
SCIP_RETCODE SCIPnlpChgVarObjDive (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_RETCODE SCIPnlpChgVarBoundsDive (SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real lb, SCIP_Real ub)
 
SCIP_RETCODE SCIPnlpChgVarsBoundsDive (SCIP_NLP *nlp, SCIP_SET *set, int nvars, SCIP_VAR **vars, SCIP_Real *lbs, SCIP_Real *ubs)
 
SCIP_Bool SCIPnlpIsDivingObjChanged (SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPnlpSolveDive (SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat)
 

Macro Definition Documentation

◆ EVENTHDLR_NAME

#define EVENTHDLR_NAME   "nlpEventHdlr"

name of NLP event handler that catches variable events

Definition at line 61 of file nlp.c.

Referenced by SCIPnlpCreate(), and SCIPnlpInclude().

◆ EVENTHDLR_DESC

#define EVENTHDLR_DESC   "handles all events necessary for maintaining NLP data"

description of NLP event handler

Definition at line 62 of file nlp.c.

Referenced by SCIPnlpInclude().

◆ ADDNAMESTONLPI

#define ADDNAMESTONLPI   0

whether to give variable and row names to NLPI

Definition at line 63 of file nlp.c.

Function Documentation

◆ SCIPblkmem()

BMS_BLKMEM* SCIPblkmem ( SCIP scip)

returns block memory to use at the current time

Returns
the block memory to use at the current time.
Parameters
scipSCIP data structure

Definition at line 48 of file scip_mem.c.

Referenced by addScenarioVarsAndConsToProb(), addVarCardinality(), appendVarCardinality(), applyHeur(), applyNlobbt(), buildMod2Matrix(), checkConsnames(), checkCurvatureExpensive(), checkOverloadViaThetaTree(), checkSubproblemConvexity(), checkSystemGF2(), checkVarnames(), collectBranchingCands(), computeED(), computeInteriorPoint(), computeStandardNLPFeasibilityCut(), computeStandardNLPOptimalityCut(), computeSymmetryGroup(), consdataAddExprtrees(), consdataCreate(), copyConsPseudoboolean(), copyProb(), copyVars(), createAndSplitProblem(), createAuxiliaryNonlinearSubproblem(), createConsFromQuadTerm(), createCoveringProblem(), createExprtreeFromMonomial(), createMasterVarMapping(), createNLP(), createNlRow(), createPattern(), createReaderdata(), createStartingData(), createSubSCIP(), createTcliqueGraph(), createVariableMappings(), destroyMod2Matrix(), determineSymmetry(), doCopy(), doScipCreate(), doSeparation(), doSolveSubMIP(), dualBoundStrengthening(), findCumulativeConss(), freeSubSCIP(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), heurExec(), initAlternativeLP(), initConcsolver(), initConflictgraph(), initData(), inithashmapandtable(), initImplGraphSOS1(), initPropdata(), initSepaData(), initSepaDataCreateVred(), mod2MatrixAddCol(), mod2MatrixAddTransRow(), mod2matrixPreprocessColumns(), mod2matrixPreprocessRows(), mod2matrixRemoveCol(), mod2rowAddRow(), nodepairqueueCreate(), preprocessCliques(), presoldataInitHashtables(), presolRoundVarsSOS1(), presolveDisaggregate(), presolveFindDuplicates(), processHashlists(), readExpression(), readNonlinearExprs(), readPolynomial(), reformMonomial(), reformulate(), relabelOrderConsistent(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeFixedVariables(), removeRedundantConssAndNonzeros(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSPARSE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_CONSTRANS(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEURINIT(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PROPEXITSOL(), SCIP_DECL_PROPINITSOL(), SCIP_DECL_READERREAD(), SCIP_DECL_READERWRITE(), SCIP_DECL_RELAXEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPaddNlRow(), SCIPaddObjoffset(), SCIPapplyProximity(), SCIPbendersApplyDecomposition(), SCIPbendersExit(), SCIPbendersInit(), SCIPbendersMergeSubproblemIntoMaster(), SCIPbendersStoreCut(), SCIPcalcCliquePartition(), SCIPchgConsName(), SCIPchgVarName(), SCIPchgVarObjDiveNLP(), SCIPcomputeComponentsSym(), SCIPcopyConflicts(), SCIPcopyConss(), SCIPcopyOrigConss(), SCIPcreateBanditEpsgreedy(), SCIPcreateBanditExp3(), SCIPcreateBanditUcb(), SCIPcreateBoolarray(), SCIPcreateConsBivariate(), SCIPcreateConsCardinality(), SCIPcreateConsIndicator(), SCIPcreateConsLinking(), SCIPcreateConsQuadratic(), SCIPcreateDecomp(), SCIPcreateIntarray(), SCIPcreateProb(), SCIPcreatePtrarray(), SCIPcreateRandom(), SCIPcreateRealarray(), SCIPcreateWorstCaseProfile(), SCIPdelNlRow(), SCIPendDiveNLP(), SCIPexitSolveDecompstore(), SCIPfreeBandit(), SCIPfreeDecomp(), SCIPfreeProb(), SCIPfreeRandom(), SCIPgetConsCopy(), SCIPgetNLPFracVars(), SCIPgetVarCopy(), SCIPincludeConshdlrBivariate(), SCIPincludeConshdlrNonlinear(), SCIPincludeDefaultPlugins(), SCIPincrementConcurrentTime(), SCIPinitVarValueBranchStats(), SCIPremoveVarFromGlobalStructures(), SCIPsetCopyPlugins(), SCIPsetNLPInitialGuess(), SCIPsetNLPInitialGuessSol(), SCIPsolveDiveNLP(), SCIPsolveNLP(), SCIPstartDiveNLP(), SCIPvariableGraphCreate(), SCIPvisualizeConsCumulative(), SCIPwriteCliqueGraph(), SCIPwriteLp(), SCIPwriteMps(), SCIPwritePip(), searchEcAggrWithCliques(), setupAndSolve(), setupAndSolveFiniteSolSubscip(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipLocalbranching(), setupAndSolveSubscipMutation(), setupAndSolveSubscipOneopt(), setupAndSolveSubscipRapidlearning(), setupAndSolveSubscipTrustregion(), setUpEvents(), setupProbingSCIP(), setupProblem(), setupSubscipLpface(), solveSubproblem(), subtreeSumGapCreate(), wrapperDins(), wrapperRins(), writeBounds(), writeOpb(), and writeOpbConstraints().

◆ SCIP_DECL_EVENTEXEC()

◆ nlpRowChanged()

static SCIP_RETCODE nlpRowChanged ( SCIP_NLP nlp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLROW nlrow 
)
static

announces, that a row of the NLP was modified adjusts status of current solution calling method has to ensure that change is passed to the NLPI!

Parameters
nlpcurrent NLP data
setglobal SCIP settings
statproblem statistics data
nlrownonlinear row which was changed

Definition at line 3469 of file nlp.c.

References SCIP_Nlp::indiving, SCIP_NlRow::nlpindex, NULL, SCIP_CALL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPnlrowGetNLPFeasibility(), SCIPsetIsFeasNegative(), and SCIP_Nlp::solstat.

Referenced by nlrowConstantChanged(), nlrowExprtreeChanged(), nlrowExprtreeParamChanged(), nlrowLinearCoefChanged(), nlrowQuadElemChanged(), and nlrowSideChanged().

◆ SCIPexprtreeRemoveFixedVars()

SCIP_RETCODE SCIPexprtreeRemoveFixedVars ( SCIP_EXPRTREE tree,
SCIP_SET set,
SCIP_Bool changed,
int *  varpos,
int *  newvarsstart 
)

removes fixed variables from an expression tree, so that at exit all variables are active

Parameters
treeexpression tree
setglobal SCIP settings
changedbuffer to store whether the tree was changed, i.e., whether there was a fixed variable
varposarray of length at least tree->nvars to store new indices of previously existing variables in expression tree, or -1 if variable was removed; set to NULL if not of interest
newvarsstartbuffer to store index in tree->vars array where new variables begin, or NULL if not of interest

Definition at line 225 of file nlp.c.

References SCIP_ExprTree::blkmem, BMSallocBlockMemoryArray, BMSclearMemoryArray, BMSfreeBlockMemoryArray, BMSreallocBlockMemoryArray, FALSE, NULL, SCIP_ExprTree::nvars, SCIP_ExprTree::root, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprFreeDeep(), SCIPexprReindexVars(), SCIPexprtreeAddVars(), SCIPexprtreeRemoveFixedVars(), SCIPexprtreeSubstituteVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImageInt(), SCIPhashmapInsertInt(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarIsActive(), TRUE, and SCIP_ExprTree::vars.

Referenced by nlrowRemoveFixedExprtreeVars(), SCIPexprtreeRemoveFixedVars(), and SCIPnlrowChgExprtree().

◆ nlrowLinearCoefChanged()

static SCIP_RETCODE nlrowLinearCoefChanged ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR var,
SCIP_Real  coef,
SCIP_NLP nlp 
)
static

announces, that the given linear coefficient in the constraint matrix changed

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
varvariable which coefficient changed
coefnew coefficient of variable, 0.0 if deleted
nlpcurrent NLP data

Definition at line 498 of file nlp.c.

References SCIP_NlRow::activity, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), NULL, SCIP_Nlp::problem, SCIP_NlRow::pseudoactivity, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpiChgLinearCoefs(), SCIP_Nlp::solver, SCIP_NlRow::validactivitybdsdomchg, SCIP_NlRow::validactivitynlp, SCIP_NlRow::validpsactivitydomchg, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.

Referenced by nlrowAddLinearCoef(), nlrowChgLinearCoefPos(), nlrowDelLinearCoefPos(), and nlrowRemoveFixedLinearCoefPos().

◆ nlrowQuadElemChanged()

static SCIP_RETCODE nlrowQuadElemChanged ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_QUADELEM  quadelem,
SCIP_NLP nlp 
)
static

◆ nlrowExprtreeChanged()

◆ nlrowExprtreeParamChanged()

static SCIP_RETCODE nlrowExprtreeParamChanged ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
int  paramidx,
SCIP_NLP nlp 
)
static

announces, that a parameter in an expression tree has changed

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
paramidxindex of parameter which has changed, or -1 if all changed
nlpcurrent NLP data

Definition at line 688 of file nlp.c.

References SCIP_NlRow::activity, SCIP_NlRow::exprtree, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), NULL, SCIP_Nlp::problem, SCIP_NlRow::pseudoactivity, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPexprtreeGetNParams(), SCIPexprtreeGetParamVals(), SCIPnlpiChgNonlinCoef(), SCIP_Nlp::solver, SCIP_NlRow::validactivitybdsdomchg, SCIP_NlRow::validactivitynlp, and SCIP_NlRow::validpsactivitydomchg.

Referenced by SCIPnlrowChgExprtreeParam(), and SCIPnlrowChgExprtreeParams().

◆ nlrowSideChanged()

static SCIP_RETCODE nlrowSideChanged ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp 
)
static

notifies nonlinear row, that its sides were changed

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data

Definition at line 745 of file nlp.c.

References SCIP_NlRow::constant, SCIP_NlRow::lhs, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), NULL, SCIP_Nlp::problem, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiChgConsSides(), SCIPsetIsInfinity(), and SCIP_Nlp::solver.

Referenced by SCIPnlrowChgLhs(), and SCIPnlrowChgRhs().

◆ nlrowConstantChanged()

◆ nlrowSortLinear()

static void nlrowSortLinear ( SCIP_NLROW nlrow)
static

sorts linear part of row entries such that lower variable indices precede higher ones

Parameters
nlrownonlinear row to be sorted

Definition at line 829 of file nlp.c.

References SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, SCIP_NlRow::nlinvars, NULL, SCIPsortPtrReal(), and TRUE.

Referenced by nlrowSearchLinearCoef().

◆ nlrowSearchLinearCoef()

static int nlrowSearchLinearCoef ( SCIP_NLROW nlrow,
SCIP_VAR var 
)
static

searches linear variable in nonlinear row, returns position in linvars vector or -1 if not found

Parameters
nlrownonlinear row to be searched in
varvariable to be searched for

Definition at line 847 of file nlp.c.

References SCIP_NlRow::linvars, SCIP_NlRow::nlinvars, nlrowSortLinear(), NULL, and SCIPsortedvecFindPtr().

Referenced by nlpDelVarPos(), nlrowAddToLinearCoef(), nlrowRemoveFixedVar(), SCIPnlrowChgLinearCoef(), and SCIPnlrowDelLinearCoef().

◆ nlrowMoveLinearCoef()

static void nlrowMoveLinearCoef ( SCIP_NLROW nlrow,
int  oldpos,
int  newpos 
)
static

moves a coefficient in a nonlinear row to a different place, and updates all corresponding data structures

Parameters
nlrowNLP row
oldposold position of coefficient
newposnew position of coefficient

Definition at line 869 of file nlp.c.

References FALSE, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, and NULL.

Referenced by nlrowDelLinearCoefPos(), and nlrowRemoveFixedLinearCoefPos().

◆ nlrowAddLinearCoef()

static SCIP_RETCODE nlrowAddLinearCoef ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_VAR var,
SCIP_Real  coef 
)
static

adds a previously non existing linear coefficient to a nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
varvariable
coefvalue of coefficient

Definition at line 892 of file nlp.c.

References FALSE, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, SCIP_NlRow::name, SCIP_NlRow::nlinvars, SCIP_NlRow::nlpindex, nlrowLinearCoefChanged(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlrowEnsureLinearSize(), SCIPsetDebugMsg, SCIPsetIsZero(), SCIPvarCompare(), SCIPvarGetName(), and SCIPvarIsActive().

Referenced by nlrowAddToLinearCoef(), nlrowRemoveFixedLinearCoefPos(), SCIPnlrowAddLinearCoef(), and SCIPnlrowChgLinearCoef().

◆ nlrowAddToLinearCoef()

static SCIP_RETCODE nlrowAddToLinearCoef ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_VAR var,
SCIP_Real  coef,
SCIP_Bool  removefixed 
)
static

adds a linear coefficient to a nonlinear row if the variable exists in the linear part of the row already, the coefficients are added otherwise the variable is added to the row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
varvariable
coefvalue of coefficient
removefixedwhether to disaggregate var before adding

Definition at line 939 of file nlp.c.

References SCIP_NlRow::constant, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, nlrowAddLinearCoef(), nlrowConstantChanged(), nlrowSearchLinearCoef(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPsetIsZero(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarIsActive(), and TRUE.

Referenced by nlrowRemoveFixedQuadVars().

◆ nlrowDelLinearCoefPos()

static SCIP_RETCODE nlrowDelLinearCoefPos ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
int  pos 
)
static

deletes coefficient at given position from row

Parameters
nlrownonlinear row to be changed
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
posposition in row vector to delete

Definition at line 1019 of file nlp.c.

References FALSE, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, SCIP_NlRow::nlinvars, nlrowLinearCoefChanged(), nlrowMoveLinearCoef(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by nlrowChgLinearCoefPos(), nlrowRemoveFixedLinearCoefPos(), and SCIPnlrowDelLinearCoef().

◆ nlrowChgLinearCoefPos()

static SCIP_RETCODE nlrowChgLinearCoefPos ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
int  pos,
SCIP_Real  coef 
)
static

changes a coefficient at given position of a nonlinear row

Parameters
nlrowNLP row
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
posposition in row vector to change
coefnew value of coefficient

Definition at line 1048 of file nlp.c.

References SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, nlrowDelLinearCoefPos(), nlrowLinearCoefChanged(), NULL, SCIP_CALL, SCIP_OKAY, SCIPsetIsEQ(), and SCIPsetIsZero().

Referenced by SCIPnlrowChgLinearCoef().

◆ nlrowSetupQuadVarsHash()

static SCIP_RETCODE nlrowSetupQuadVarsHash ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem 
)
static

sets up the variable hash for quadratic variables, if the number of variables exceeds some given threshold

Parameters
nlrownonlinear row
blkmemblock memory

Definition at line 1078 of file nlp.c.

References SCIP_NlRow::nquadvars, NULL, SCIP_NlRow::quadvars, SCIP_NlRow::quadvarshash, SCIP_CALL, SCIP_OKAY, SCIPhashmapCreate(), and SCIPhashmapInsertInt().

Referenced by SCIPnlrowAddQuadVar(), and SCIPnlrowCreate().

◆ nlrowSortQuadElem()

static void nlrowSortQuadElem ( SCIP_NLROW nlrow)
static

sorts quadratic part of row entries

Parameters
nlrownonlinear row to be sorted

Definition at line 1104 of file nlp.c.

References SCIP_NlRow::nquadelems, NULL, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssorted, SCIPquadelemSort(), and TRUE.

Referenced by nlrowSearchQuadElem().

◆ nlrowSearchQuadElem()

static int nlrowSearchQuadElem ( SCIP_NLROW nlrow,
int  idx1,
int  idx2 
)
static

searches quadratic elements in nonlinear row, returns position of given index pair in quadelems array or -1 if not found

Parameters
nlrownonlinear row to be searched in
idx1index of first variable to be searched for
idx2index of second variable to be searched for

Definition at line 1123 of file nlp.c.

References nlrowSortQuadElem(), SCIP_NlRow::nquadelems, NULL, SCIP_NlRow::quadelems, and SCIPquadelemSortedFind().

Referenced by SCIPnlrowChgQuadElem(), and SCIPnlrowDelQuadElement().

◆ nlrowMoveQuadElement()

static void nlrowMoveQuadElement ( SCIP_NLROW nlrow,
int  oldpos,
int  newpos 
)
static

moves a quadratic element in a nonlinear row to a different place, and updates all corresponding data structures

Parameters
nlrowNLP row
oldposold position of coefficient
newposnew position of coefficient

Definition at line 1146 of file nlp.c.

References FALSE, NULL, SCIP_NlRow::quadelems, and SCIP_NlRow::quadelemssorted.

Referenced by nlrowDelQuadElemPos().

◆ nlrowAddQuadElement()

static SCIP_RETCODE nlrowAddQuadElement ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_QUADELEM  elem 
)
static

adds a previously non existing quadratic element to a nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
elemquadratic element to add

Definition at line 1167 of file nlp.c.

References SCIP_QuadElement::coef, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlRow::name, nlrowQuadElemChanged(), SCIP_NlRow::nquadelems, SCIP_NlRow::nquadvars, NULL, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssorted, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_OKAY, SCIPnlrowEnsureQuadElementsSize(), SCIPsetDebugMsg, SCIPsetIsZero(), and SCIPvarGetName().

Referenced by SCIPnlrowAddQuadElement(), and SCIPnlrowChgQuadElem().

◆ nlrowDelQuadElemPos()

static SCIP_RETCODE nlrowDelQuadElemPos ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
int  pos 
)
static

deletes coefficient at given position from row

Parameters
nlrownonlinear row to be changed
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
posposition in row vector to delete

Definition at line 1212 of file nlp.c.

References SCIP_QuadElement::coef, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, nlrowMoveQuadElement(), nlrowQuadElemChanged(), SCIP_NlRow::nquadelems, NULL, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssorted, SCIP_CALL, SCIP_OKAY, and SCIPsetDebugMsg.

Referenced by nlrowChgQuadElemPos(), nlrowRemoveFixedQuadVars(), and SCIPnlrowDelQuadElement().

◆ nlrowChgQuadElemPos()

static SCIP_RETCODE nlrowChgQuadElemPos ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
int  pos,
SCIP_Real  coef 
)
static

changes a coefficient at given position of quadratic element in nonlinear row

Parameters
nlrowNLP row
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
posposition in quadratic elements array to change
coefnew value of coefficient

Definition at line 1244 of file nlp.c.

References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, nlrowDelQuadElemPos(), nlrowQuadElemChanged(), NULL, SCIP_NlRow::quadelems, SCIP_CALL, SCIP_OKAY, SCIPsetDebugMsg, SCIPsetIsEQ(), and SCIPsetIsZero().

Referenced by SCIPnlrowChgQuadElem().

◆ nlrowCalcActivityBounds()

◆ nlrowRemoveFixedLinearCoefPos()

static SCIP_RETCODE nlrowRemoveFixedLinearCoefPos ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
int  pos 
)
static

makes sure that there is no fixed variable at position pos of the linear part of a nonlinear row a fixed variable is replaced with the corresponding constant or disaggregated term

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
posposition of variable in linear variables array

Definition at line 1367 of file nlp.c.

References SCIP_NlRow::constant, FALSE, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, SCIP_NlRow::nlinvars, nlrowAddLinearCoef(), nlrowConstantChanged(), nlrowDelLinearCoefPos(), nlrowLinearCoefChanged(), nlrowMoveLinearCoef(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPnlrowEnsureLinearSize(), SCIPsetIsZero(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), and SCIPvarIsActive().

Referenced by nlrowRemoveFixedLinearCoefs(), and nlrowRemoveFixedVar().

◆ nlrowRemoveFixedLinearCoefs()

static SCIP_RETCODE nlrowRemoveFixedLinearCoefs ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp 
)
static

removes fixed variables from the linear part of a nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data

Definition at line 1469 of file nlp.c.

References SCIP_NlRow::linvars, SCIP_NlRow::nlinvars, nlrowRemoveFixedLinearCoefPos(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPnlrowRemoveFixedVars().

◆ nlrowRemoveFixedQuadVars()

◆ nlrowRemoveFixedExprtreeVars()

static SCIP_RETCODE nlrowRemoveFixedExprtreeVars ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp 
)
static

removes fixed variables from expression tree of a nonlinear row

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data

Definition at line 1929 of file nlp.c.

References SCIP_NlRow::constant, SCIP_NlRow::exprtree, nlrowExprtreeChanged(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPexprtreeEval(), SCIPexprtreeFree(), SCIPexprtreeGetNParams(), SCIPexprtreeGetNVars(), SCIPexprtreeRemoveFixedVars(), and SCIPnlrowChgConstant().

Referenced by nlrowRemoveFixedVar(), and SCIPnlrowRemoveFixedVars().

◆ nlrowRemoveFixedVar()

static SCIP_RETCODE nlrowRemoveFixedVar ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_VAR var 
)
static

removes fixed variable from nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
varvariable that had been fixed

Definition at line 1962 of file nlp.c.

References SCIP_NlRow::exprtree, nlrowRemoveFixedExprtreeVars(), nlrowRemoveFixedLinearCoefPos(), nlrowRemoveFixedQuadVars(), nlrowSearchLinearCoef(), NULL, SCIP_CALL, SCIP_OKAY, SCIPexprtreeFindVar(), SCIPnlrowSearchQuadVar(), and SCIPvarIsActive().

Referenced by nlpRemoveFixedVar().

◆ SCIPnlrowCreate()

SCIP_RETCODE SCIPnlrowCreate ( SCIP_NLROW **  nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
const char *  name,
SCIP_Real  constant,
int  nlinvars,
SCIP_VAR **  linvars,
SCIP_Real lincoefs,
int  nquadvars,
SCIP_VAR **  quadvars,
int  nquadelems,
SCIP_QUADELEM quadelems,
SCIP_EXPRTREE exprtree,
SCIP_Real  lhs,
SCIP_Real  rhs,
SCIP_EXPRCURV  curvature 
)

create a new nonlinear row the new row is already captured

Parameters
nlrowbuffer to store pointer to nonlinear row
blkmemblock memory
setglobal SCIP settings
namename of nonlinear row
constantconstant
nlinvarsnumber of linear variables
linvarslinear variables, or NULL if nlinvars == 0
lincoefslinear coefficients, or NULL if nlinvars == 0
nquadvarsnumber of variables in quadratic terms
quadvarsvariables in quadratic terms, or NULL if nquadvars == 0
nquadelemsnumber of entries in quadratic term matrix
quadelemselements of quadratic term matrix, or NULL if nquadelems == 0
exprtreeexpression tree, or NULL
lhsleft hand side
rhsright hand side
curvaturecurvature of the nonlinear row

Definition at line 2007 of file nlp.c.

References BMSallocBlockMemory, BMSduplicateBlockMemoryArray, FALSE, MAX, nlrowSetupQuadVarsHash(), NULL, REALABS, SCIP_ALLOC, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPexprtreeCopy(), SCIPnlrowCapture(), SCIPsetIsInfinity(), SCIPsetIsRelLE(), and TRUE.

Referenced by SCIPcreateEmptyNlRow(), SCIPcreateNlRow(), SCIPnlpChgVarObjDive(), SCIPnlrowCreateCopy(), and SCIPnlrowCreateFromRow().

◆ SCIPnlrowCreateCopy()

SCIP_RETCODE SCIPnlrowCreateCopy ( SCIP_NLROW **  nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_NLROW sourcenlrow 
)

◆ SCIPnlrowCreateFromRow()

SCIP_RETCODE SCIPnlrowCreateFromRow ( SCIP_NLROW **  nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_ROW row 
)

create a new nonlinear row from a linear row the new row is already captured

Parameters
nlrowbuffer to store pointer to nonlinear row
blkmemblock memory
setglobal SCIP settings
rowthe linear row to copy

Definition at line 2191 of file nlp.c.

References NULL, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIPcolGetVar(), SCIPnlrowCreate(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwGetRhs(), SCIProwGetVals(), SCIPsetAllocBufferArray, and SCIPsetFreeBufferArray.

Referenced by SCIPcreateNlRowFromRow().

◆ SCIPnlrowFree()

SCIP_RETCODE SCIPnlrowFree ( SCIP_NLROW **  nlrow,
BMS_BLKMEM blkmem 
)

frees a nonlinear row

Parameters
nlrowpointer to NLP row
blkmemblock memory

Definition at line 2259 of file nlp.c.

References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, SCIPexprtreeFree(), and SCIPhashmapFree().

Referenced by SCIPnlrowRelease().

◆ SCIPnlrowPrint()

◆ SCIPnlrowCapture()

void SCIPnlrowCapture ( SCIP_NLROW nlrow)

increases usage counter of NLP nonlinear row

Parameters
nlrownonlinear row to capture

Definition at line 2351 of file nlp.c.

References SCIP_NlRow::name, NULL, SCIP_NlRow::nuses, and SCIPdebugMessage.

Referenced by nlpAddNlRows(), SCIPcaptureNlRow(), and SCIPnlrowCreate().

◆ SCIPnlrowRelease()

SCIP_RETCODE SCIPnlrowRelease ( SCIP_NLROW **  nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set 
)

decreases usage counter of NLP nonlinear row

Parameters
nlrownonlinear row to free
blkmemblock memory
setglobal SCIP settings

Definition at line 2363 of file nlp.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlrowFree(), and SCIPsetDebugMsg.

Referenced by nlpDelNlRowPos(), SCIPnlpEndDive(), and SCIPreleaseNlRow().

◆ SCIPnlrowEnsureLinearSize()

SCIP_RETCODE SCIPnlrowEnsureLinearSize ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)

ensures, that linear coefficient array of nonlinear row can store at least num entries

Parameters
nlrowNLP row
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 2387 of file nlp.c.

References BMSreallocBlockMemoryArray, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::linvarssize, SCIP_NlRow::nlinvars, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by nlrowAddLinearCoef(), and nlrowRemoveFixedLinearCoefPos().

◆ SCIPnlrowAddLinearCoef()

SCIP_RETCODE SCIPnlrowAddLinearCoef ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_VAR var,
SCIP_Real  val 
)

adds a previously non existing linear coefficient to an NLP nonlinear row

Parameters
nlrowNLP nonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
varvariable
valvalue of coefficient

Definition at line 2412 of file nlp.c.

References SCIP_NlRow::constant, SCIP_NlRow::nlpindex, nlrowAddLinearCoef(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPnlrowAddLinearCoef(), SCIPnlrowChgConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), and SCIPvarIsActive().

Referenced by SCIPaddLinearCoefsToNlRow(), SCIPaddLinearCoefToNlRow(), and SCIPnlrowAddLinearCoef().

◆ SCIPnlrowDelLinearCoef()

SCIP_RETCODE SCIPnlrowDelLinearCoef ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_VAR var 
)

deletes linear coefficient from nonlinear row

Parameters
nlrownonlinear row to be changed
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
varcoefficient to be deleted

Definition at line 2460 of file nlp.c.

References SCIP_NlRow::linvars, SCIP_NlRow::name, SCIP_NlRow::nlpindex, nlrowDelLinearCoefPos(), nlrowSearchLinearCoef(), NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPvarGetName(), and SCIPvarIsActive().

◆ SCIPnlrowChgLinearCoef()

SCIP_RETCODE SCIPnlrowChgLinearCoef ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_VAR var,
SCIP_Real  coef 
)

changes or adds a linear coefficient to a nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
varvariable
coefnew value of coefficient

Definition at line 2493 of file nlp.c.

References nlrowAddLinearCoef(), nlrowChgLinearCoefPos(), nlrowSearchLinearCoef(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPsetIsZero().

Referenced by SCIPchgNlRowLinearCoef(), and SCIPnlpChgVarObjDive().

◆ SCIPnlrowEnsureQuadVarsSize()

SCIP_RETCODE SCIPnlrowEnsureQuadVarsSize ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)

ensures, that quadratic variables array of nonlinear row can store at least num entries

Parameters
nlrowNLP row
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 2531 of file nlp.c.

References BMSreallocBlockMemoryArray, SCIP_NlRow::nquadvars, NULL, SCIP_NlRow::quadvars, SCIP_NlRow::quadvarssize, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by SCIPaddQuadVarsToNlRow(), and SCIPnlrowAddQuadVar().

◆ SCIPnlrowAddQuadVar()

SCIP_RETCODE SCIPnlrowAddQuadVar ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_VAR var 
)

adds variable to quadvars array of row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
varvariable to search for

Definition at line 2555 of file nlp.c.

References SCIP_NlRow::nlpindex, nlrowSetupQuadVarsHash(), SCIP_NlRow::nquadvars, NULL, SCIP_NlRow::quadvars, SCIP_NlRow::quadvarshash, SCIP_CALL, SCIP_OKAY, SCIPhashmapInsertInt(), SCIPnlrowEnsureQuadVarsSize(), SCIPnlrowSearchQuadVar(), and SCIPvarIsActive().

Referenced by nlrowRemoveFixedQuadVars(), SCIPaddQuadVarsToNlRow(), and SCIPaddQuadVarToNlRow().

◆ SCIPnlrowEnsureQuadElementsSize()

SCIP_RETCODE SCIPnlrowEnsureQuadElementsSize ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)

ensures, that quadratic elements array of nonlinear row can store at least num entries

Parameters
nlrowNLP row
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 2590 of file nlp.c.

References BMSreallocBlockMemoryArray, SCIP_NlRow::nquadelems, NULL, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssize, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by nlrowAddQuadElement(), and SCIPaddQuadElementsToNlRow().

◆ SCIPnlrowAddQuadElement()

SCIP_RETCODE SCIPnlrowAddQuadElement ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_QUADELEM  elem 
)

adds a previously non existing quadratic element to an NLP nonlinear row

Parameters
nlrowNLP nonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
elemquadratic element to add

Definition at line 2614 of file nlp.c.

References nlrowAddQuadElement(), SCIP_CALL, and SCIP_OKAY.

Referenced by nlrowRemoveFixedQuadVars(), SCIPaddQuadElementsToNlRow(), and SCIPaddQuadElementToNlRow().

◆ SCIPnlrowDelQuadElement()

SCIP_RETCODE SCIPnlrowDelQuadElement ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
int  idx1,
int  idx2 
)

deletes quadratic element from nonlinear row

Parameters
nlrownonlinear row to be changed
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
idx1index of first variable in element
idx2index of second variable in element

Definition at line 2629 of file nlp.c.

References SCIP_NlRow::name, nlrowDelQuadElemPos(), nlrowSearchQuadElem(), NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, and SCIPerrorMessage.

◆ SCIPnlrowChgQuadElem()

SCIP_RETCODE SCIPnlrowChgQuadElem ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_QUADELEM  elem 
)

changes or adds a quadratic element to a nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
elemnew quadratic element

Definition at line 2663 of file nlp.c.

References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, nlrowAddQuadElement(), nlrowChgQuadElemPos(), nlrowSearchQuadElem(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPchgNlRowQuadElement().

◆ SCIPnlrowChgExprtree()

SCIP_RETCODE SCIPnlrowChgExprtree ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_EXPRTREE exprtree 
)

replaces an expression tree in nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
exprtreenew expression tree

Definition at line 2695 of file nlp.c.

References SCIP_NlRow::exprtree, SCIP_NlRow::nlpindex, nlrowExprtreeChanged(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPexprtreeCopy(), SCIPexprtreeFree(), and SCIPexprtreeRemoveFixedVars().

Referenced by SCIPsetNlRowExprtree().

◆ SCIPnlrowChgExprtreeParam()

SCIP_RETCODE SCIPnlrowChgExprtreeParam ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
int  paramidx,
SCIP_Real  paramval 
)

changes a parameter in an expression of a nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
paramidxindex of parameter in expression tree's parameter array
paramvalnew value of parameter

Definition at line 2734 of file nlp.c.

References SCIP_NlRow::exprtree, nlrowExprtreeParamChanged(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPexprtreeSetParamVal().

Referenced by SCIPsetNlRowExprtreeParam().

◆ SCIPnlrowChgExprtreeParams()

SCIP_RETCODE SCIPnlrowChgExprtreeParams ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_Real paramvals 
)

changes all parameters in an expression of a nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
paramvalsnew values of parameters

Definition at line 2757 of file nlp.c.

References SCIP_NlRow::exprtree, nlrowExprtreeParamChanged(), NULL, SCIP_CALL, SCIP_OKAY, SCIPexprtreeGetNParams(), and SCIPexprtreeSetParams().

Referenced by SCIPsetNlRowExprtreeParams().

◆ SCIPnlrowChgConstant()

SCIP_RETCODE SCIPnlrowChgConstant ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_Real  constant 
)

changes constant of nonlinear row

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
constantnew constant

Definition at line 2779 of file nlp.c.

References SCIP_NlRow::constant, nlrowConstantChanged(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPsetIsEQ().

Referenced by nlrowRemoveFixedExprtreeVars(), SCIPchgNlRowConstant(), and SCIPnlrowAddLinearCoef().

◆ SCIPnlrowChgLhs()

SCIP_RETCODE SCIPnlrowChgLhs ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_Real  lhs 
)

changes left hand side of nonlinear row

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
lhsnew left hand side

Definition at line 2799 of file nlp.c.

References SCIP_NlRow::lhs, nlrowSideChanged(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPsetIsEQ().

Referenced by SCIPchgNlRowLhs().

◆ SCIPnlrowChgRhs()

SCIP_RETCODE SCIPnlrowChgRhs ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_Real  rhs 
)

changes right hand side of nonlinear row

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data
rhsnew right hand side

Definition at line 2819 of file nlp.c.

References nlrowSideChanged(), NULL, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, and SCIPsetIsEQ().

Referenced by SCIPchgNlRowRhs().

◆ SCIPnlrowRemoveFixedVars()

SCIP_RETCODE SCIPnlrowRemoveFixedVars ( SCIP_NLROW nlrow,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp 
)

removes (or substitutes) all fixed, negated, aggregated, multi-aggregated variables from the linear, quadratic, and non-quadratic terms of a nonlinear row

Parameters
nlrownonlinear row
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlpcurrent NLP data

Definition at line 2839 of file nlp.c.

References nlrowRemoveFixedExprtreeVars(), nlrowRemoveFixedLinearCoefs(), nlrowRemoveFixedQuadVars(), SCIP_CALL, and SCIP_OKAY.

Referenced by nlpAddNlRows().

◆ SCIPnlrowRecalcNLPActivity()

◆ SCIPnlrowGetNLPActivity()

SCIP_RETCODE SCIPnlrowGetNLPActivity ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_Real activity 
)

returns the activity of a nonlinear row in the current NLP solution

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics
nlpcurrent NLP data
activitybuffer to store activity value

Definition at line 2932 of file nlp.c.

References SCIP_NlRow::activity, SCIP_Stat::nnlps, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPnlrowRecalcNLPActivity(), and SCIP_NlRow::validactivitynlp.

Referenced by nlpSolve(), SCIPgetNlRowActivity(), SCIPgetNlRowNLPActivity(), SCIPgetNlRowSolActivity(), and SCIPnlrowGetNLPFeasibility().

◆ SCIPnlrowGetNLPFeasibility()

SCIP_RETCODE SCIPnlrowGetNLPFeasibility ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLP nlp,
SCIP_Real feasibility 
)

gives the feasibility of a nonlinear row in the current NLP solution: negative value means infeasibility

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics
nlpcurrent NLP data
feasibilitybuffer to store feasibility value

Definition at line 2959 of file nlp.c.

References SCIP_NlRow::lhs, NULL, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPnlrowGetNLPActivity().

Referenced by nlpAddNlRows(), nlpRowChanged(), SCIPgetNlRowFeasibility(), SCIPgetNlRowNLPFeasibility(), and SCIPgetNlRowSolFeasibility().

◆ SCIPnlrowRecalcPseudoActivity()

◆ SCIPnlrowGetPseudoActivity()

SCIP_RETCODE SCIPnlrowGetPseudoActivity ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Real pseudoactivity 
)

returns the pseudo activity of a nonlinear row in the current pseudo solution

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics
pseudoactivitybuffer to store pseudo activity value

Definition at line 3034 of file nlp.c.

References SCIP_Stat::domchgcount, NULL, SCIP_NlRow::pseudoactivity, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPnlrowRecalcPseudoActivity(), and SCIP_NlRow::validpsactivitydomchg.

Referenced by SCIPgetNlRowActivity(), SCIPgetNlRowPseudoActivity(), SCIPgetNlRowSolActivity(), SCIPnlpGetPseudoObjval(), and SCIPnlrowGetPseudoFeasibility().

◆ SCIPnlrowGetPseudoFeasibility()

SCIP_RETCODE SCIPnlrowGetPseudoFeasibility ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Real pseudofeasibility 
)

returns the pseudo feasibility of a nonlinear row in the current pseudo solution: negative value means infeasibility

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics
pseudofeasibilitybuffer to store pseudo feasibility value

Definition at line 3060 of file nlp.c.

References SCIP_NlRow::lhs, NULL, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPnlrowGetPseudoActivity().

Referenced by SCIPgetNlRowFeasibility(), SCIPgetNlRowPseudoFeasibility(), and SCIPgetNlRowSolFeasibility().

◆ SCIPnlrowGetSolActivity()

SCIP_RETCODE SCIPnlrowGetSolActivity ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_SOL sol,
SCIP_Real activity 
)

◆ SCIPnlrowGetSolFeasibility()

SCIP_RETCODE SCIPnlrowGetSolFeasibility ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_SOL sol,
SCIP_Real feasibility 
)

returns the feasibility of a nonlinear row for the given solution

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
solprimal CIP solution
feasibilitybuffer to store feasibility value

Definition at line 3165 of file nlp.c.

References SCIP_NlRow::lhs, NULL, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPnlrowGetSolActivity().

Referenced by SCIPgetNlRowSolFeasibility().

◆ SCIPnlrowGetActivityBounds()

SCIP_RETCODE SCIPnlrowGetActivityBounds ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Real minactivity,
SCIP_Real maxactivity 
)

returns the minimal activity of a nonlinear row w.r.t. the variables' bounds

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
minactivitybuffer to store minimal activity, or NULL
maxactivitybuffer to store maximal activity, or NULL

Definition at line 3186 of file nlp.c.

References SCIP_Stat::domchgcount, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, nlrowCalcActivityBounds(), NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, and SCIP_NlRow::validactivitybdsdomchg.

Referenced by SCIPgetNlRowActivityBounds(), and SCIPnlrowIsRedundant().

◆ SCIPnlrowIsRedundant()

SCIP_RETCODE SCIPnlrowIsRedundant ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Bool isredundant 
)

returns whether the nonlinear row is redundant w.r.t. the variables' bounds

Parameters
nlrownonlinear row
setglobal SCIP settings
statproblem statistics data
isredundantbuffer to store whether row is redundant

Definition at line 3217 of file nlp.c.

References FALSE, SCIP_NlRow::lhs, NULL, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlrowGetActivityBounds(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsInfinity(), and TRUE.

Referenced by SCIPnlpRemoveRedundantNlRows().

◆ nlpAddNlRows()

static SCIP_RETCODE nlpAddNlRows ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
int  nnlrows,
SCIP_NLROW **  nlrows 
)
static

◆ nlpMoveNlrow()

static void nlpMoveNlrow ( SCIP_NLP nlp,
int  oldpos,
int  newpos 
)
static

moves a nonlinear row to a different place, and updates all corresponding data structures

Parameters
nlpNLP data structure
oldposold position of nonlinear row
newposnew position of nonlinear row

Definition at line 3591 of file nlp.c.

References SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, SCIP_Nlp::nlrowmap_nlpi2nlp, SCIP_Nlp::nlrows, NULL, and SCIP_Nlp::sizenlrows_solver.

Referenced by nlpDelNlRowPos().

◆ nlpDelNlRowPos()

static SCIP_RETCODE nlpDelNlRowPos ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  pos 
)
static

◆ nlpUpdateVarBounds()

static SCIP_RETCODE nlpUpdateVarBounds ( SCIP_NLP nlp,
SCIP_SET set,
SCIP_VAR var,
SCIP_Bool  tightened 
)
static

updates bounds on a variable in the NLPI problem

Parameters
nlpNLP data
setglobal SCIP settings
varvariable which bounds have changed
tightenedwhether the bound change was a bound tightening

Definition at line 3673 of file nlp.c.

References SCIP_Nlp::indiving, NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpiChgVarBounds(), SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsInfinity(), SCIPvarGetLbLocal(), SCIPvarGetNLPSol(), SCIPvarGetUbLocal(), SCIP_Nlp::solstat, SCIP_Nlp::solver, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.

Referenced by SCIP_DECL_EVENTEXEC().

◆ nlpUpdateObjCoef()

static SCIP_RETCODE nlpUpdateObjCoef ( SCIP_NLP nlp,
SCIP_VAR var 
)
static

updates coefficient of a variable in the objective

Parameters
nlpNLP data
varvariable which bounds have changed

Definition at line 3732 of file nlp.c.

References FALSE, SCIP_Nlp::indiving, NULL, SCIP_Nlp::objflushed, SCIP_Nlp::problem, SCIP_CALL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpiChgLinearCoefs(), SCIPvarGetObj(), SCIP_Nlp::solstat, SCIP_Nlp::solver, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.

Referenced by nlpAddVars(), and SCIP_DECL_EVENTEXEC().

◆ nlpAddVars()

◆ nlpMoveVar()

static SCIP_RETCODE nlpMoveVar ( SCIP_NLP nlp,
int  oldpos,
int  newpos 
)
static

moves a variable to a different place, and updates all corresponding data structures

Parameters
nlpNLP data structure
oldposold position of variable
newposnew position of variable

Definition at line 3872 of file nlp.c.

References SCIP_Nlp::initialguess, NULL, SCIP_CALL, SCIP_OKAY, SCIPhashmapSetImageInt(), SCIP_Nlp::varhash, SCIP_Nlp::varlbdualvals, SCIP_Nlp::varmap_nlp2nlpi, SCIP_Nlp::varmap_nlpi2nlp, SCIP_Nlp::vars, and SCIP_Nlp::varubdualvals.

Referenced by nlpDelVarPos().

◆ nlpDelVarPos()

◆ nlpRemoveFixedVar()

static SCIP_RETCODE nlpRemoveFixedVar ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_VAR var 
)
static

notifies NLP that a variable was fixed, so it is removed from objective, all rows, and the NLP variables

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
eventqueueevent queue
lpSCIP LP, needed to release variable
varvariable that has been fixed

Definition at line 3991 of file nlp.c.

References SCIP_Nlp::indiving, nlrowRemoveFixedVar(), SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, SCIP_CALL, SCIP_OKAY, SCIPhashmapExists(), SCIPnlpDelVar(), SCIPvarIsActive(), and SCIP_Nlp::varhash.

Referenced by SCIP_DECL_EVENTEXEC().

◆ nlpSetupNlpiIndices()

static SCIP_RETCODE nlpSetupNlpiIndices ( SCIP_NLP nlp,
SCIP_SET set,
SCIP_NLROW nlrow,
int **  linidxs,
SCIP_QUADELEM **  quadelems,
int **  nlinidxs 
)
static

creates arrays with NLPI variable indices of variables in a nonlinear row

Parameters
nlpNLP data
setglobal SCIP settings
nlrownonlinear row
linidxsbuffer to store pointer to NLPI indices of linear variables
quadelemsbuffer to store pointer to quadratic elements w.r.t. NLPI indices
nlinidxsbuffer to store pointer to NLPI indices of nonlinear variables

Definition at line 4023 of file nlp.c.

References SCIP_QuadElement::coef, SCIP_NlRow::exprtree, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::nlinvars, SCIP_NlRow::nquadelems, SCIP_NlRow::nquadvars, NULL, SCIP_NlRow::quadelems, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_OKAY, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPvarIsActive(), SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.

Referenced by nlpFlushNlRowAdditions().

◆ nlpEnsureVarsSolverSize()

static SCIP_RETCODE nlpEnsureVarsSolverSize ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)
static

ensures, that NLPI variables array of NLP can store at least num entries

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 4140 of file nlp.c.

References BMSreallocBlockMemoryArray, NULL, SCIP_Nlp::nvars_solver, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIP_Nlp::sizevars_solver, and SCIP_Nlp::varmap_nlpi2nlp.

Referenced by nlpFlushVarAdditions().

◆ nlpEnsureNlRowsSolverSize()

static SCIP_RETCODE nlpEnsureNlRowsSolverSize ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)
static

ensures, that NLPI nonlinear rows array of NLP can store at least num entries

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 4168 of file nlp.c.

References BMSreallocBlockMemoryArray, SCIP_Nlp::nlrowmap_nlpi2nlp, SCIP_Nlp::nnlrows_solver, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), and SCIP_Nlp::sizenlrows_solver.

Referenced by nlpFlushNlRowAdditions().

◆ nlpFlushNlRowDeletions()

static SCIP_RETCODE nlpFlushNlRowDeletions ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set 
)
static

deletes rows from the NLPI problem that have been marked as to remove

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings

Definition at line 4196 of file nlp.c.

References SCIP_Nlp::indiving, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, SCIP_Nlp::nlrowmap_nlpi2nlp, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_Nlp::nnlrows_solver, NULL, SCIP_Nlp::nunflushednlrowdel, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiDelConsSet(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, and SCIP_Nlp::solver.

Referenced by SCIPnlpFlush().

◆ nlpFlushVarDeletions()

static SCIP_RETCODE nlpFlushVarDeletions ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set 
)
static

deletes variables from the NLPI problem that have been marked as to remove assumes that there are no pending row deletions (nlpFlushNlRowDeletions should be called first)

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings

Definition at line 4289 of file nlp.c.

References SCIP_Nlp::indiving, NULL, SCIP_Nlp::nunflushednlrowdel, SCIP_Nlp::nunflushedvardel, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiDelVarSet(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIP_Nlp::solver, SCIP_Nlp::varmap_nlp2nlpi, and SCIP_Nlp::varmap_nlpi2nlp.

Referenced by SCIPnlpFlush().

◆ nlpFlushNlRowAdditions()

static SCIP_RETCODE nlpFlushNlRowAdditions ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set 
)
static

◆ nlpFlushVarAdditions()

static SCIP_RETCODE nlpFlushVarAdditions ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set 
)
static

adds variables to NLPI problem that have been added to NLP before may set nlp->objflushed to FALSE if a variable with nonzero obj.coefficient is added to the NLPI problem

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings

Definition at line 4536 of file nlp.c.

References FALSE, SCIP_Nlp::indiving, nlpEnsureVarsSolverSize(), NULL, SCIP_Nlp::nunflushedvaradd, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::objflushed, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiAddVars(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetIsZero(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetUbLocal(), SCIP_Nlp::solver, SCIP_Nlp::varmap_nlp2nlpi, SCIP_Nlp::varmap_nlpi2nlp, and SCIP_Nlp::vars.

Referenced by SCIPnlpFlush().

◆ nlpFlushObjective()

static SCIP_RETCODE nlpFlushObjective ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set 
)
static

updates the objective in the NLPI problem, if necessary assumes that there are no unflushed variable additions or deletions (nlpFlushVarDeletions and nlpFlushVarAdditions should be called first)

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings

Definition at line 4624 of file nlp.c.

References SCIP_Nlp::indiving, NULL, SCIP_Nlp::nunflushedvaradd, SCIP_Nlp::nunflushedvardel, SCIP_Nlp::nvars_solver, SCIP_Nlp::objflushed, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiSetObjective(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetIsZero(), SCIPvarGetObj(), SCIP_Nlp::solver, TRUE, SCIP_Nlp::varmap_nlpi2nlp, and SCIP_Nlp::vars.

Referenced by SCIPnlpFlush().

◆ nlpSolve()

static SCIP_RETCODE nlpSolve ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat 
)
static

solves the NLP, assuming it has been flushed already

is used also to solve diving NLP

Parameters
nlpNLP data
blkmemblock memory buffers
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics

Definition at line 4686 of file nlp.c.

References BMSclearMemoryArray, SCIP_Nlp::divingobj, SCIP_NlRow::dualsol, SCIP_Nlp::haveinitguess, SCIP_Nlp::indiving, SCIP_Nlp::initialguess, MAX, SCIP_NlRow::nlpiindex, SCIP_Stat::nlpsoltime, SCIP_Nlp::nlrows, SCIP_Stat::nnlps, SCIP_Nlp::nnlrows, NULL, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::primalsolobjval, SCIP_Nlp::problem, SCIP_CALL, SCIP_INVALID, SCIP_NLPPAR_FEASTOL, SCIP_NLPPAR_RELOBJTOL, SCIP_NLPPAR_TILIM, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIP_Real, SCIPclockGetTime(), SCIPclockStart(), SCIPclockStop(), SCIPmessagePrintWarning(), SCIPnlpiGetSolstat(), SCIPnlpiGetSolution(), SCIPnlpiGetTermstat(), SCIPnlpiSetInitialGuess(), SCIPnlpiSetRealPar(), SCIPnlpiSolve(), SCIPnlrowGetNLPActivity(), SCIPsetAllocBufferArray, SCIPsetDualfeastol(), SCIPsetFeastol(), SCIPsetFreeBufferArray, SCIPsetGetRealParam(), SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsInfinity(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetUbLocal(), SCIPvarSetNLPSol(), SCIP_Nlp::solstat, SCIP_Nlp::solver, SCIP_Stat::solvingtime, SCIP_Nlp::termstat, SCIP_Nlp::varlbdualvals, SCIP_Nlp::varmap_nlp2nlpi, SCIP_Nlp::varmap_nlpi2nlp, SCIP_Nlp::vars, and SCIP_Nlp::varubdualvals.

Referenced by SCIPnlpSolve(), and SCIPnlpSolveDive().

◆ nlpCalcFracVars()

◆ SCIPnlpInclude()

SCIP_RETCODE SCIPnlpInclude ( SCIP_SET set,
BMS_BLKMEM blkmem 
)

includes NLP specific plugins (e.g., event handler) and parameters

Parameters
setglobal SCIP settings
blkmemblock memory

Definition at line 5062 of file nlp.c.

References EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_INIT, SCIPerrorMessage, SCIPeventhdlrCreate(), SCIPsetFindEventhdlr(), and SCIPsetIncludeEventhdlr().

Referenced by doScipCreate().

◆ SCIPnlpCreate()

SCIP_RETCODE SCIPnlpCreate ( SCIP_NLP **  nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
const char *  name,
int  nvars_estimate 
)

construct a new empty NLP

Parameters
nlpNLP handler, call by reference
blkmemblock memory
setglobal SCIP settings
statproblem statistics
nameproblem name
nvars_estimatean estimate on the number of variables that may be added to the NLP later

Definition at line 5088 of file nlp.c.

References BMSallocMemory, BMSduplicateBlockMemoryArray, EVENTHDLR_NAME, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_EVENTTYPE_VARDELETED, SCIP_INVALID, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPerrorMessage, SCIPeventfilterAdd(), SCIPhashmapCreate(), SCIPnlpiCreateProblem(), SCIPsetFindEventhdlr(), SCIPsetFindNlpi(), SCIPsetSortNlpis(), and TRUE.

Referenced by initSolve().

◆ SCIPnlpFree()

SCIP_RETCODE SCIPnlpFree ( SCIP_NLP **  nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp 
)

frees NLP data object

Parameters
nlppointer to NLP data object
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpSCIP LP, needed for releasing variables

Definition at line 5209 of file nlp.c.

References BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, BMSfreeMemory, NULL, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_EVENTTYPE_VARDELETED, SCIP_OKAY, SCIPeventfilterDel(), SCIPhashmapFree(), SCIPnlpiFreeProblem(), and SCIPnlpReset().

Referenced by freeReoptSolve(), and freeSolve().

◆ SCIPnlpReset()

SCIP_RETCODE SCIPnlpReset ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp 
)

resets the NLP to the empty NLP by removing all variables and rows from NLP, releasing all rows, and flushing the changes to the NLP solver

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpSCIP LP, needed for releasing variables

Definition at line 5268 of file nlp.c.

References BMSfreeBlockMemoryArrayNull, FALSE, SCIP_Nlp::haveinitguess, SCIP_Nlp::indiving, SCIP_Nlp::initialguess, nlpDelNlRowPos(), nlpDelVarPos(), SCIP_Nlp::nnlrows, NULL, SCIP_Nlp::nvars, SCIP_CALL, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIPnlpEndDive(), SCIPnlpFlush(), SCIP_Nlp::sizevars, SCIP_Nlp::solstat, and SCIP_Nlp::termstat.

Referenced by SCIPnlpFree().

◆ SCIPnlpHasCurrentNodeNLP()

SCIP_Bool SCIPnlpHasCurrentNodeNLP ( SCIP_NLP nlp)

currently a dummy function that always returns TRUE

Parameters
nlpNLP data

Definition at line 5309 of file nlp.c.

References NULL, and TRUE.

Referenced by SCIPgetNlRowActivity(), SCIPgetNlRowFeasibility(), SCIPgetNlRowSolActivity(), SCIPgetNlRowSolFeasibility(), and SCIPrecalcNlRowActivity().

◆ SCIPnlpEnsureVarsSize()

SCIP_RETCODE SCIPnlpEnsureVarsSize ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)

ensures, that variables array of NLP can store at least num entries

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 5318 of file nlp.c.

References BMSreallocBlockMemoryArray, SCIP_Nlp::initialguess, NULL, SCIP_Nlp::nvars, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIP_Nlp::sizevars, SCIP_Nlp::varlbdualvals, SCIP_Nlp::varmap_nlp2nlpi, SCIP_Nlp::vars, and SCIP_Nlp::varubdualvals.

Referenced by nlpAddVars().

◆ SCIPnlpAddVar()

SCIP_RETCODE SCIPnlpAddVar ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_VAR var 
)

adds a variable to the NLP and captures the variable

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
varvariable

Definition at line 5352 of file nlp.c.

References SCIP_Nlp::indiving, nlpAddVars(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPhashmapExists(), SCIPvarIsTransformed(), and SCIP_Nlp::varhash.

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIPnlpAddVars()

SCIP_RETCODE SCIPnlpAddVars ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  nvars,
SCIP_VAR **  vars 
)

adds a set of variables to the NLP and captures the variables

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
nvarsnumber of variables to add
varsvariables to add

Definition at line 5378 of file nlp.c.

References SCIP_Nlp::indiving, nlpAddVars(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, and SCIPerrorMessage.

Referenced by initSolve().

◆ SCIPnlpDelVar()

SCIP_RETCODE SCIPnlpDelVar ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_LP lp,
SCIP_VAR var 
)

deletes a variable from the NLP and releases the variable

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
lpSCIP LP, needed to release variable
varvariable

Definition at line 5403 of file nlp.c.

References SCIP_Nlp::indiving, nlpDelVarPos(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPvarGetName(), and SCIP_Nlp::varhash.

Referenced by nlpRemoveFixedVar(), and SCIP_DECL_EVENTEXEC().

◆ SCIPnlpEnsureNlRowsSize()

SCIP_RETCODE SCIPnlpEnsureNlRowsSize ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  num 
)

ensures, that nonlinear rows array of NLP can store at least num entries

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
numminimum number of entries to store

Definition at line 5439 of file nlp.c.

References BMSreallocBlockMemoryArray, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), and SCIP_Nlp::sizenlrows.

Referenced by nlpAddNlRows().

◆ SCIPnlpAddNlRow()

SCIP_RETCODE SCIPnlpAddNlRow ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_NLROW nlrow 
)

adds a nonlinear row to the NLP and captures it all variables of the row need to be present in the NLP

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nlrownonlinear row

Definition at line 5467 of file nlp.c.

References SCIP_Nlp::indiving, nlpAddNlRows(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, and SCIPerrorMessage.

Referenced by SCIPaddNlRow().

◆ SCIPnlpAddNlRows()

SCIP_RETCODE SCIPnlpAddNlRows ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
int  nnlrows,
SCIP_NLROW **  nlrows 
)

adds nonlinear rows to the NLP and captures them all variables of the row need to be present in the NLP

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
nnlrowsnumber of rows to add
nlrowsrows to add

Definition at line 5491 of file nlp.c.

References SCIP_Nlp::indiving, nlpAddNlRows(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, and SCIPerrorMessage.

◆ SCIPnlpDelNlRow()

SCIP_RETCODE SCIPnlpDelNlRow ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_NLROW nlrow 
)

deletes a nonlinear row from the NLP does nothing if nonlinear row is not in NLP

Parameters
nlpNLP data
blkmemblock memory
setglobal SCIP settings
nlrownonlinear row

Definition at line 5519 of file nlp.c.

References SCIP_Nlp::indiving, nlpDelNlRowPos(), SCIP_NlRow::nlpindex, SCIP_Nlp::nnlrows, NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, and SCIPerrorMessage.

Referenced by SCIPdelNlRow().

◆ SCIPnlpFlush()

◆ SCIPnlpSolve()

SCIP_RETCODE SCIPnlpSolve ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat 
)

solves the NLP

Parameters
nlpNLP data
blkmemblock memory buffers
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics

Definition at line 5587 of file nlp.c.

References SCIP_Nlp::indiving, nlpSolve(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, and SCIPnlpFlush().

Referenced by SCIPsolveNLP().

◆ SCIPnlpGetObjval()

SCIP_Real SCIPnlpGetObjval ( SCIP_NLP nlp)

gets objective value of current NLP

Parameters
nlpcurrent NLP data

Definition at line 5614 of file nlp.c.

References NULL, and SCIP_Nlp::primalsolobjval.

Referenced by SCIPgetNLPObjval(), and SCIPsolLinkNLPSol().

◆ SCIPnlpGetPseudoObjval()

SCIP_RETCODE SCIPnlpGetPseudoObjval ( SCIP_NLP nlp,
SCIP_SET set,
SCIP_STAT stat,
SCIP_Real pseudoobjval 
)

gives current pseudo objective value

Parameters
nlpcurrent NLP data
setglobal SCIP settings
statproblem statistics
pseudoobjvalbuffer to store pseudo objective value

Definition at line 5624 of file nlp.c.

References SCIP_Nlp::divingobj, SCIP_Nlp::indiving, NULL, SCIP_Nlp::nvars, SCIP_CALL, SCIP_OKAY, SCIPnlrowGetPseudoActivity(), SCIPvarGetBestBoundLocal(), SCIPvarGetObj(), and SCIP_Nlp::vars.

◆ SCIPnlpGetFracVars()

SCIP_RETCODE SCIPnlpGetFracVars ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR ***  fracvars,
SCIP_Real **  fracvarssol,
SCIP_Real **  fracvarsfrac,
int *  nfracvars,
int *  npriofracvars 
)

gets fractional variables of last NLP solution along with solution values and fractionalities

Parameters
nlpNLP data structure
blkmemblock memory
setglobal SCIP settings
statproblem statistics
fracvarspointer to store the array of NLP fractional variables, or NULL
fracvarssolpointer to store the array of NLP fractional variables solution values, or NULL
fracvarsfracpointer to store the array of NLP fractional variables fractionalities, or NULL
nfracvarspointer to store the number of NLP fractional variables , or NULL
npriofracvarspointer to store the number of NLP fractional variables with maximal branching priority, or NULL

Definition at line 5653 of file nlp.c.

References SCIP_Nlp::fracvars, SCIP_Nlp::fracvarsfrac, SCIP_Nlp::fracvarssol, SCIP_Nlp::nfracvars, nlpCalcFracVars(), SCIP_Nlp::npriofracvars, NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPgetNLPFracVars().

◆ SCIPnlpRemoveRedundantNlRows()

SCIP_RETCODE SCIPnlpRemoveRedundantNlRows ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat 
)

removes all redundant nonlinear rows

Parameters
nlpcurrent NLP data
blkmemblock memory buffers
setglobal SCIP settings
statproblem statistics

Definition at line 5687 of file nlp.c.

References SCIP_Nlp::indiving, nlpDelNlRowPos(), SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPnlrowIsRedundant(), and SCIP_Nlp::solstat.

◆ SCIPnlpSetInitialGuess()

SCIP_RETCODE SCIPnlpSetInitialGuess ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_Real initguess 
)

set initial guess (approximate primal solution) for next solve

array initguess must be NULL or have length at least SCIPnlpGetNVars()

Parameters
nlpcurrent NLP data
blkmemblock memory buffers
initguessnew initial guess, or NULL to clear previous one

Definition at line 5733 of file nlp.c.

References BMSallocBlockMemoryArray, BMScopyMemoryArray, FALSE, SCIP_Nlp::haveinitguess, SCIP_Nlp::initialguess, NULL, SCIP_Nlp::nvars, SCIP_Nlp::problem, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPnlpiSetInitialGuess(), SCIP_Nlp::sizevars, SCIP_Nlp::solver, and TRUE.

Referenced by SCIPsetNLPInitialGuess(), and SCIPsetNLPInitialGuessSol().

◆ SCIPnlpWrite()

SCIP_RETCODE SCIPnlpWrite ( SCIP_NLP nlp,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
const char *  fname 
)

writes NLP to a file

Parameters
nlpcurrent NLP data
setglobal SCIP settings
messagehdlrmessage handler
fnamefile name

Definition at line 5768 of file nlp.c.

References SCIP_Nlp::name, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, SCIP_Nlp::nvars, SCIP_CALL, SCIP_FILECREATEERROR, SCIP_OKAY, SCIPerrorMessage, SCIPmessageFPrintInfo(), SCIPnlrowPrint(), SCIPvarPrint(), and SCIP_Nlp::vars.

Referenced by SCIPwriteNLP().

◆ SCIPnlpGetVars()

SCIP_VAR** SCIPnlpGetVars ( SCIP_NLP nlp)

gets array with variables of the NLP

Parameters
nlpcurrent NLP data

Definition at line 5819 of file nlp.c.

References NULL, and SCIP_Nlp::vars.

Referenced by SCIPgetNLPVars(), SCIPgetNLPVarsData(), SCIPsetNLPInitialGuessSol(), and SCIPsolLinkNLPSol().

◆ SCIPnlpGetNVars()

int SCIPnlpGetNVars ( SCIP_NLP nlp)

gets current number of variables in NLP

Parameters
nlpcurrent NLP data

Definition at line 5829 of file nlp.c.

References NULL, and SCIP_Nlp::nvars.

Referenced by SCIPgetNLPVarsData(), SCIPgetNNLPVars(), SCIPsetNLPInitialGuessSol(), and SCIPsolLinkNLPSol().

◆ SCIPnlpGetVarsNonlinearity()

SCIP_RETCODE SCIPnlpGetVarsNonlinearity ( SCIP_NLP nlp,
int *  nlcount 
)

computes for each variables the number of NLP rows in which the variable appears in a nonlinear var

Parameters
nlpcurrent NLP data
nlcountan array of length at least SCIPnlpGetNVars() to store nonlinearity counts of variables

Definition at line 5839 of file nlp.c.

References BMSclearMemoryArray, SCIP_NlRow::exprtree, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_NlRow::nquadvars, NULL, SCIP_Nlp::nvars, SCIP_NlRow::quadvars, SCIP_NlRow::quadvarshash, SCIP_OKAY, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), and SCIP_Nlp::varhash.

Referenced by SCIPgetNLPVarsNonlinearity().

◆ SCIPnlpHasContinuousNonlinearity()

SCIP_Bool SCIPnlpHasContinuousNonlinearity ( SCIP_NLP nlp)

indicates whether there exists a row that contains a continuous variable in a nonlinear term

Note
The method may have to touch every row and nonlinear term to compute its result.
Parameters
nlpcurrent NLP data

Definition at line 5900 of file nlp.c.

References SCIP_NlRow::exprtree, FALSE, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_NlRow::nquadvars, NULL, SCIP_NlRow::quadvars, SCIP_VARTYPE_CONTINUOUS, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPvarGetType(), and TRUE.

Referenced by SCIPhasNLPContinuousNonlinearity().

◆ SCIPnlpGetVarsLbDualsol()

SCIP_Real* SCIPnlpGetVarsLbDualsol ( SCIP_NLP nlp)

gives dual solution values associated with lower bounds of NLP variables

Parameters
nlpcurrent NLP data

Definition at line 5938 of file nlp.c.

References NULL, and SCIP_Nlp::varlbdualvals.

Referenced by SCIPgetNLPVarsLbDualsol().

◆ SCIPnlpGetVarsUbDualsol()

SCIP_Real* SCIPnlpGetVarsUbDualsol ( SCIP_NLP nlp)

gives dual solution values associated with upper bounds of NLP variables

Parameters
nlpcurrent NLP data

Definition at line 5948 of file nlp.c.

References NULL, and SCIP_Nlp::varubdualvals.

Referenced by SCIPgetNLPVarsUbDualsol().

◆ SCIPnlpGetNlRows()

SCIP_NLROW** SCIPnlpGetNlRows ( SCIP_NLP nlp)

gets array with nonlinear rows of the NLP

Parameters
nlpcurrent NLP data

Definition at line 5958 of file nlp.c.

References SCIP_Nlp::nlrows, and NULL.

Referenced by SCIPgetNLPNlRows(), and SCIPgetNLPNlRowsData().

◆ SCIPnlpGetNNlRows()

int SCIPnlpGetNNlRows ( SCIP_NLP nlp)

gets current number of nonlinear rows in NLP

Parameters
nlpcurrent NLP data

Definition at line 5968 of file nlp.c.

References SCIP_Nlp::nnlrows, and NULL.

Referenced by SCIPgetNLPNlRowsData(), and SCIPgetNNLPNlRows().

◆ SCIPnlpGetNLPI()

SCIP_NLPI* SCIPnlpGetNLPI ( SCIP_NLP nlp)

gets the NLP solver interface

Parameters
nlpcurrent NLP data

Definition at line 5978 of file nlp.c.

References NULL, and SCIP_Nlp::solver.

Referenced by SCIPgetNLPI().

◆ SCIPnlpGetNLPIProblem()

SCIP_NLPIPROBLEM* SCIPnlpGetNLPIProblem ( SCIP_NLP nlp)

gets the NLP problem in the solver interface

Parameters
nlpcurrent NLP data

Definition at line 5988 of file nlp.c.

References NULL, and SCIP_Nlp::problem.

Referenced by SCIPgetNLPI().

◆ SCIPnlpIsDiving()

SCIP_Bool SCIPnlpIsDiving ( SCIP_NLP nlp)

indicates whether NLP is currently in diving mode

Parameters
nlpcurrent NLP data

Definition at line 5998 of file nlp.c.

References SCIP_Nlp::indiving, and NULL.

◆ SCIPnlpGetSolstat()

SCIP_NLPSOLSTAT SCIPnlpGetSolstat ( SCIP_NLP nlp)

gets solution status of current NLP

Parameters
nlpcurrent NLP data

Definition at line 6008 of file nlp.c.

References NULL, and SCIP_Nlp::solstat.

Referenced by SCIPgetNLPSolstat(), SCIPlinkNLPSol(), and SCIPsolLinkNLPSol().

◆ SCIPnlpGetTermstat()

SCIP_NLPTERMSTAT SCIPnlpGetTermstat ( SCIP_NLP nlp)

gets termination status of last NLP solve

Parameters
nlpcurrent NLP data

Definition at line 6018 of file nlp.c.

References NULL, and SCIP_Nlp::termstat.

Referenced by SCIPgetNLPTermstat().

◆ SCIPnlpGetStatistics()

SCIP_RETCODE SCIPnlpGetStatistics ( SCIP_NLP nlp,
SCIP_NLPSTATISTICS statistics 
)

gives statistics (number of iterations, solving time, ...) of last NLP solve

Parameters
nlppointer to NLP datastructure
statisticspointer to store statistics

Definition at line 6028 of file nlp.c.

References NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetStatistics(), and SCIP_Nlp::solver.

Referenced by SCIPgetNLPStatistics().

◆ SCIPnlpHasSolution()

SCIP_Bool SCIPnlpHasSolution ( SCIP_NLP nlp)

indicates whether a feasible solution for the current NLP is available thus, returns whether the solution status <= feasible

Parameters
nlpcurrent NLP data

Definition at line 6045 of file nlp.c.

References NULL, SCIP_NLPSOLSTAT_FEASIBLE, and SCIP_Nlp::solstat.

Referenced by nlpCalcFracVars(), SCIPcreateNLPSol(), SCIPgetNlRowActivity(), SCIPgetNlRowFeasibility(), SCIPgetNlRowSolActivity(), SCIPgetNlRowSolFeasibility(), SCIPhasNLPSolution(), and SCIPrecalcNlRowActivity().

◆ SCIPnlpGetIntPar()

SCIP_RETCODE SCIPnlpGetIntPar ( SCIP_NLP nlp,
SCIP_NLPPARAM  type,
int *  ival 
)

gets integer parameter of NLP

Parameters
nlppointer to NLP datastructure
typeparameter number
ivalpointer to store the parameter value

Definition at line 6055 of file nlp.c.

References NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetIntPar(), and SCIP_Nlp::solver.

Referenced by SCIPgetNLPIntPar().

◆ SCIPnlpSetIntPar()

SCIP_RETCODE SCIPnlpSetIntPar ( SCIP_NLP nlp,
SCIP_NLPPARAM  type,
int  ival 
)

sets integer parameter of NLP

Parameters
nlppointer to NLP datastructure
typeparameter number
ivalparameter value

Definition at line 6072 of file nlp.c.

References NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiSetIntPar(), and SCIP_Nlp::solver.

Referenced by SCIPsetNLPIntPar().

◆ SCIPnlpGetRealPar()

SCIP_RETCODE SCIPnlpGetRealPar ( SCIP_NLP nlp,
SCIP_NLPPARAM  type,
SCIP_Real dval 
)

gets floating point parameter of NLP

Parameters
nlppointer to NLP datastructure
typeparameter number
dvalpointer to store the parameter value

Definition at line 6088 of file nlp.c.

References NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetRealPar(), and SCIP_Nlp::solver.

Referenced by SCIPgetNLPRealPar().

◆ SCIPnlpSetRealPar()

SCIP_RETCODE SCIPnlpSetRealPar ( SCIP_NLP nlp,
SCIP_NLPPARAM  type,
SCIP_Real  dval 
)

sets floating point parameter of NLP

Parameters
nlppointer to NLP datastructure
typeparameter number
dvalparameter value

Definition at line 6105 of file nlp.c.

References NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiSetRealPar(), and SCIP_Nlp::solver.

Referenced by SCIPsetNLPRealPar().

◆ SCIPnlpGetStringPar()

SCIP_RETCODE SCIPnlpGetStringPar ( SCIP_NLP nlp,
SCIP_NLPPARAM  type,
const char **  sval 
)

gets string parameter of NLP

Parameters
nlppointer to NLP datastructure
typeparameter number
svalpointer to store the parameter value

Definition at line 6121 of file nlp.c.

References NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetStringPar(), and SCIP_Nlp::solver.

Referenced by SCIPgetNLPStringPar().

◆ SCIPnlpSetStringPar()

SCIP_RETCODE SCIPnlpSetStringPar ( SCIP_NLP nlp,
SCIP_NLPPARAM  type,
const char *  sval 
)

sets string parameter of NLP

Parameters
nlppointer to NLP datastructure
typeparameter number
svalparameter value

Definition at line 6138 of file nlp.c.

References NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiSetStringPar(), and SCIP_Nlp::solver.

Referenced by SCIPsetNLPStringPar().

◆ SCIPnlpStartDive()

SCIP_RETCODE SCIPnlpStartDive ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set 
)

signals start of diving

Parameters
nlpcurrent NLP data
blkmemblock memory buffers
setglobal SCIP settings

Definition at line 6158 of file nlp.c.

References SCIP_Nlp::indiving, NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPnlpFlush(), SCIP_Nlp::solver, and TRUE.

Referenced by SCIPstartDiveNLP().

◆ SCIPnlpEndDive()

◆ SCIPnlpChgVarObjDive()

SCIP_RETCODE SCIPnlpChgVarObjDive ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR var,
SCIP_Real  coef 
)

changes coefficient of variable in diving NLP

Parameters
nlpcurrent NLP data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
varvariable which coefficient to change
coefnew linear coefficient of variable in objective

Definition at line 6249 of file nlp.c.

References SCIP_Nlp::divingobj, FALSE, SCIP_Nlp::indiving, NULL, SCIP_Nlp::nvars, SCIP_Nlp::objflushed, SCIP_Nlp::problem, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpiChgLinearCoefs(), SCIPnlrowChgLinearCoef(), SCIPnlrowCreate(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPvarGetObj(), SCIP_Nlp::solver, SCIP_Nlp::varhash, SCIP_Nlp::varmap_nlp2nlpi, and SCIP_Nlp::vars.

Referenced by SCIPchgVarObjDiveNLP().

◆ SCIPnlpChgVarBoundsDive()

SCIP_RETCODE SCIPnlpChgVarBoundsDive ( SCIP_NLP nlp,
SCIP_VAR var,
SCIP_Real  lb,
SCIP_Real  ub 
)

changes bounds of variable in diving NLP

Parameters
nlpcurrent NLP data
varvariable which coefficient to change
lbnew lower bound of variable
ubnew upper bound of variable

Definition at line 6309 of file nlp.c.

References SCIP_Nlp::indiving, NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpiChgVarBounds(), SCIP_Nlp::solver, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.

Referenced by SCIPchgVarBoundsDiveNLP().

◆ SCIPnlpChgVarsBoundsDive()

SCIP_RETCODE SCIPnlpChgVarsBoundsDive ( SCIP_NLP nlp,
SCIP_SET set,
int  nvars,
SCIP_VAR **  vars,
SCIP_Real lbs,
SCIP_Real ubs 
)

changes bounds of a set of variables in diving NLP

Parameters
nlpcurrent NLP data
setglobal SCIP settings
nvarsnumber of variables which bounds to change
varsvariables which bounds to change
lbsnew lower bounds of variables
ubsnew upper bounds of variables

Definition at line 6337 of file nlp.c.

References SCIP_Nlp::indiving, NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpiChgVarBounds(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIP_Nlp::solver, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.

Referenced by SCIPchgVarsBoundsDiveNLP().

◆ SCIPnlpIsDivingObjChanged()

SCIP_Bool SCIPnlpIsDivingObjChanged ( SCIP_NLP nlp)

returns whether the objective function has been changed during diving

Parameters
nlpcurrent NLP data

Definition at line 6381 of file nlp.c.

References SCIP_Nlp::divingobj, and NULL.

Referenced by SCIPsolLinkNLPSol().

◆ SCIPnlpSolveDive()

SCIP_RETCODE SCIPnlpSolveDive ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat 
)

solves diving NLP

Parameters
nlpcurrent NLP data
blkmemblock memory buffers
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics

Definition at line 6389 of file nlp.c.

References nlpSolve(), SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPsolveDiveNLP().