Scippy

SCIP

Solving Constraint Integer Programs

nlp.c File Reference

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 <assert.h>
#include <string.h>
#include "scip/def.h"
#include "scip/set.h"
#include "scip/stat.h"
#include "scip/intervalarith.h"
#include "scip/clock.h"
#include "scip/nlp.h"
#include "scip/var.h"
#include "scip/prob.h"
#include "scip/sol.h"
#include "scip/event.h"
#include "scip/pub_lp.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "nlpi/nlpi.h"
#include "nlpi/pub_expr.h"
#include "nlpi/struct_expr.h"
#include "scip/struct_nlp.h"
#include "scip/struct_set.h"
#include "scip/struct_scip.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_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)
 
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

#define EVENTHDLR_NAME   "nlpEventHdlr"

name of NLP event handler that catches variable events

Definition at line 59 of file nlp.c.

Referenced by SCIPnlpCreate(), and SCIPnlpInclude().

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

description of NLP event handler

Definition at line 60 of file nlp.c.

Referenced by SCIPnlpInclude().

#define ADDNAMESTONLPI   0

whether to give variable and row names to NLPI

Definition at line 61 of file nlp.c.

Function Documentation

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 41353 of file scip.c.

Referenced by applyOfins(), applyVbounds(), checkCurvature(), checkOverloadViaThetaTree(), checkSystemGF2(), checkVarnames(), collectBranchingCands(), consdataAddExprtrees(), copyAndSolveComponent(), createConsFromQuadTerm(), createCoveringProblem(), createExprtreeFromMonomial(), createNlRow(), createStartingData(), createSubSCIP(), createTcliqueGraph(), findCumulativeConss(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), initAlternativeLP(), initConflictgraph(), initData(), inithashmapandtable(), initImplGraphSOS1(), initPropdata(), initSepaData(), initSepaDataCreateVred(), nodepairqueueCreate(), preprocessCliques(), presoldataInitHashtables(), presolRoundVarsSOS1(), presolveDisaggregate(), presolveFindDuplicates(), readExpression(), readNonlinearExprs(), readPolynomial(), reformMonomial(), reformulate(), 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_READERREAD(), SCIP_DECL_READERWRITE(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyZeroobj(), SCIPcreateConsBivariate(), SCIPcreateConsLinking(), SCIPcreateConsQuadratic(), SCIPcreateWorstCaseProfile(), SCIPincludeConshdlrBivariate(), SCIPincludeConshdlrNonlinear(), SCIPincludeDefaultPlugins(), SCIPsetCopyPlugins(), SCIPvisualizeConsCumulative(), SCIPwriteLp(), SCIPwritePip(), searchEcAggrWithCliques(), setUpEvents(), setupProbingSCIP(), solveSubMIP(), solveSubproblem(), splitProblem(), and writeOpbConstraints().

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

SCIP_VAR** SCIPexprtreeGetVars ( SCIP_EXPRTREE tree)

returns variables of expression tree

Parameters
treeexpression tree

Definition at line 101 of file nlp.c.

References NULL, and SCIP_ExprTree::vars.

Referenced by addConcaveEstimatorBivariate(), addConcaveEstimatorMultivariate(), addConcaveEstimatorUnivariate(), addIntervalGradientEstimator(), addLinearization(), addUserEstimator(), checkCurvature(), computeViolation(), consdataAddExprtrees(), generate1ConvexIndefiniteUnderestimator(), generate1ConvexIndefiniteUnderestimatorAtBoundary(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), generateConvexConcaveEstimator(), generateConvexConcaveUnderestimator(), generateCut(), generateEstimatingHyperplane(), generateLinearizationCut(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateOverestimatingHyperplaneCut(), generateUnderestimatorParallelYFacets(), getGradientMaxElement(), getLinearAndQuadraticCoefs(), initSepaData(), isConvexLocal(), nlpAddNlRows(), nlpSetupNlpiIndices(), nlrowCalcActivityBounds(), nlrowExprtreeChanged(), printNonlinearRow(), printRowNl(), processNlRow(), readObjective(), registerBranchingVariables(), registerLargeLPValueVariableForBranching(), removeFixedVariables(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSEXITPRE(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSTRANS(), SCIP_DECL_EVENTEXEC(), SCIPcreateConsBivariate(), SCIPevalExprtreeGlobalBounds(), SCIPevalExprtreeLocalBounds(), SCIPevalExprtreeSol(), SCIPgetExprtreeTransformedVars(), SCIPnlpGetVarsNonlinearity(), SCIPnlpHasContinuousNonlinearity(), SCIPnlrowGetSolActivity(), SCIPnlrowRecalcNLPActivity(), SCIPnlrowRecalcPseudoActivity(), and SCIPwritePip().

SCIP_RETCODE SCIPexprtreeAddVars ( SCIP_EXPRTREE tree,
int  nvars,
SCIP_VAR **  vars 
)

adds variables to the expression tree variables array

Parameters
treeexpression tree
nvarsnumber of variables
varsvariables

Definition at line 143 of file nlp.c.

References SCIP_ExprTree::blkmem, BMScopyMemoryArray, BMSduplicateBlockMemoryArray, BMSreallocBlockMemoryArray, NULL, SCIP_ExprTree::nvars, SCIP_ALLOC, SCIP_OKAY, and SCIP_ExprTree::vars.

Referenced by createNlRow(), and SCIPexprtreeRemoveFixedVars().

int SCIPexprtreeFindVar ( SCIP_EXPRTREE tree,
SCIP_VAR var 
)

searches the variables array of an expression tree for a variable and returns its position, or -1 if not found Note that this is an O(n) operation!

Parameters
treeexpression tree
varvariable to search for

Definition at line 205 of file nlp.c.

References NULL, SCIP_ExprTree::nvars, and SCIP_ExprTree::vars.

Referenced by nlpDelVarPos(), and nlrowRemoveFixedVar().

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 223 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, SCIPcalcHashtableSize(), SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprFreeDeep(), SCIPexprReindexVars(), SCIPexprtreeAddVars(), SCIPexprtreeRemoveFixedVars(), SCIPexprtreeSubstituteVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarIsActive(), TRUE, and SCIP_ExprTree::vars.

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

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 491 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(), SCIPhashmapGetImage(), 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().

static SCIP_RETCODE nlrowQuadElemChanged ( SCIP_NLROW nlrow,
SCIP_SET set,
SCIP_STAT stat,
SCIP_QUADELEM  quadelem,
SCIP_NLP nlp 
)
static
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 681 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().

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

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 822 of file nlp.c.

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

Referenced by 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 840 of file nlp.c.

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

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

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 862 of file nlp.c.

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

Referenced by nlrowDelLinearCoefPos(), and nlrowRemoveFixedLinearCoefPos().

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 885 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, SCIPdebugMessage, SCIPnlrowEnsureLinearSize(), SCIPsetIsZero(), SCIPvarCompare(), SCIPvarGetName(), and SCIPvarIsActive().

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

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

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

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 1038 of file nlp.c.

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

Referenced by SCIPnlrowChgLinearCoef().

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 1068 of file nlp.c.

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

Referenced by SCIPnlrowAddQuadVar(), and SCIPnlrowCreate().

static void nlrowSortQuadElem ( SCIP_NLROW nlrow)
static

sorts quadratic part of row entries

Parameters
nlrownonlinear row to be sorted

Definition at line 1094 of file nlp.c.

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

Referenced by 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 1113 of file nlp.c.

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

Referenced by SCIPnlrowChgQuadElem(), and SCIPnlrowDelQuadElement().

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 1136 of file nlp.c.

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

Referenced by nlrowDelQuadElemPos().

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 1157 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, SCIPdebugMessage, SCIPnlrowEnsureQuadElementsSize(), SCIPsetIsZero(), and SCIPvarGetName().

Referenced by SCIPnlrowAddQuadElement(), and SCIPnlrowChgQuadElem().

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 1202 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 SCIPdebugMessage.

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

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 1234 of file nlp.c.

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

Referenced by SCIPnlrowChgQuadElem().

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 1357 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(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), and SCIPvarIsActive().

Referenced by nlrowRemoveFixedLinearCoefs(), and nlrowRemoveFixedVar().

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 1457 of file nlp.c.

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

Referenced by SCIPnlrowRemoveFixedVars().

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

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 1950 of file nlp.c.

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

Referenced by nlpRemoveFixedVar().

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 
)

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

Definition at line 1995 of file nlp.c.

References BMSallocBlockMemory, BMSduplicateBlockMemoryArray, FALSE, MAX, MIN, 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().

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 
)

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 2177 of file nlp.c.

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

Referenced by SCIPcreateNlRowFromRow().

SCIP_RETCODE SCIPnlrowFree ( SCIP_NLROW **  nlrow,
BMS_BLKMEM blkmem 
)

frees a nonlinear row

Parameters
nlrowpointer to NLP row
blkmemblock memory

Definition at line 2242 of file nlp.c.

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

Referenced by SCIPnlrowRelease().

void SCIPnlrowCapture ( SCIP_NLROW nlrow)

increases usage counter of NLP nonlinear row

Parameters
nlrownonlinear row to capture

Definition at line 2334 of file nlp.c.

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

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

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 2346 of file nlp.c.

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

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

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

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

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

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 2476 of file nlp.c.

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

Referenced by SCIPchgNlRowLinearCoef(), and SCIPnlpChgVarObjDive().

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

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 2538 of file nlp.c.

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

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

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

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 2597 of file nlp.c.

References nlrowAddQuadElement(), SCIP_CALL, and SCIP_OKAY.

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

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 2612 of file nlp.c.

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

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

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

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 2717 of file nlp.c.

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

Referenced by SCIPsetNlRowExprtreeParam().

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 2740 of file nlp.c.

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

Referenced by SCIPsetNlRowExprtreeParams().

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 2762 of file nlp.c.

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

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

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 2782 of file nlp.c.

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

Referenced by SCIPchgNlRowLhs().

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 2802 of file nlp.c.

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

Referenced by SCIPchgNlRowRhs().

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 2822 of file nlp.c.

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

Referenced by nlpAddNlRows().

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

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 2942 of file nlp.c.

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

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

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

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 3043 of file nlp.c.

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

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

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 
)

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 3148 of file nlp.c.

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

Referenced by SCIPgetNlRowSolFeasibility().

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

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

SCIP_Real SCIPnlrowGetConstant ( SCIP_NLROW nlrow)

gets constant

Parameters
nlrowNLP row

Definition at line 3225 of file nlp.c.

References SCIP_NlRow::constant, and NULL.

Referenced by nlrowaggrCreate().

int SCIPnlrowGetNLinearVars ( SCIP_NLROW nlrow)

gets number of variables of linear part

Parameters
nlrowNLP row

Definition at line 3235 of file nlp.c.

References SCIP_NlRow::nlinvars, and NULL.

Referenced by nlrowaggrCreate().

SCIP_VAR** SCIPnlrowGetLinearVars ( SCIP_NLROW nlrow)

gets array with variables of linear part

Parameters
nlrowNLP row

Definition at line 3245 of file nlp.c.

References SCIP_NlRow::linvars, and NULL.

Referenced by nlrowaggrCreate().

SCIP_Real* SCIPnlrowGetLinearCoefs ( SCIP_NLROW nlrow)

gets array with coefficients in linear part

Parameters
nlrowNLP row

Definition at line 3255 of file nlp.c.

References SCIP_NlRow::lincoefs, and NULL.

Referenced by nlrowaggrCreate().

int SCIPnlrowGetNQuadVars ( SCIP_NLROW nlrow)

gets number of quadratic variables in quadratic part

Parameters
nlrowNLP row

Definition at line 3265 of file nlp.c.

References SCIP_NlRow::nquadvars, and NULL.

Referenced by createMIP(), createTcliqueGraph(), findAndStoreEcAggregations(), isCandidate(), nlrowaggrCreate(), SCIPaddQuadVarsToNlRow(), searchEcAggr(), and searchEcAggrWithCliques().

SCIP_VAR** SCIPnlrowGetQuadVars ( SCIP_NLROW nlrow)

gets quadratic variables in quadratic part

Parameters
nlrowNLP row

Definition at line 3275 of file nlp.c.

References NULL, and SCIP_NlRow::quadvars.

Referenced by computeInteriorPoint(), createMIP(), createTcliqueGraph(), isCandidate(), nlrowaggrCreate(), processNlRow(), and searchEcAggr().

int SCIPnlrowSearchQuadVar ( SCIP_NLROW nlrow,
SCIP_VAR var 
)

gives position of variable in quadvars array of row, or -1 if not found

Parameters
nlrownonlinear row
varvariable to search for

Definition at line 3285 of file nlp.c.

References SCIP_NlRow::nquadvars, NULL, SCIP_NlRow::quadvars, SCIP_NlRow::quadvarshash, SCIPhashmapExists(), and SCIPhashmapGetImage().

Referenced by createNlRow(), nlpDelVarPos(), nlrowRemoveFixedQuadVars(), nlrowRemoveFixedVar(), and SCIPnlrowAddQuadVar().

int SCIPnlrowGetNQuadElems ( SCIP_NLROW nlrow)

gets number of quadratic elements in quadratic part

Parameters
nlrowNLP row

Definition at line 3312 of file nlp.c.

References SCIP_NlRow::nquadelems, and NULL.

Referenced by computeInteriorPoint(), createMIP(), createTcliqueGraph(), isCandidate(), nlrowaggrCreate(), processNlRow(), SCIPaddQuadElementsToNlRow(), searchEcAggr(), searchEcAggrWithCliques(), storeAggrFromMIP(), and updateMIP().

SCIP_QUADELEM* SCIPnlrowGetQuadElems ( SCIP_NLROW nlrow)

gets quadratic elements in quadratic part

Parameters
nlrowNLP row

Definition at line 3322 of file nlp.c.

References NULL, and SCIP_NlRow::quadelems.

Referenced by computeInteriorPoint(), createMIP(), createTcliqueGraph(), isCandidate(), nlrowaggrCreate(), processNlRow(), searchEcAggrWithCliques(), storeAggrFromMIP(), and updateMIP().

void SCIPnlrowGetQuadData ( SCIP_NLROW nlrow,
int *  nquadvars,
SCIP_VAR ***  quadvars,
int *  nquadelems,
SCIP_QUADELEM **  quadelems 
)

gets array with coefficients in linear part

Parameters
nlrowNLP row
nquadvarsbuffer to store number of variables in quadratic term, or NULL if not of interest
quadvarsbuffer to store pointer to array of variables in quadratic term, or NULL if not of interest
nquadelemsbuffer to store number of entries in quadratic term, or NULL if not of interest
quadelemsbuffer to store pointer to array of entries in quadratic term, or NULL if not of interest

Definition at line 3332 of file nlp.c.

References SCIP_NlRow::nquadelems, SCIP_NlRow::nquadvars, NULL, SCIP_NlRow::quadelems, and SCIP_NlRow::quadvars.

SCIP_EXPRTREE* SCIPnlrowGetExprtree ( SCIP_NLROW nlrow)

gets expression tree

Parameters
nlrowNLP row

Definition at line 3353 of file nlp.c.

References SCIP_NlRow::exprtree, and NULL.

Referenced by isCandidate(), and processNlRow().

SCIP_Real SCIPnlrowGetLhs ( SCIP_NLROW nlrow)

returns the left hand side of a nonlinear row

Parameters
nlrowNLP row

Definition at line 3363 of file nlp.c.

References SCIP_NlRow::lhs, and NULL.

Referenced by findAndStoreEcAggregations(), isCandidate(), nlrowaggrCreate(), and processNlRow().

SCIP_Real SCIPnlrowGetRhs ( SCIP_NLROW nlrow)

returns the right hand side of a nonlinear row

Parameters
nlrowNLP row

Definition at line 3373 of file nlp.c.

References NULL, and SCIP_NlRow::rhs.

Referenced by findAndStoreEcAggregations(), isCandidate(), nlrowaggrCreate(), and processNlRow().

const char* SCIPnlrowGetName ( SCIP_NLROW nlrow)

returns the name of a nonlinear row

Parameters
nlrowNLP row

Definition at line 3383 of file nlp.c.

References SCIP_NlRow::name, and NULL.

Referenced by processNlRow().

int SCIPnlrowGetNLPPos ( SCIP_NLROW nlrow)

gets position of a nonlinear row in current NLP, or -1 if not in NLP

Parameters
nlrowNLP row

Definition at line 3393 of file nlp.c.

References SCIP_NlRow::nlpindex, and NULL.

SCIP_Bool SCIPnlrowIsInNLP ( SCIP_NLROW nlrow)

returns TRUE iff row is member of current NLP

Parameters
nlrowNLP row

Definition at line 3403 of file nlp.c.

References SCIP_NlRow::nlpindex, and NULL.

Referenced by computeCut(), isCandidate(), and isPossibleToComputeCut().

SCIP_Real SCIPnlrowGetDualsol ( SCIP_NLROW nlrow)

gets the dual NLP solution of a nlrow for a ranged constraint, the dual value is positive if the right hand side is active and negative if the left hand side is active

Parameters
nlrowNLP row

Definition at line 3415 of file nlp.c.

References SCIP_NlRow::dualsol, SCIP_NlRow::nlpiindex, and NULL.

Referenced by SCIPapplyHeurDualval().

static SCIP_RETCODE nlpAddNlRows ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
int  nnlrows,
SCIP_NLROW **  nlrows 
)
static
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 3555 of file nlp.c.

