NLP management methods and datastructures.
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 |
#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 |
BMS_BLKMEM* SCIPblkmem | ( | SCIP * | scip | ) |
returns block memory to use at the current time
scip | SCIP data structure |
Definition at line 46725 of file scip.c.
Referenced by addBranchingComplementaritiesSOS1(), addVarCardinality(), appendVarCardinality(), applyHeur(), applyNlobbt(), buildMod2Matrix(), checkConsnames(), checkCurvature(), checkOverloadViaThetaTree(), checkSystemGF2(), checkVarnames(), collectBranchingCands(), computeComponents(), computeED(), computeInteriorPoint(), computeSymmetryGroup(), consdataAddExprtrees(), copyConsPseudoboolean(), createAndSplitProblem(), createConsFromQuadTerm(), createCoveringProblem(), createExprtreeFromMonomial(), createNLP(), createNlRow(), createStartingData(), createSubSCIP(), createTcliqueGraph(), destroyMod2Matrix(), doSolveSubMIP(), enforceConflictgraph(), findCumulativeConss(), freeSubSCIP(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternA(), generate1ConvexIndefiniteUnderestimatorInTheInteriorPatternB(), generateOrthogonal_lx_ly_Underestimator(), generateOrthogonal_lx_uy_Underestimator(), generateUnderestimatorParallelYFacets(), heurExec(), initAlternativeLP(), initConcsolver(), initConflictgraph(), initData(), inithashmapandtable(), initImplGraphSOS1(), initPropdata(), initSepaData(), initSepaDataCreateVred(), mod2MatrixAddCol(), mod2MatrixAddTransRow(), mod2matrixPreprocessColumns(), mod2matrixPreprocessRows(), mod2matrixRemoveCol(), mod2rowAddRow(), nodepairqueueCreate(), preprocessCliques(), presoldataInitHashtables(), presolRoundVarsSOS1(), presolveDisaggregate(), presolveFindDuplicates(), 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_PRESOLEXEC(), SCIP_DECL_PROPEXITSOL(), SCIP_DECL_PROPINITSOL(), SCIP_DECL_READERREAD(), SCIP_DECL_READERWRITE(), SCIP_DECL_RELAXEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPapplyProximity(), SCIPcreateBanditEpsgreedy(), SCIPcreateBanditExp3(), SCIPcreateBanditUcb(), SCIPcreateConsBivariate(), SCIPcreateConsCardinality(), SCIPcreateConsIndicator(), SCIPcreateConsLinking(), SCIPcreateConsQuadratic(), SCIPcreateWorstCaseProfile(), SCIPfreeBandit(), SCIPincludeConshdlrBivariate(), SCIPincludeConshdlrNonlinear(), SCIPincludeDefaultPlugins(), SCIPincrementConcurrentTime(), SCIPvariableGraphCreate(), SCIPvisualizeConsCumulative(), SCIPwriteLp(), SCIPwritePip(), searchEcAggrWithCliques(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipLocalbranching(), setupAndSolveSubscipMutation(), setupAndSolveSubscipOneopt(), setupAndSolveSubscipRapidlearning(), setUpEvents(), setupProbingSCIP(), setupProblem(), setupSubscipLpface(), solveSubproblem(), wrapperDins(), wrapperRins(), writeBounds(), writeOpb(), and writeOpbConstraints().
|
static |
NLP event handler execution method
event handling for variable events
Definition at line 4979 of file nlp.c.
References nlpRemoveFixedVar(), nlpUpdateObjCoef(), nlpUpdateVarBounds(), SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_FORMAT, SCIP_EVENTTYPE_OBJCHANGED, SCIP_EVENTTYPE_VARADDED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPblkmem(), SCIPdebugMessage, SCIPerrorMessage, SCIPeventGetType(), SCIPeventGetVar(), SCIPnlpAddVar(), SCIPnlpDelVar(), and SCIPvarGetName().
|
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!
nlp | current NLP data |
set | global SCIP settings |
stat | problem statistics data |
nlrow | nonlinear row which was changed |
Definition at line 3462 of file nlp.c.
References SCIP_Nlp::indiving, SCIP_NlRow::nlpindex, 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_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
tree | expression tree |
set | global SCIP settings |
changed | buffer to store whether the tree was changed, i.e., whether there was a fixed variable |
varpos | array 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 |
newvarsstart | buffer 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, SCIP_ExprTree::nvars, SCIP_ExprTree::root, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_EXPR_CONST, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprFreeDeep(), SCIPexprReindexVars(), SCIPexprtreeAddVars(), SCIPexprtreeRemoveFixedVars(), SCIPexprtreeSubstituteVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarIsActive(), TRUE, and SCIP_ExprTree::vars.
Referenced by nlrowRemoveFixedExprtreeVars(), SCIPexprtreeRemoveFixedVars(), and SCIPnlrowChgExprtree().
|
static |
announces, that the given linear coefficient in the constraint matrix changed
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
var | variable which coefficient changed |
coef | new coefficient of variable, 0.0 if deleted |
nlp | current NLP data |
Definition at line 496 of file nlp.c.
References SCIP_NlRow::activity, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), 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 |
announces, that an element in the quadratic part of a nonlinear row changed
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
quadelem | new element (variable indices and new values), quadelem.coef == 0 if it was deleted |
nlp | current NLP data |
Definition at line 546 of file nlp.c.
References SCIP_NlRow::activity, SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), SCIP_NlRow::nquadvars, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::problem, SCIP_NlRow::pseudoactivity, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPnlpiChgQuadCoefs(), SCIP_Nlp::solver, SCIP_NlRow::validactivitybdsdomchg, SCIP_NlRow::validactivitynlp, SCIP_NlRow::validpsactivitydomchg, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.
Referenced by nlrowAddQuadElement(), nlrowChgQuadElemPos(), and nlrowDelQuadElemPos().
|
static |
announces, that an expression tree changed
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
Definition at line 619 of file nlp.c.
References SCIP_NlRow::activity, SCIP_NlRow::exprtree, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), SCIP_Nlp::problem, SCIP_NlRow::pseudoactivity, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPnlpiChgExprtree(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPvarIsActive(), SCIP_Nlp::solver, SCIP_NlRow::validactivitybdsdomchg, SCIP_NlRow::validactivitynlp, SCIP_NlRow::validpsactivitydomchg, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.
Referenced by nlrowRemoveFixedExprtreeVars(), and SCIPnlrowChgExprtree().
|
static |
announces, that a parameter in an expression tree has changed
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
paramidx | index of parameter which has changed, or -1 if all changed |
nlp | current NLP data |
Definition at line 686 of file nlp.c.
References SCIP_NlRow::activity, SCIP_NlRow::exprtree, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), 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 |
notifies nonlinear row, that its sides were changed
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
Definition at line 743 of file nlp.c.
References SCIP_NlRow::constant, SCIP_NlRow::lhs, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), SCIP_Nlp::problem, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiChgConsSides(), SCIPsetIsInfinity(), and SCIP_Nlp::solver.
Referenced by SCIPnlrowChgLhs(), and SCIPnlrowChgRhs().
|
static |
notifies nonlinear row, that its constant was changed
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
Definition at line 781 of file nlp.c.
References SCIP_NlRow::activity, SCIP_NlRow::constant, SCIP_NlRow::lhs, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpRowChanged(), SCIP_Nlp::problem, SCIP_NlRow::pseudoactivity, SCIP_NlRow::rhs, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPnlpiChgConsSides(), SCIPsetIsInfinity(), SCIP_Nlp::solver, SCIP_NlRow::validactivitybdsdomchg, SCIP_NlRow::validactivitynlp, and SCIP_NlRow::validpsactivitydomchg.
Referenced by nlrowAddToLinearCoef(), nlrowRemoveFixedLinearCoefPos(), nlrowRemoveFixedQuadVars(), and SCIPnlrowChgConstant().
|
static |
sorts linear part of row entries such that lower variable indices precede higher ones
nlrow | nonlinear row to be sorted |
Definition at line 827 of file nlp.c.
References SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, SCIP_NlRow::nlinvars, SCIPsortPtrReal(), and TRUE.
Referenced by nlrowSearchLinearCoef().
|
static |
searches linear variable in nonlinear row, returns position in linvars vector or -1 if not found
nlrow | nonlinear row to be searched in |
var | variable to be searched for |
Definition at line 845 of file nlp.c.
References SCIP_NlRow::linvars, SCIP_NlRow::nlinvars, nlrowSortLinear(), and SCIPsortedvecFindPtr().
Referenced by nlpDelVarPos(), nlrowAddToLinearCoef(), nlrowRemoveFixedVar(), SCIPnlrowChgLinearCoef(), and SCIPnlrowDelLinearCoef().
|
static |
moves a coefficient in a nonlinear row to a different place, and updates all corresponding data structures
nlrow | NLP row |
oldpos | old position of coefficient |
newpos | new position of coefficient |
Definition at line 867 of file nlp.c.
References FALSE, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, and SCIP_NlRow::linvarssorted.
Referenced by nlrowDelLinearCoefPos(), and nlrowRemoveFixedLinearCoefPos().
|
static |
adds a previously non existing linear coefficient to a nonlinear row
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
var | variable |
coef | value of coefficient |
Definition at line 890 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(), SCIP_CALL, SCIP_OKAY, SCIPnlrowEnsureLinearSize(), SCIPsetDebugMsg, SCIPsetIsZero(), SCIPvarCompare(), SCIPvarGetName(), and SCIPvarIsActive().
Referenced by nlrowAddToLinearCoef(), nlrowRemoveFixedLinearCoefPos(), SCIPnlrowAddLinearCoef(), and SCIPnlrowChgLinearCoef().
|
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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
var | variable |
coef | value of coefficient |
removefixed | whether to disaggregate var before adding |
Definition at line 937 of file nlp.c.
References SCIP_NlRow::constant, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, nlrowAddLinearCoef(), nlrowConstantChanged(), nlrowSearchLinearCoef(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPsetIsZero(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarIsActive(), and TRUE.
Referenced by nlrowRemoveFixedQuadVars().
|
static |
deletes coefficient at given position from row
nlrow | nonlinear row to be changed |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
pos | position in row vector to delete |
Definition at line 1014 of file nlp.c.
References FALSE, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, SCIP_NlRow::nlinvars, nlrowLinearCoefChanged(), nlrowMoveLinearCoef(), SCIP_CALL, and SCIP_OKAY.
Referenced by nlrowChgLinearCoefPos(), nlrowRemoveFixedLinearCoefPos(), and SCIPnlrowDelLinearCoef().
|
static |
changes a coefficient at given position of a nonlinear row
nlrow | NLP row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
pos | position in row vector to change |
coef | new value of coefficient |
Definition at line 1043 of file nlp.c.
References SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, nlrowDelLinearCoefPos(), nlrowLinearCoefChanged(), SCIP_CALL, SCIP_OKAY, SCIPsetIsEQ(), and SCIPsetIsZero().
Referenced by SCIPnlrowChgLinearCoef().
|
static |
sets up the variable hash for quadratic variables, if the number of variables exceeds some given threshold
nlrow | nonlinear row |
blkmem | block memory |
Definition at line 1073 of file nlp.c.
References SCIP_NlRow::nquadvars, SCIP_NlRow::quadvars, SCIP_NlRow::quadvarshash, SCIP_CALL, SCIP_OKAY, SCIPhashmapCreate(), and SCIPhashmapInsert().
Referenced by SCIPnlrowAddQuadVar(), and SCIPnlrowCreate().
|
static |
sorts quadratic part of row entries
nlrow | nonlinear row to be sorted |
Definition at line 1099 of file nlp.c.
References SCIP_NlRow::nquadelems, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssorted, SCIPquadelemSort(), and TRUE.
Referenced by nlrowSearchQuadElem().
|
static |
searches quadratic elements in nonlinear row, returns position of given index pair in quadelems array or -1 if not found
nlrow | nonlinear row to be searched in |
idx1 | index of first variable to be searched for |
idx2 | index of second variable to be searched for |
Definition at line 1118 of file nlp.c.
References nlrowSortQuadElem(), SCIP_NlRow::nquadelems, SCIP_NlRow::quadelems, and SCIPquadelemSortedFind().
Referenced by SCIPnlrowChgQuadElem(), and SCIPnlrowDelQuadElement().
|
static |
moves a quadratic element in a nonlinear row to a different place, and updates all corresponding data structures
nlrow | NLP row |
oldpos | old position of coefficient |
newpos | new position of coefficient |
Definition at line 1141 of file nlp.c.
References FALSE, SCIP_NlRow::quadelems, and SCIP_NlRow::quadelemssorted.
Referenced by nlrowDelQuadElemPos().
|
static |
adds a previously non existing quadratic element to a nonlinear row
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
elem | quadratic element to add |
Definition at line 1162 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, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssorted, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_OKAY, SCIPnlrowEnsureQuadElementsSize(), SCIPsetDebugMsg, SCIPsetIsZero(), and SCIPvarGetName().
Referenced by SCIPnlrowAddQuadElement(), and SCIPnlrowChgQuadElem().
|
static |
deletes coefficient at given position from row
nlrow | nonlinear row to be changed |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
pos | position in row vector to delete |
Definition at line 1207 of file nlp.c.
References SCIP_QuadElement::coef, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, nlrowMoveQuadElement(), nlrowQuadElemChanged(), SCIP_NlRow::nquadelems, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssorted, SCIP_CALL, SCIP_OKAY, and SCIPsetDebugMsg.
Referenced by nlrowChgQuadElemPos(), nlrowRemoveFixedQuadVars(), and SCIPnlrowDelQuadElement().
|
static |
changes a coefficient at given position of quadratic element in nonlinear row
nlrow | NLP row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
pos | position in quadratic elements array to change |
coef | new value of coefficient |
Definition at line 1239 of file nlp.c.
References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, nlrowDelQuadElemPos(), nlrowQuadElemChanged(), SCIP_NlRow::quadelems, SCIP_CALL, SCIP_OKAY, SCIPsetDebugMsg, SCIPsetIsEQ(), and SCIPsetIsZero().
Referenced by SCIPnlrowChgQuadElem().
|
static |
calculates minimal and maximal activity of row w.r.t. the variable's bounds
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
Definition at line 1270 of file nlp.c.
References SCIP_QuadElement::coef, SCIP_NlRow::constant, SCIP_Stat::domchgcount, SCIP_NlRow::exprtree, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_Interval::inf, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::nlinvars, SCIP_NlRow::nquadelems, SCIP_NlRow::quadelems, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPexprtreeEvalInt(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPintervalAdd(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalIsEntire(), SCIPintervalMulScalar(), SCIPintervalQuad(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and SCIP_NlRow::validactivitybdsdomchg.
Referenced by SCIPnlrowGetActivityBounds().
|
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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
pos | position of variable in linear variables array |
Definition at line 1362 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(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPnlrowEnsureLinearSize(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), and SCIPvarIsActive().
Referenced by nlrowRemoveFixedLinearCoefs(), and nlrowRemoveFixedVar().
|
static |
removes fixed variables from the linear part of a nonlinear row
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
Definition at line 1462 of file nlp.c.
References SCIP_NlRow::linvars, SCIP_NlRow::nlinvars, nlrowRemoveFixedLinearCoefPos(), SCIP_CALL, and SCIP_OKAY.
Referenced by SCIPnlrowRemoveFixedVars().
|
static |
removes fixed quadratic variables of a nonlinear row by replacing them with the corresponding constant or disaggregated terms
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
Definition at line 1488 of file nlp.c.
References BMSclearMemoryArray, BMSfreeBlockMemoryArray, SCIP_QuadElement::coef, SCIP_NlRow::constant, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, MAX, nlrowAddToLinearCoef(), nlrowConstantChanged(), nlrowDelQuadElemPos(), SCIP_NlRow::nquadelems, SCIP_NlRow::nquadvars, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssize, SCIP_NlRow::quadelemssorted, SCIP_NlRow::quadvars, SCIP_NlRow::quadvarshash, SCIP_NlRow::quadvarssize, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPhashmapFree(), SCIPhashmapRemove(), SCIPhashmapSetImage(), SCIPnlrowAddQuadElement(), SCIPnlrowAddQuadVar(), SCIPnlrowSearchQuadVar(), SCIPsetAllocBufferArray, SCIPsetDebugMsg, SCIPsetFreeBufferArray, SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetName(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarIsActive(), and TRUE.
Referenced by nlrowRemoveFixedVar(), and SCIPnlrowRemoveFixedVars().
|
static |
removes fixed variables from expression tree of a nonlinear row
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
Definition at line 1922 of file nlp.c.
References SCIP_NlRow::constant, SCIP_NlRow::exprtree, nlrowExprtreeChanged(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPexprtreeEval(), SCIPexprtreeFree(), SCIPexprtreeGetNParams(), SCIPexprtreeGetNVars(), SCIPexprtreeRemoveFixedVars(), and SCIPnlrowChgConstant().
Referenced by nlrowRemoveFixedVar(), and SCIPnlrowRemoveFixedVars().
|
static |
removes fixed variable from nonlinear row
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
var | variable that had been fixed |
Definition at line 1955 of file nlp.c.
References SCIP_NlRow::exprtree, nlrowRemoveFixedExprtreeVars(), nlrowRemoveFixedLinearCoefPos(), nlrowRemoveFixedQuadVars(), nlrowSearchLinearCoef(), 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, | ||
SCIP_EXPRCURV | curvature | ||
) |
create a new nonlinear row the new row is already captured
nlrow | buffer to store pointer to nonlinear row |
blkmem | block memory |
set | global SCIP settings |
name | name of nonlinear row |
constant | constant |
nlinvars | number of linear variables |
linvars | linear variables, or NULL if nlinvars == 0 |
lincoefs | linear coefficients, or NULL if nlinvars == 0 |
nquadvars | number of variables in quadratic terms |
quadvars | variables in quadratic terms, or NULL if nquadvars == 0 |
nquadelems | number of entries in quadratic term matrix |
quadelems | elements of quadratic term matrix, or NULL if nquadelems == 0 |
exprtree | expression tree, or NULL |
lhs | left hand side |
rhs | right hand side |
curvature | curvature of the nonlinear row |
Definition at line 2000 of file nlp.c.
References BMSallocBlockMemory, BMSduplicateBlockMemoryArray, FALSE, MAX, nlrowSetupQuadVarsHash(), 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 | ||
) |
create a nonlinear row that is a copy of a given row the new row is already captured
nlrow | buffer to store pointer to nonlinear row |
blkmem | block memory |
set | global SCIP settings |
sourcenlrow | nonlinear row to copy |
Definition at line 2149 of file nlp.c.
References SCIP_NlRow::activity, SCIP_NlRow::constant, SCIP_NlRow::curvature, SCIP_NlRow::exprtree, SCIP_NlRow::lhs, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, SCIP_NlRow::name, SCIP_NlRow::nlinvars, SCIP_NlRow::nquadelems, SCIP_NlRow::nquadvars, SCIP_NlRow::pseudoactivity, SCIP_NlRow::quadelems, SCIP_NlRow::quadelemssorted, SCIP_NlRow::quadvars, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIPnlrowCreate(), SCIP_NlRow::validactivitybdsdomchg, SCIP_NlRow::validactivitynlp, and SCIP_NlRow::validpsactivitydomchg.
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
nlrow | buffer to store pointer to nonlinear row |
blkmem | block memory |
set | global SCIP settings |
row | the linear row to copy |
Definition at line 2184 of file nlp.c.
References SCIP_CALL, SCIP_EXPRCURV_LINEAR, 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
nlrow | pointer to NLP row |
blkmem | block memory |
Definition at line 2252 of file nlp.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_CALL, SCIP_OKAY, SCIPexprtreeFree(), and SCIPhashmapFree().
Referenced by SCIPnlrowRelease().
SCIP_RETCODE SCIPnlrowPrint | ( | SCIP_NLROW * | nlrow, |
SCIP_MESSAGEHDLR * | messagehdlr, | ||
FILE * | file | ||
) |
output nonlinear row to file stream
nlrow | NLP row |
messagehdlr | message handler |
file | output file (or NULL for standard output) |
Definition at line 2289 of file nlp.c.
References SCIP_QuadElement::coef, SCIP_NlRow::constant, SCIP_NlRow::exprtree, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlRow::lhs, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::name, SCIP_NlRow::nlinvars, SCIP_NlRow::nquadelems, SCIP_NlRow::quadelems, SCIP_NlRow::quadvars, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIPexprtreePrintWithNames(), SCIPmessageFPrintInfo(), and SCIPvarGetName().
Referenced by computeCut(), findAndStoreEcAggregations(), SCIPnlpWrite(), and SCIPprintNlRow().
void SCIPnlrowCapture | ( | SCIP_NLROW * | nlrow | ) |
increases usage counter of NLP nonlinear row
nlrow | nonlinear row to capture |
Definition at line 2344 of file nlp.c.
References SCIP_NlRow::name, 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
nlrow | nonlinear row to free |
blkmem | block memory |
set | global SCIP settings |
Definition at line 2356 of file nlp.c.
References SCIP_CALL, SCIP_OKAY, SCIPnlrowFree(), and SCIPsetDebugMsg.
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
nlrow | NLP row |
blkmem | block memory |
set | global SCIP settings |
num | minimum number of entries to store |
Definition at line 2380 of file nlp.c.
References BMSreallocBlockMemoryArray, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::linvarssize, SCIP_NlRow::nlinvars, 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
nlrow | NLP nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
var | variable |
val | value of coefficient |
Definition at line 2405 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
nlrow | nonlinear row to be changed |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
var | coefficient to be deleted |
Definition at line 2453 of file nlp.c.
References SCIP_NlRow::linvars, SCIP_NlRow::name, SCIP_NlRow::nlpindex, nlrowDelLinearCoefPos(), nlrowSearchLinearCoef(), 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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
var | variable |
coef | new value of coefficient |
Definition at line 2486 of file nlp.c.
References nlrowAddLinearCoef(), nlrowChgLinearCoefPos(), nlrowSearchLinearCoef(), 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
nlrow | NLP row |
blkmem | block memory |
set | global SCIP settings |
num | minimum number of entries to store |
Definition at line 2524 of file nlp.c.
References BMSreallocBlockMemoryArray, SCIP_NlRow::nquadvars, 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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
var | variable to search for |
Definition at line 2548 of file nlp.c.
References SCIP_NlRow::nlpindex, nlrowSetupQuadVarsHash(), SCIP_NlRow::nquadvars, 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
nlrow | NLP row |
blkmem | block memory |
set | global SCIP settings |
num | minimum number of entries to store |
Definition at line 2583 of file nlp.c.
References BMSreallocBlockMemoryArray, SCIP_NlRow::nquadelems, 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
nlrow | NLP nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
elem | quadratic element to add |
Definition at line 2607 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
nlrow | nonlinear row to be changed |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
idx1 | index of first variable in element |
idx2 | index of second variable in element |
Definition at line 2622 of file nlp.c.
References SCIP_NlRow::name, nlrowDelQuadElemPos(), nlrowSearchQuadElem(), 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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
elem | new quadratic element |
Definition at line 2656 of file nlp.c.
References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, nlrowAddQuadElement(), nlrowChgQuadElemPos(), nlrowSearchQuadElem(), 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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
exprtree | new expression tree |
Definition at line 2688 of file nlp.c.
References SCIP_NlRow::exprtree, SCIP_NlRow::nlpindex, nlrowExprtreeChanged(), 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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
paramidx | index of parameter in expression tree's parameter array |
paramval | new value of parameter |
Definition at line 2727 of file nlp.c.
References SCIP_NlRow::exprtree, nlrowExprtreeParamChanged(), 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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
paramvals | new values of parameters |
Definition at line 2750 of file nlp.c.
References SCIP_NlRow::exprtree, nlrowExprtreeParamChanged(), 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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
constant | new constant |
Definition at line 2772 of file nlp.c.
References SCIP_NlRow::constant, nlrowConstantChanged(), 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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
lhs | new left hand side |
Definition at line 2792 of file nlp.c.
References SCIP_NlRow::lhs, nlrowSideChanged(), 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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
rhs | new right hand side |
Definition at line 2812 of file nlp.c.
References nlrowSideChanged(), 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
nlrow | nonlinear row |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlp | current NLP data |
Definition at line 2832 of file nlp.c.
References nlrowRemoveFixedExprtreeVars(), nlrowRemoveFixedLinearCoefs(), nlrowRemoveFixedQuadVars(), SCIP_CALL, and SCIP_OKAY.
Referenced by nlpAddNlRows().
SCIP_RETCODE SCIPnlrowRecalcNLPActivity | ( | SCIP_NLROW * | nlrow, |
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_NLP * | nlp | ||
) |
recalculates the current activity of a nonlinear row
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics |
nlp | current NLP data |
Definition at line 2848 of file nlp.c.
References SCIP_NlRow::activity, SCIP_QuadElement::coef, SCIP_NlRow::constant, SCIP_NlRow::exprtree, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::nlinvars, SCIP_Stat::nnlps, SCIP_NlRow::nquadelems, SCIP_NlRow::quadelems, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_ERROR, SCIP_INVALID, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPexprtreeEval(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPvarGetNLPSol(), SCIP_Nlp::solstat, and SCIP_NlRow::validactivitynlp.
Referenced by SCIPnlrowGetNLPActivity(), SCIPrecalcNlRowActivity(), and SCIPrecalcNlRowNLPActivity().
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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics |
nlp | current NLP data |
activity | buffer to store activity value |
Definition at line 2925 of file nlp.c.
References SCIP_NlRow::activity, SCIP_Stat::nnlps, 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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics |
nlp | current NLP data |
feasibility | buffer to store feasibility value |
Definition at line 2952 of file nlp.c.
References SCIP_NlRow::lhs, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPnlrowGetNLPActivity().
Referenced by nlpAddNlRows(), nlpRowChanged(), SCIPgetNlRowFeasibility(), SCIPgetNlRowNLPFeasibility(), and SCIPgetNlRowSolFeasibility().
SCIP_RETCODE SCIPnlrowRecalcPseudoActivity | ( | SCIP_NLROW * | nlrow, |
SCIP_SET * | set, | ||
SCIP_STAT * | stat | ||
) |
calculates the current pseudo activity of a nonlinear row
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics |
Definition at line 2972 of file nlp.c.
References SCIP_QuadElement::coef, SCIP_NlRow::constant, SCIP_Stat::domchgcount, SCIP_NlRow::exprtree, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, SCIP_NlRow::nlinvars, SCIP_NlRow::nquadelems, SCIP_NlRow::pseudoactivity, SCIP_NlRow::quadelems, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPexprtreeEval(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPvarGetBestBoundLocal(), and SCIP_NlRow::validpsactivitydomchg.
Referenced by SCIPnlrowGetPseudoActivity(), SCIPrecalcNlRowActivity(), and SCIPrecalcNlRowPseudoActivity().
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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics |
pseudoactivity | buffer to store pseudo activity value |
Definition at line 3027 of file nlp.c.
References SCIP_Stat::domchgcount, 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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics |
pseudofeasibility | buffer to store pseudo feasibility value |
Definition at line 3053 of file nlp.c.
References SCIP_NlRow::lhs, 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 | ||
) |
returns the activity of a nonlinear row for a given solution
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
sol | primal CIP solution |
activity | buffer to store activity value |
Definition at line 3073 of file nlp.c.
References SCIP_QuadElement::coef, SCIP_NlRow::constant, SCIP_NlRow::exprtree, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_Interval::inf, SCIP_NlRow::lincoefs, SCIP_NlRow::linvars, MAX, SCIP_NlRow::nlinvars, SCIP_NlRow::nquadelems, SCIP_NlRow::quadelems, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_UNKNOWN, SCIPexprtreeEval(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), and SCIPsolGetVal().
Referenced by SCIPgetNlRowSolActivity(), and SCIPnlrowGetSolFeasibility().
SCIP_RETCODE SCIPnlrowGetSolFeasibility | ( | SCIP_NLROW * | nlrow, |
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_SOL * | sol, | ||
SCIP_Real * | feasibility | ||
) |
returns the feasibility of a nonlinear row for the given solution
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
sol | primal CIP solution |
feasibility | buffer to store feasibility value |
Definition at line 3158 of file nlp.c.
References SCIP_NlRow::lhs, 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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
minactivity | buffer to store minimal activity, or NULL |
maxactivity | buffer to store maximal activity, or NULL |
Definition at line 3179 of file nlp.c.
References SCIP_Stat::domchgcount, SCIP_NlRow::maxactivity, SCIP_NlRow::minactivity, nlrowCalcActivityBounds(), 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
nlrow | nonlinear row |
set | global SCIP settings |
stat | problem statistics data |
isredundant | buffer to store whether row is redundant |
Definition at line 3210 of file nlp.c.
References FALSE, SCIP_NlRow::lhs, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlrowGetActivityBounds(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsInfinity(), and TRUE.
Referenced by SCIPnlpRemoveRedundantNlRows().
|
static |
adds a set of nonlinear rows to the NLP and captures them
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nnlrows | number of nonlinear rows to add |
nlrows | nonlinear rows to add |
Definition at line 3497 of file nlp.c.
References SCIP_NlRow::exprtree, SCIP_Nlp::indiving, SCIP_NlRow::linvars, SCIP_NlRow::nlinvars, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_NlRow::nquadvars, SCIP_Nlp::nunflushednlrowadd, SCIP_NlRow::quadvars, SCIP_CALL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPhashmapExists(), SCIPnlpEnsureNlRowsSize(), SCIPnlrowCapture(), SCIPnlrowGetNLPFeasibility(), SCIPnlrowRemoveFixedVars(), SCIPsetIsFeasNegative(), SCIP_Nlp::solstat, and SCIP_Nlp::varhash.
Referenced by SCIPnlpAddNlRow(), and SCIPnlpAddNlRows().
|
static |
moves a nonlinear row to a different place, and updates all corresponding data structures
nlp | NLP data structure |
oldpos | old position of nonlinear row |
newpos | new position of nonlinear row |
Definition at line 3584 of file nlp.c.
References SCIP_NlRow::nlpindex, and SCIP_Nlp::nlrows.
Referenced by nlpDelNlRowPos().
|
static |
deletes nonlinear row with given position from NLP
nlp | NLP data structure |
blkmem | block memory |
set | global SCIP settings |
pos | position of nonlinear row that is to be removed |
Definition at line 3604 of file nlp.c.
References SCIP_Nlp::indiving, SCIP_NlRow::nlpiindex, SCIP_NlRow::nlpindex, nlpMoveNlrow(), SCIP_Nlp::nlrowmap_nlpi2nlp, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_Nlp::nnlrows_solver, SCIP_Nlp::nunflushednlrowadd, SCIP_Nlp::nunflushednlrowdel, SCIP_CALL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_OKAY, SCIPnlrowRelease(), and SCIP_Nlp::solstat.
Referenced by SCIPnlpDelNlRow(), SCIPnlpRemoveRedundantNlRows(), and SCIPnlpReset().
|
static |
updates bounds on a variable in the NLPI problem
nlp | NLP data |
set | global SCIP settings |
var | variable which bounds have changed |
tightened | whether the bound change was a bound tightening |
Definition at line 3657 of file nlp.c.
References SCIP_Nlp::indiving, 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 |
updates coefficient of a variable in the objective
nlp | NLP data |
var | variable which bounds have changed |
Definition at line 3716 of file nlp.c.
References FALSE, SCIP_Nlp::indiving, 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 |
adds new variables to the NLP
nlp | NLP data structure |
blkmem | block memory |
set | global SCIP settings |
nvars | number of variables to add |
vars | variable to add to NLP |
Definition at line 3777 of file nlp.c.
References SCIP_Nlp::eventhdlr, SCIP_Nlp::haveinitguess, SCIP_Nlp::indiving, SCIP_Nlp::initialguess, nlpUpdateObjCoef(), SCIP_Nlp::nunflushedvaradd, SCIP_Nlp::nvars, SCIP_Nlp::primalsolobjval, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_OBJCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_OKAY, SCIPhashmapExists(), SCIPhashmapInsert(), SCIPnlpEnsureVarsSize(), SCIPvarCapture(), SCIPvarCatchEvent(), SCIPvarGetBestBoundLocal(), SCIPvarGetObj(), SCIPvarIsActive(), SCIPvarIsTransformed(), SCIPvarSetNLPSol(), SCIP_Nlp::sizevars, SCIP_Nlp::solstat, SCIP_Nlp::varhash, SCIP_Nlp::varlbdualvals, SCIP_Nlp::varmap_nlp2nlpi, SCIP_Nlp::vars, and SCIP_Nlp::varubdualvals.
Referenced by SCIPnlpAddVar(), and SCIPnlpAddVars().
|
static |
moves a variable to a different place, and updates all corresponding data structures
nlp | NLP data structure |
oldpos | old position of variable |
newpos | new position of variable |
Definition at line 3856 of file nlp.c.
References SCIP_Nlp::initialguess, 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 |
deletes variable with given position from NLP
nlp | NLP data structure |
blkmem | block memory |
set | global SCIP settings |
eventqueue | event queue |
lp | SCIP LP, needed if a column-variable is freed |
pos | position of nonlinear row that is to be removed |
Definition at line 3889 of file nlp.c.
References SCIP_Nlp::eventhdlr, SCIP_NlRow::exprtree, SCIP_Nlp::indiving, SCIP_NlRow::linvars, SCIP_NlRow::linvarssorted, SCIP_NlRow::nlinvars, nlpMoveVar(), SCIP_Nlp::nlrows, nlrowSearchLinearCoef(), SCIP_Nlp::nnlrows, SCIP_Nlp::nunflushedvaradd, SCIP_Nlp::nunflushedvardel, SCIP_Nlp::primalsolobjval, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_OBJCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_OKAY, SCIPexprtreeFindVar(), SCIPhashmapRemove(), SCIPnlrowSearchQuadVar(), SCIPvarDropEvent(), SCIPvarGetNLPSol(), SCIPvarGetObj(), SCIPvarRelease(), SCIP_Nlp::solstat, SCIP_Nlp::varmap_nlp2nlpi, SCIP_Nlp::varmap_nlpi2nlp, and SCIP_Nlp::vars.
Referenced by SCIPnlpDelVar(), and SCIPnlpReset().
|
static |
notifies NLP that a variable was fixed, so it is removed from objective, all rows, and the NLP variables
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
eventqueue | event queue |
lp | SCIP LP, needed to release variable |
var | variable that has been fixed |
Definition at line 3975 of file nlp.c.
References SCIP_Nlp::indiving, nlrowRemoveFixedVar(), SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_CALL, SCIP_OKAY, SCIPhashmapExists(), SCIPnlpDelVar(), SCIPvarIsActive(), and SCIP_Nlp::varhash.
Referenced by SCIP_DECL_EVENTEXEC().
|
static |
creates arrays with NLPI variable indices of variables in a nonlinear row
nlp | NLP data |
set | global SCIP settings |
nlrow | nonlinear row |
linidxs | buffer to store pointer to NLPI indices of linear variables |
quadelems | buffer to store pointer to quadratic elements w.r.t. NLPI indices |
nlinidxs | buffer to store pointer to NLPI indices of nonlinear variables |
Definition at line 4007 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, 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 |
ensures, that NLPI variables array of NLP can store at least num entries
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
num | minimum number of entries to store |
Definition at line 4122 of file nlp.c.
References BMSreallocBlockMemoryArray, SCIP_Nlp::nvars_solver, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIP_Nlp::sizevars_solver, and SCIP_Nlp::varmap_nlpi2nlp.
Referenced by nlpFlushVarAdditions().
|
static |
ensures, that NLPI nonlinear rows array of NLP can store at least num entries
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
num | minimum number of entries to store |
Definition at line 4150 of file nlp.c.
References BMSreallocBlockMemoryArray, SCIP_Nlp::nlrowmap_nlpi2nlp, SCIP_Nlp::nnlrows_solver, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), and SCIP_Nlp::sizenlrows_solver.
Referenced by nlpFlushNlRowAdditions().
|
static |
deletes rows from the NLPI problem that have been marked as to remove
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
Definition at line 4178 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, SCIP_Nlp::nunflushednlrowdel, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiDelConsSet(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, and SCIP_Nlp::solver.
Referenced by SCIPnlpFlush().
|
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)
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
Definition at line 4271 of file nlp.c.
References SCIP_Nlp::indiving, 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 |
adds nonlinear rows to NLPI problem that have been added to NLP before assumes that there are no pending variable additions or deletions (nlpFlushVarDeletions and nlpFlushVarAdditions should be called first)
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
Definition at line 4365 of file nlp.c.
References SCIP_NlRow::constant, SCIP_NlRow::exprtree, SCIP_Nlp::indiving, SCIP_NlRow::lhs, SCIP_NlRow::lincoefs, SCIP_NlRow::name, SCIP_NlRow::nlinvars, nlpEnsureNlRowsSolverSize(), SCIP_NlRow::nlpiindex, nlpSetupNlpiIndices(), SCIP_Nlp::nlrowmap_nlpi2nlp, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_Nlp::nnlrows_solver, SCIP_NlRow::nquadelems, SCIP_NlRow::nquadvars, SCIP_Nlp::nunflushednlrowadd, SCIP_Nlp::nunflushedvaradd, SCIP_Nlp::nunflushedvardel, SCIP_Nlp::problem, SCIP_NlRow::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiAddConstraints(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetIsEQ(), SCIPsetIsInfinity(), and SCIP_Nlp::solver.
Referenced by SCIPnlpFlush().
|
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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
Definition at line 4518 of file nlp.c.
References FALSE, SCIP_Nlp::indiving, nlpEnsureVarsSolverSize(), 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 |
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)
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
Definition at line 4606 of file nlp.c.
References SCIP_Nlp::indiving, 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().
|
static |
solves the NLP, assuming it has been flushed already
is used also to solve diving NLP
nlp | NLP data |
blkmem | block memory buffers |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics |
Definition at line 4668 of file nlp.c.
References BMSclearMemoryArray, SCIP_Nlp::divingobj, SCIP_NlRow::dualsol, SCIP_Nlp::haveinitguess, SCIP_Nlp::indiving, SCIP_Nlp::initialguess, SCIP_NlRow::nlpiindex, SCIP_Stat::nlpsoltime, SCIP_Nlp::nlrows, SCIP_Stat::nnlps, SCIP_Nlp::nnlrows, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::primalsolobjval, SCIP_Nlp::problem, SCIP_CALL, SCIP_INVALID, SCIP_NLPPAR_FEASTOL, SCIP_NLPPAR_RELOBJTOL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIP_Real, SCIPclockStart(), SCIPclockStop(), SCIPmessagePrintWarning(), SCIPnlpiGetSolstat(), SCIPnlpiGetSolution(), SCIPnlpiGetTermstat(), SCIPnlpiSetInitialGuess(), SCIPnlpiSetRealPar(), SCIPnlpiSolve(), SCIPnlrowGetNLPActivity(), SCIPsetAllocBufferArray, SCIPsetDualfeastol(), SCIPsetFeastol(), SCIPsetFreeBufferArray, SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetUbLocal(), SCIPvarSetNLPSol(), SCIP_Nlp::solstat, SCIP_Nlp::solver, SCIP_Nlp::termstat, SCIP_Nlp::varlbdualvals, SCIP_Nlp::varmap_nlp2nlpi, SCIP_Nlp::varmap_nlpi2nlp, SCIP_Nlp::vars, and SCIP_Nlp::varubdualvals.
Referenced by SCIPnlpSolve(), and SCIPnlpSolveDive().
|
static |
assembles list of fractional variables in last NLP solution
nlp | NLP data |
blkmem | block memory buffers |
set | global SCIP settings |
stat | problem statistics |
Definition at line 4825 of file nlp.c.
References BMSallocBlockMemoryArray, BMSreallocBlockMemoryArray, SCIP_Nlp::fracvars, SCIP_Nlp::fracvarsfrac, SCIP_Nlp::fracvarssize, SCIP_Nlp::fracvarssol, SCIP_Nlp::nfracvars, SCIP_Stat::nnlps, SCIP_Nlp::npriofracvars, SCIP_Nlp::nvars, SCIP_ALLOC, SCIP_INVALID, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPnlpHasSolution(), SCIPsetCalcMemGrowSize(), SCIPsetDebugMsg, SCIPsetFeasFrac(), SCIPsetFeastol(), SCIPsetIsFeasFracIntegral(), SCIPsetIsGE(), SCIPvarGetBranchPriority(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNLPSol(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIP_Nlp::solstat, SCIP_Nlp::validfracvars, and SCIP_Nlp::vars.
Referenced by SCIPnlpGetFracVars().
SCIP_RETCODE SCIPnlpInclude | ( | SCIP_SET * | set, |
BMS_BLKMEM * | blkmem | ||
) |
includes NLP specific plugins (e.g., event handler) and parameters
set | global SCIP settings |
blkmem | block memory |
Definition at line 5035 of file nlp.c.
References EVENTHDLR_DESC, EVENTHDLR_NAME, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_INIT, SCIPerrorMessage, SCIPeventhdlrCreate(), SCIPsetFindEventhdlr(), and SCIPsetIncludeEventhdlr().
Referenced by doScipCreate().
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
nlp | NLP handler, call by reference |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics |
name | problem name |
nvars_estimate | an estimate on the number of variables that may be added to the NLP later |
Definition at line 5060 of file nlp.c.
References BMSallocMemory, BMSduplicateBlockMemoryArray, EVENTHDLR_NAME, FALSE, SCIP_ALLOC, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_EVENTTYPE_VARDELETED, SCIP_INVALID, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPerrorMessage, SCIPeventfilterAdd(), SCIPhashmapCreate(), SCIPnlpiCreateProblem(), SCIPsetFindEventhdlr(), SCIPsetFindNlpi(), SCIPsetSortNlpis(), and TRUE.
Referenced by initSolve().
SCIP_RETCODE SCIPnlpFree | ( | SCIP_NLP ** | nlp, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_LP * | lp | ||
) |
frees NLP data object
nlp | pointer to NLP data object |
blkmem | block memory |
set | global SCIP settings |
eventqueue | event queue |
lp | SCIP LP, needed for releasing variables |
Definition at line 5181 of file nlp.c.
References BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, BMSfreeMemory, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_EVENTTYPE_VARDELETED, SCIP_OKAY, SCIPeventfilterDel(), SCIPhashmapFree(), SCIPnlpiFreeProblem(), and SCIPnlpReset().
Referenced by freeReoptSolve(), and 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
eventqueue | event queue |
lp | SCIP LP, needed for releasing variables |
Definition at line 5240 of file nlp.c.
References BMSfreeBlockMemoryArrayNull, FALSE, SCIP_Nlp::haveinitguess, SCIP_Nlp::indiving, SCIP_Nlp::initialguess, nlpDelNlRowPos(), nlpDelVarPos(), SCIP_Nlp::nnlrows, 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().
currently a dummy function that always returns TRUE
nlp | NLP data |
Definition at line 5281 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
num | minimum number of entries to store |
Definition at line 5289 of file nlp.c.
References BMSreallocBlockMemoryArray, SCIP_Nlp::initialguess, 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
var | variable |
Definition at line 5323 of file nlp.c.
References SCIP_Nlp::indiving, nlpAddVars(), 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
nvars | number of variables to add |
vars | variables to add |
Definition at line 5349 of file nlp.c.
References SCIP_Nlp::indiving, nlpAddVars(), 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
eventqueue | event queue |
lp | SCIP LP, needed to release variable |
var | variable |
Definition at line 5374 of file nlp.c.
References SCIP_Nlp::indiving, nlpDelVarPos(), 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
num | minimum number of entries to store |
Definition at line 5410 of file nlp.c.
References BMSreallocBlockMemoryArray, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nlrow | nonlinear row |
Definition at line 5438 of file nlp.c.
References SCIP_Nlp::indiving, nlpAddNlRows(), 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
nnlrows | number of rows to add |
nlrows | rows to add |
Definition at line 5462 of file nlp.c.
References SCIP_Nlp::indiving, nlpAddNlRows(), 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
nlp | NLP data |
blkmem | block memory |
set | global SCIP settings |
nlrow | nonlinear row |
Definition at line 5490 of file nlp.c.
References SCIP_Nlp::indiving, nlpDelNlRowPos(), SCIP_NlRow::nlpindex, SCIP_Nlp::nnlrows, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, and SCIPerrorMessage.
SCIP_RETCODE SCIPnlpFlush | ( | SCIP_NLP * | nlp, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set | ||
) |
applies all cached changes to the NLP solver
nlp | current NLP data |
blkmem | block memory |
set | global SCIP settings |
Definition at line 5521 of file nlp.c.
References SCIP_Nlp::indiving, nlpFlushNlRowAdditions(), nlpFlushNlRowDeletions(), nlpFlushObjective(), nlpFlushVarAdditions(), nlpFlushVarDeletions(), SCIP_Nlp::nnlrows, SCIP_Nlp::nnlrows_solver, SCIP_Nlp::nunflushednlrowadd, SCIP_Nlp::nunflushednlrowdel, SCIP_Nlp::nunflushedvaradd, SCIP_Nlp::nunflushedvardel, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::objflushed, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, and TRUE.
Referenced by SCIPflushNLP(), SCIPnlpReset(), SCIPnlpSolve(), and SCIPnlpStartDive().
SCIP_RETCODE SCIPnlpSolve | ( | SCIP_NLP * | nlp, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_MESSAGEHDLR * | messagehdlr, | ||
SCIP_STAT * | stat | ||
) |
solves the NLP
nlp | NLP data |
blkmem | block memory buffers |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics |
Definition at line 5558 of file nlp.c.
References SCIP_Nlp::indiving, nlpSolve(), SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, and SCIPnlpFlush().
Referenced by SCIPsolveNLP().
gets objective value of current NLP
nlp | current NLP data |
Definition at line 5585 of file nlp.c.
References 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
nlp | current NLP data |
set | global SCIP settings |
stat | problem statistics |
pseudoobjval | buffer to store pseudo objective value |
Definition at line 5595 of file nlp.c.
References SCIP_Nlp::divingobj, SCIP_Nlp::indiving, 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
nlp | NLP data structure |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics |
fracvars | pointer to store the array of NLP fractional variables, or NULL |
fracvarssol | pointer to store the array of NLP fractional variables solution values, or NULL |
fracvarsfrac | pointer to store the array of NLP fractional variables fractionalities, or NULL |
nfracvars | pointer to store the number of NLP fractional variables , or NULL |
npriofracvars | pointer to store the number of NLP fractional variables with maximal branching priority, or NULL |
Definition at line 5624 of file nlp.c.
References SCIP_Nlp::fracvars, SCIP_Nlp::fracvarsfrac, SCIP_Nlp::fracvarssol, SCIP_Nlp::nfracvars, nlpCalcFracVars(), SCIP_Nlp::npriofracvars, 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
nlp | current NLP data |
blkmem | block memory buffers |
set | global SCIP settings |
stat | problem statistics |
Definition at line 5658 of file nlp.c.
References SCIP_Nlp::indiving, nlpDelNlRowPos(), SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, 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()
nlp | current NLP data |
blkmem | block memory buffers |
initguess | new initial guess, or NULL to clear previous one |
Definition at line 5704 of file nlp.c.
References BMScopyMemoryArray, BMSduplicateBlockMemoryArray, FALSE, SCIP_Nlp::haveinitguess, SCIP_Nlp::initialguess, 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
nlp | current NLP data |
set | global SCIP settings |
messagehdlr | message handler |
fname | file name |
Definition at line 5737 of file nlp.c.
References SCIP_Nlp::name, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_Nlp::nvars, SCIP_CALL, SCIP_FILECREATEERROR, SCIP_OKAY, SCIPerrorMessage, SCIPmessageFPrintInfo(), SCIPnlrowPrint(), SCIPvarPrint(), and SCIP_Nlp::vars.
Referenced by SCIPwriteNLP().
gets array with variables of the NLP
nlp | current NLP data |
Definition at line 5788 of file nlp.c.
References SCIP_Nlp::vars.
Referenced by SCIPgetNLPVars(), SCIPgetNLPVarsData(), SCIPsetNLPInitialGuessSol(), and SCIPsolLinkNLPSol().
int SCIPnlpGetNVars | ( | SCIP_NLP * | nlp | ) |
gets current number of variables in NLP
nlp | current NLP data |
Definition at line 5798 of file nlp.c.
References 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
nlp | current NLP data |
nlcount | an array of length at least SCIPnlpGetNVars() to store nonlinearity counts of variables |
Definition at line 5808 of file nlp.c.
References BMSclearMemoryArray, SCIP_NlRow::exprtree, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_NlRow::nquadvars, SCIP_Nlp::nvars, SCIP_NlRow::quadvars, SCIP_NlRow::quadvarshash, SCIP_OKAY, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), and SCIP_Nlp::varhash.
Referenced by SCIPgetNLPVarsNonlinearity().
indicates whether there exists a row that contains a continuous variable in a nonlinear term
nlp | current NLP data |
Definition at line 5867 of file nlp.c.
References SCIP_NlRow::exprtree, FALSE, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, SCIP_NlRow::nquadvars, SCIP_NlRow::quadvars, SCIP_VARTYPE_CONTINUOUS, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPvarGetType(), and TRUE.
Referenced by SCIPhasNLPContinuousNonlinearity().
gives dual solution values associated with lower bounds of NLP variables
nlp | current NLP data |
Definition at line 5905 of file nlp.c.
References SCIP_Nlp::varlbdualvals.
Referenced by SCIPgetNLPVarsLbDualsol().
gives dual solution values associated with upper bounds of NLP variables
nlp | current NLP data |
Definition at line 5915 of file nlp.c.
References SCIP_Nlp::varubdualvals.
Referenced by SCIPgetNLPVarsUbDualsol().
SCIP_NLROW** SCIPnlpGetNlRows | ( | SCIP_NLP * | nlp | ) |
gets array with nonlinear rows of the NLP
nlp | current NLP data |
Definition at line 5925 of file nlp.c.
References SCIP_Nlp::nlrows.
Referenced by SCIPgetNLPNlRows(), and SCIPgetNLPNlRowsData().
int SCIPnlpGetNNlRows | ( | SCIP_NLP * | nlp | ) |
gets current number of nonlinear rows in NLP
nlp | current NLP data |
Definition at line 5935 of file nlp.c.
References SCIP_Nlp::nnlrows.
Referenced by SCIPgetNLPNlRowsData(), and SCIPgetNNLPNlRows().
gets the NLP solver interface
nlp | current NLP data |
Definition at line 5945 of file nlp.c.
References SCIP_Nlp::solver.
Referenced by SCIPgetNLPI().
SCIP_NLPIPROBLEM* SCIPnlpGetNLPIProblem | ( | SCIP_NLP * | nlp | ) |
gets the NLP problem in the solver interface
nlp | current NLP data |
Definition at line 5955 of file nlp.c.
References SCIP_Nlp::problem.
Referenced by SCIPgetNLPI().
indicates whether NLP is currently in diving mode
nlp | current NLP data |
Definition at line 5965 of file nlp.c.
References SCIP_Nlp::indiving.
SCIP_NLPSOLSTAT SCIPnlpGetSolstat | ( | SCIP_NLP * | nlp | ) |
gets solution status of current NLP
nlp | current NLP data |
Definition at line 5975 of file nlp.c.
References SCIP_Nlp::solstat.
Referenced by SCIPgetNLPSolstat(), SCIPlinkNLPSol(), and SCIPsolLinkNLPSol().
SCIP_NLPTERMSTAT SCIPnlpGetTermstat | ( | SCIP_NLP * | nlp | ) |
gets termination status of last NLP solve
nlp | current NLP data |
Definition at line 5985 of file nlp.c.
References 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
nlp | pointer to NLP datastructure |
statistics | pointer to store statistics |
Definition at line 5995 of file nlp.c.
References SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetStatistics(), and SCIP_Nlp::solver.
Referenced by SCIPgetNLPStatistics().
indicates whether a feasible solution for the current NLP is available thus, returns whether the solution status <= feasible
nlp | current NLP data |
Definition at line 6012 of file nlp.c.
References 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
nlp | pointer to NLP datastructure |
type | parameter number |
ival | pointer to store the parameter value |
Definition at line 6022 of file nlp.c.
References 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
nlp | pointer to NLP datastructure |
type | parameter number |
ival | parameter value |
Definition at line 6039 of file nlp.c.
References 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
nlp | pointer to NLP datastructure |
type | parameter number |
dval | pointer to store the parameter value |
Definition at line 6055 of file nlp.c.
References 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
nlp | pointer to NLP datastructure |
type | parameter number |
dval | parameter value |
Definition at line 6072 of file nlp.c.
References 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
nlp | pointer to NLP datastructure |
type | parameter number |
sval | pointer to store the parameter value |
Definition at line 6088 of file nlp.c.
References 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
nlp | pointer to NLP datastructure |
type | parameter number |
sval | parameter value |
Definition at line 6105 of file nlp.c.
References 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
nlp | current NLP data |
blkmem | block memory buffers |
set | global SCIP settings |
Definition at line 6125 of file nlp.c.
References SCIP_Nlp::indiving, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPnlpFlush(), SCIP_Nlp::solver, and TRUE.
Referenced by SCIPstartDiveNLP().
SCIP_RETCODE SCIPnlpEndDive | ( | SCIP_NLP * | nlp, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set | ||
) |
resets the bound and objective changes made during diving and disables diving mode
nlp | current NLP data |
blkmem | block memory |
set | global SCIP settings |
Definition at line 6155 of file nlp.c.
References SCIP_Nlp::divingobj, FALSE, SCIP_Nlp::indiving, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::objflushed, SCIP_Nlp::primalsolobjval, SCIP_Nlp::problem, SCIP_CALL, SCIP_ERROR, SCIP_INVALID, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPnlpiChgVarBounds(), SCIPnlrowRelease(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIP_Nlp::solstat, SCIP_Nlp::solver, SCIP_Nlp::termstat, SCIP_Nlp::varmap_nlpi2nlp, and SCIP_Nlp::vars.
Referenced by SCIPendDiveNLP(), and SCIPnlpReset().
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
nlp | current NLP data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
var | variable which coefficient to change |
coef | new linear coefficient of variable in objective |
Definition at line 6216 of file nlp.c.
References SCIP_Nlp::divingobj, FALSE, SCIP_Nlp::indiving, SCIP_Nlp::nvars, SCIP_Nlp::objflushed, SCIP_Nlp::problem, SCIP_CALL, SCIP_EXPRCURV_LINEAR, 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
nlp | current NLP data |
var | variable which coefficient to change |
lb | new lower bound of variable |
ub | new upper bound of variable |
Definition at line 6276 of file nlp.c.
References SCIP_Nlp::indiving, 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
nlp | current NLP data |
set | global SCIP settings |
nvars | number of variables which bounds to change |
vars | variables which bounds to change |
lbs | new lower bounds of variables |
ubs | new upper bounds of variables |
Definition at line 6304 of file nlp.c.
References SCIP_Nlp::indiving, 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().
returns whether the objective function has been changed during diving
nlp | current NLP data |
Definition at line 6348 of file nlp.c.
References SCIP_Nlp::divingobj.
Referenced by SCIPsolLinkNLPSol().
SCIP_RETCODE SCIPnlpSolveDive | ( | SCIP_NLP * | nlp, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_MESSAGEHDLR * | messagehdlr, | ||
SCIP_STAT * | stat | ||
) |
solves diving NLP
nlp | current NLP data |
blkmem | block memory buffers |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics |
Definition at line 6356 of file nlp.c.
References nlpSolve(), SCIP_CALL, and SCIP_OKAY.
Referenced by SCIPsolveDiveNLP().