References SCIP_NlRow::nlpindex, SCIP_Nlp::nlrows, and NULL.

Referenced by nlpDelNlRowPos().

static SCIP_RETCODE nlpDelNlRowPos ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set,
int  pos 
)
static
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 3628 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(), SCIPhashmapGetImage(), 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().

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 3687 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(), SCIPhashmapGetImage(), SCIPnlpiChgLinearCoefs(), SCIPvarGetObj(), SCIP_Nlp::solstat, SCIP_Nlp::solver, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.

Referenced by nlpAddVars(), and SCIP_DECL_EVENTEXEC().

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 3827 of file nlp.c.

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

Referenced by nlpDelVarPos().

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

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 3978 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(), SCIPhashmapGetImage(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPvarIsActive(), SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.

Referenced by nlpFlushNlRowAdditions().

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

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

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

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

static SCIP_RETCODE nlpFlushNlRowAdditions ( SCIP_NLP nlp,
BMS_BLKMEM blkmem,
SCIP_SET set 
)
static
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 4489 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().

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

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 4988 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 SCIPcreate().

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 5013 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, SCIPcalcHashtableSize(), SCIPerrorMessage, SCIPeventfilterAdd(), SCIPhashmapCreate(), SCIPnlpiCreateProblem(), SCIPsetFindEventhdlr(), SCIPsetFindNlpi(), SCIPsetSortNlpis(), and TRUE.

Referenced by initSolve().

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 5134 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 freeSolve().

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 5193 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::solstat, and SCIP_Nlp::termstat.

Referenced by SCIPnlpFree().

SCIP_Bool SCIPnlpHasCurrentNodeNLP ( SCIP_NLP nlp)

currently a dummy function that always returns TRUE

Parameters
nlpNLP data

Definition at line 5234 of file nlp.c.

References TRUE.

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

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

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

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 5302 of file nlp.c.

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

Referenced by initSolve().

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 5327 of file nlp.c.

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

Referenced by nlpRemoveFixedVar(), and SCIP_DECL_EVENTEXEC().

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

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 5391 of file nlp.c.

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

Referenced by SCIPaddNlRow().

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 5415 of file nlp.c.

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

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 5443 of file nlp.c.

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

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 5511 of file nlp.c.

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

Referenced by SCIPsolveNLP().

SCIP_Real SCIPnlpGetObjval ( SCIP_NLP nlp)

gets objective value of current NLP

Parameters
nlpcurrent NLP data

Definition at line 5538 of file nlp.c.

References NULL, and SCIP_Nlp::primalsolobjval.

Referenced by SCIPgetNLPObjval(), and SCIPsolLinkNLPSol().

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

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

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

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 5657 of file nlp.c.

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

Referenced by SCIPsetNLPInitialGuess(), and SCIPsetNLPInitialGuessSol().

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

SCIP_VAR** SCIPnlpGetVars ( SCIP_NLP nlp)

gets array with variables of the NLP

Parameters
nlpcurrent NLP data

Definition at line 5741 of file nlp.c.

References NULL, and SCIP_Nlp::vars.

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

int SCIPnlpGetNVars ( SCIP_NLP nlp)

gets current number of variables in NLP

Parameters
nlpcurrent NLP data

Definition at line 5751 of file nlp.c.

References NULL, and SCIP_Nlp::nvars.

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

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 5761 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(), SCIPhashmapGetImage(), and SCIP_Nlp::varhash.

Referenced by SCIPgetNLPVarsNonlinearity().

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

SCIP_Real* SCIPnlpGetVarsLbDualsol ( SCIP_NLP nlp)

gives dual solution values associated with lower bounds of NLP variables

Parameters
nlpcurrent NLP data

Definition at line 5858 of file nlp.c.

References NULL, and SCIP_Nlp::varlbdualvals.

Referenced by SCIPgetNLPVarsLbDualsol().

SCIP_Real* SCIPnlpGetVarsUbDualsol ( SCIP_NLP nlp)

gives dual solution values associated with upper bounds of NLP variables

Parameters
nlpcurrent NLP data

Definition at line 5868 of file nlp.c.

References NULL, and SCIP_Nlp::varubdualvals.

Referenced by SCIPgetNLPVarsUbDualsol().

SCIP_NLROW** SCIPnlpGetNlRows ( SCIP_NLP nlp)

gets array with nonlinear rows of the NLP

Parameters
nlpcurrent NLP data

Definition at line 5878 of file nlp.c.

References SCIP_Nlp::nlrows, and NULL.

Referenced by SCIPgetNLPNlRows(), and SCIPgetNLPNlRowsData().

int SCIPnlpGetNNlRows ( SCIP_NLP nlp)

gets current number of nonlinear rows in NLP

Parameters
nlpcurrent NLP data

Definition at line 5888 of file nlp.c.

References SCIP_Nlp::nnlrows, and NULL.

Referenced by SCIPgetNLPNlRowsData(), and SCIPgetNNLPNlRows().

SCIP_NLPI* SCIPnlpGetNLPI ( SCIP_NLP nlp)

gets the NLP solver interface

Parameters
nlpcurrent NLP data

Definition at line 5898 of file nlp.c.

References NULL, and SCIP_Nlp::solver.

Referenced by SCIPgetNLPI().

SCIP_NLPIPROBLEM* SCIPnlpGetNLPIProblem ( SCIP_NLP nlp)

gets the NLP problem in the solver interface

Parameters
nlpcurrent NLP data

Definition at line 5908 of file nlp.c.

References NULL, and SCIP_Nlp::problem.

Referenced by SCIPgetNLPI().

SCIP_Bool SCIPnlpIsDiving ( SCIP_NLP nlp)

indicates whether NLP is currently in diving mode

Parameters
nlpcurrent NLP data

Definition at line 5918 of file nlp.c.

References SCIP_Nlp::indiving, and NULL.

SCIP_NLPSOLSTAT SCIPnlpGetSolstat ( SCIP_NLP nlp)

gets solution status of current NLP

Parameters
nlpcurrent NLP data

Definition at line 5928 of file nlp.c.

References NULL, and SCIP_Nlp::solstat.

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

SCIP_NLPTERMSTAT SCIPnlpGetTermstat ( SCIP_NLP nlp)

gets termination status of last NLP solve

Parameters
nlpcurrent NLP data

Definition at line 5938 of file nlp.c.

References NULL, and SCIP_Nlp::termstat.

Referenced by SCIPgetNLPTermstat().

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 5948 of file nlp.c.

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

Referenced by SCIPgetNLPStatistics().

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 5965 of file nlp.c.

References NULL, SCIP_NLPSOLSTAT_FEASIBLE, and SCIP_Nlp::solstat.

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

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 5975 of file nlp.c.

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

Referenced by SCIPgetNLPIntPar().

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 5992 of file nlp.c.

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

Referenced by SCIPsetNLPIntPar().

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 6008 of file nlp.c.

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

Referenced by SCIPgetNLPRealPar().

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 6025 of file nlp.c.

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

Referenced by SCIPsetNLPRealPar().

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 6041 of file nlp.c.

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

Referenced by SCIPgetNLPStringPar().

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 6058 of file nlp.c.

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

Referenced by SCIPsetNLPStringPar().

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

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 6169 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_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPnlpiChgLinearCoefs(), SCIPnlrowChgLinearCoef(), SCIPnlrowCreate(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPvarGetObj(), SCIP_Nlp::solver, SCIP_Nlp::varhash, SCIP_Nlp::varmap_nlp2nlpi, and SCIP_Nlp::vars.

Referenced by SCIPchgVarObjDiveNLP().

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 6228 of file nlp.c.

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

Referenced by SCIPchgVarBoundsDiveNLP().

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 6256 of file nlp.c.

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

Referenced by SCIPchgVarsBoundsDiveNLP().

SCIP_Bool SCIPnlpIsDivingObjChanged ( SCIP_NLP nlp)

returns whether the objective function has been changed during diving

Parameters
nlpcurrent NLP data

Definition at line 6300 of file nlp.c.

References SCIP_Nlp::divingobj, and NULL.

Referenced by SCIPsolLinkNLPSol().

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 6308 of file nlp.c.

References nlpSolve(), SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPsolveDiveNLP().