All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nlpioracle.c File Reference Detailed Descriptionimplementation of NLPI oracle interface Definition in file nlpioracle.c. #include "scip/pub_message.h" #include "scip/pub_misc.h" #include "nlpi/nlpioracle.h" #include "nlpi/pub_expr.h" #include "nlpi/exprinterpret.h" #include <string.h> Go to the source code of this file.
Typedef Documentation
Definition at line 55 of file nlpioracle.c. Function Documentation
calculate memory size for dynamically allocated arrays (copied from scip/set.c)
Definition at line 94 of file nlpioracle.c. Referenced by ensureConsLinSize(), ensureConsQuadSize(), ensureConssSize(), ensureIntArraySize(), and ensureVarsSize().
ensures that variables related arrays in oracle have at least a given length
Definition at line 110 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSreallocBlockMemoryArray, calcGrowSize(), NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_NlpiOracle::vardegrees, SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varnames, SCIP_NlpiOracle::varssize, and SCIP_NlpiOracle::varubs. Referenced by SCIPnlpiOracleAddVars().
ensures that constraints array in oracle has at least a given length
Definition at line 141 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSreallocBlockMemoryArray, calcGrowSize(), SCIP_NlpiOracle::conss, SCIP_NlpiOracle::consssize, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by SCIPnlpiOracleAddConstraints().
ensures that arrays for linear part in a oracle constraints have at least a given length
Definition at line 165 of file nlpioracle.c. References BMSreallocBlockMemoryArray, calcGrowSize(), SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracleCons::linsize, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by SCIPnlpiOracleChgLinearCoefs().
ensures that arrays for quadratic part in a oracle constraints have at least a given length
Definition at line 192 of file nlpioracle.c. References BMSreallocBlockMemoryArray, calcGrowSize(), NULL, SCIP_NlpiOracleCons::quadelems, SCIP_NlpiOracleCons::quadsize, SCIP_ALLOC, and SCIP_OKAY. Referenced by SCIPnlpiOracleChgQuadCoefs().
ensures that a given array of integers has at least a given length
Definition at line 218 of file nlpioracle.c. References BMSreallocBlockMemoryArray, calcGrowSize(), NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by hessLagSparsitySetNzFlagForExprtree(), hessLagSparsitySetNzFlagForQuad(), and SCIPnlpiOracleGetJacobianSparsity().
Invalidates the sparsity pattern of the Jacobian. Should be called when constraints are added or deleted.
Definition at line 248 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSfreeBlockMemoryArray, SCIP_NlpiOracle::jaccols, SCIP_NlpiOracle::jacoffsets, SCIP_NlpiOracle::nconss, NULL, and SCIPdebugMessage. Referenced by SCIPnlpiOracleAddConstraints(), SCIPnlpiOracleChgExprtree(), SCIPnlpiOracleChgLinearCoefs(), SCIPnlpiOracleChgQuadCoefs(), SCIPnlpiOracleDelConsSet(), SCIPnlpiOracleDelVarSet(), and SCIPnlpiOracleFree().
Invalidates the sparsity pattern of the Hessian of the Lagragian. Should be called when the objective is set or constraints are added or deleted.
Definition at line 271 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSfreeBlockMemoryArray, SCIP_NlpiOracle::heslagcols, SCIP_NlpiOracle::heslagoffsets, NULL, SCIP_NlpiOracle::nvars, and SCIPdebugMessage. Referenced by SCIPnlpiOracleAddConstraints(), SCIPnlpiOracleAddVars(), SCIPnlpiOracleChgExprtree(), SCIPnlpiOracleChgQuadCoefs(), SCIPnlpiOracleDelConsSet(), SCIPnlpiOracleDelVarSet(), SCIPnlpiOracleFree(), and SCIPnlpiOracleSetObjective().
sorts a linear term, merges duplicate entries and removes entries with coefficient 0.0
Definition at line 292 of file nlpioracle.c. References NULL, and SCIPsortIntReal(). Referenced by createConstraint(), and SCIPnlpiOracleChgLinearCoefs().
creates a NLPI constraint from given constraint data
Definition at line 341 of file nlpioracle.c. References BMSallocBlockMemory, BMSclearMemory, BMSduplicateBlockMemoryArray, EPSEQ, EPSLE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_DEFAULT_EPSILON, SCIP_OKAY, SCIPexprtreeCopy(), SCIPexprtreeGetNVars(), SCIPquadelemSort(), SCIPquadelemSqueeze(), and sortLinearCoefficients(). Referenced by SCIPnlpiOracleAddConstraints(), SCIPnlpiOracleCreate(), and SCIPnlpiOracleSetObjective().
frees a constraint
Definition at line 420 of file nlpioracle.c. References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, SCIP_CALL_ABORT, SCIPdebugMessage, SCIPexprtreeFree(), and SCIPexprtreeGetNVars(). Referenced by freeConstraints(), SCIPnlpiOracleDelConsSet(), SCIPnlpiOracleFree(), and SCIPnlpiOracleSetObjective().
frees all constraints
Definition at line 453 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSfreeBlockMemoryArrayNull, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::consssize, freeConstraint(), SCIP_NlpiOracle::nconss, NULL, and SCIPdebugMessage. Referenced by SCIPnlpiOracleDelConsSet(), and SCIPnlpiOracleFree().
moves one variable The place where it moves to need to be empty (all NULL) but allocated. Note that this function does not update the variable indices in the constraints!
Definition at line 479 of file nlpioracle.c. References SCIP_NlpiOracle::infinity, NULL, SCIP_OKAY, SCIPdebugMessage, SCIP_NlpiOracle::vardegrees, SCIP_NlpiOracle::vardegreesuptodate, SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varnames, and SCIP_NlpiOracle::varubs. Referenced by SCIPnlpiOracleDelVarSet().
frees all variables
Definition at line 519 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, NULL, SCIP_NlpiOracle::nvars, SCIPdebugMessage, TRUE, SCIP_NlpiOracle::vardegrees, SCIP_NlpiOracle::vardegreesuptodate, SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varnames, SCIP_NlpiOracle::varssize, and SCIP_NlpiOracle::varubs. Referenced by SCIPnlpiOracleDelVarSet(), and SCIPnlpiOracleFree().
increases variable degrees in oracle w.r.t. variables occuring in a single constraint
Definition at line 552 of file nlpioracle.c. References SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracleCons::nlinidxs, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracleCons::quadelems, SCIPexprtreeGetNVars(), and SCIP_NlpiOracle::vardegrees. Referenced by SCIPnlpiOracleAddConstraints(), and updateVariableDegrees().
Updates the degrees of all variables.
Definition at line 585 of file nlpioracle.c. References BMSclearMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIPdebugMessage, TRUE, updateVariableDegreesCons(), SCIP_NlpiOracle::vardegrees, and SCIP_NlpiOracle::vardegreesuptodate. Referenced by SCIPnlpiOracleGetMaxDegree(), SCIPnlpiOracleGetVarDegree(), and SCIPnlpiOracleGetVarDegrees().
applies a mapping of indices to one array of indices
Definition at line 612 of file nlpioracle.c. References NULL. Referenced by SCIPnlpiOracleDelVarSet().
removes entries with index -1 (marked as deleted) from array of linear elements assumes that array is sorted by index, i.e., all -1 are at the beginning
Definition at line 632 of file nlpioracle.c. References NULL, and SCIPdebugMessage. Referenced by SCIPnlpiOracleDelVarSet().
removes entries with index pair (-1,-1) (marked as deleted) from array of quadratic elements assumes that array is sorted, i.e., all deleted elements are at the beginning
Definition at line 674 of file nlpioracle.c. References NULL, and SCIPdebugMessage. Referenced by SCIPnlpiOracleDelVarSet().
applies a mapping of indices to an array of quadratic elements
Definition at line 712 of file nlpioracle.c. References SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, and NULL. Referenced by SCIPnlpiOracleDelVarSet().
computes the value of a function
Definition at line 739 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_QuadElement::coef, SCIP_NlpiOracle::exprinterpreter, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlpiOracle::infinity, SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracleCons::nlinidxs, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracleCons::quadelems, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPexprintEval(), and SCIPexprtreeGetNVars(). Referenced by SCIPnlpiOracleEvalConstraintValue(), SCIPnlpiOracleEvalConstraintValues(), and SCIPnlpiOracleEvalObjectiveValue().
computes the value and gradient of a function
Definition at line 816 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMSclearMemoryArray, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_QuadElement::coef, SCIP_NlpiOracle::exprinterpreter, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlpiOracle::infinity, SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracleCons::nlinidxs, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracleCons::quadelems, SCIP_ALLOC, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPdebug, SCIPdebugMessage, SCIPexprintGrad(), and SCIPexprtreeGetNVars(). Referenced by SCIPnlpiOracleEvalConstraintGradient(), and SCIPnlpiOracleEvalObjectiveGradient().
collects nonzeros entries in colnz and increases the nzcount given indices of quadratic terms
Definition at line 939 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, ensureIntArraySize(), SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPsortedvecFindInt(), and SCIPsortedvecInsertInt(). Referenced by SCIPnlpiOracleGetHessianLagSparsity().
collects indices of nonzero entries in the lower-left part of the hessian matrix of an expression adds the indices to a given set of indices, avoiding duplicates
Definition at line 979 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, ensureIntArraySize(), SCIP_NlpiOracle::exprinterpreter, MAX, MIN, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPexprintHessianSparsityDense(), SCIPexprtreeGetNVars(), SCIPsortedvecFindInt(), and SCIPsortedvecInsertInt(). Referenced by SCIPnlpiOracleGetHessianLagSparsity().
adds quadratic part into hessian structure
Definition at line 1050 of file nlpioracle.c. References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, NULL, SCIP_ERROR, SCIP_OKAY, SCIPdebugMessage, SCIPerrorMessage, and SCIPsortedvecFindInt(). Referenced by SCIPnlpiOracleEvalHessianLag().
adds hessian of an expression into hessian structure
Definition at line 1085 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_NlpiOracle::exprinterpreter, FALSE, MAX, MIN, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_ERROR, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPerrorMessage, SCIPexprintHessianDense(), SCIPexprtreeGetNVars(), and SCIPsortedvecFindInt(). Referenced by SCIPnlpiOracleEvalHessianLag().
prints a name, if available, makes sure it has not more than 64 characters, and adds a unique prefix if the longnames flag is set
Definition at line 1188 of file nlpioracle.c. References NULL. Referenced by printFunction(), and SCIPnlpiOraclePrintProblemGams().
prints a function
Definition at line 1218 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_QuadElement::coef, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracleCons::nlinidxs, SCIP_NlpiOracleCons::nquadelems, NULL, printName(), SCIP_NlpiOracleCons::quadelems, SCIP_ALLOC, SCIP_OKAY, SCIPdebugMessage, SCIPexprtreeGetNVars(), SCIPexprtreePrint(), SCIPmessageFPrintInfo(), and SCIP_NlpiOracle::varnames. Referenced by SCIPnlpiOraclePrintProblem(), and SCIPnlpiOraclePrintProblemGams(). returns whether an expression is contains nonsmooth operands (min, max, abs, ...)
Definition at line 1284 of file nlpioracle.c. References FALSE, NULL, SCIP_EXPR_ABS, SCIP_EXPR_MAX, SCIP_EXPR_MIN, SCIP_EXPR_SIGN, SCIP_EXPR_SIGNPOWER, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPexprGetOperator(), and TRUE. Referenced by SCIPnlpiOraclePrintProblemGams().
creates an NLPIORACLE data structure
Definition at line 1320 of file nlpioracle.c. References BMSallocMemory, BMSclearMemory, createConstraint(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_DEFAULT_INFINITY, SCIP_OKAY, SCIPdebugMessage, SCIPexprintCreate(), SCIPexprintGetName(), and TRUE. Referenced by SCIP_DECL_NLPICREATEPROBLEM().
frees an NLPIORACLE data structure
Definition at line 1347 of file nlpioracle.c. References BMSfreeMemory, freeConstraint(), freeConstraints(), freeVariables(), invalidateHessianLagSparsity(), invalidateJacobiSparsity(), NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPexprintFree(), and SCIPnlpiOracleSetProblemName(). Referenced by SCIP_DECL_NLPIFREEPROBLEM().
sets the value for infinity
Definition at line 1376 of file nlpioracle.c. References SCIP_NlpiOracle::infinity, NULL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIP_DECL_NLPICREATEPROBLEM(), and SCIP_DECL_NLPISETREALPAR().
gets the value for infinity
Definition at line 1392 of file nlpioracle.c. References SCIP_NlpiOracle::infinity, NULL, and SCIPdebugMessage. Referenced by SCIP_DECL_NLPIGETREALPAR().
sets the problem name (used for printing)
Definition at line 1404 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSduplicateBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_NlpiOracle::name, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIP_DECL_NLPICREATEPROBLEM(), and SCIPnlpiOracleFree().
gets the problem name, or NULL if none set
Definition at line 1427 of file nlpioracle.c. References SCIP_NlpiOracle::name, NULL, and SCIPdebugMessage.
adds variables
Definition at line 1439 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMSclearMemoryArray, BMScopyMemoryArray, BMSduplicateBlockMemoryArray, ensureVarsSize(), EPSEQ, SCIP_NlpiOracle::infinity, invalidateHessianLagSparsity(), NULL, SCIP_NlpiOracle::nvars, SCIP_ALLOC, SCIP_CALL, SCIP_DEFAULT_EPSILON, SCIP_OKAY, SCIPdebugMessage, SCIP_NlpiOracle::vardegrees, SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varnames, SCIP_NlpiOracle::varssize, and SCIP_NlpiOracle::varubs. Referenced by SCIP_DECL_NLPIADDVARS().
adds constraints linear coefficients: row(=constraint) oriented matrix; quadratic coefficients: row oriented matrix for each constraint
Definition at line 1524 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, SCIP_NlpiOracle::conss, createConstraint(), ensureConssSize(), SCIP_NlpiOracle::exprinterpreter, SCIP_NlpiOracleCons::exprtree, FALSE, SCIP_NlpiOracle::infinity, invalidateHessianLagSparsity(), invalidateJacobiSparsity(), SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPexprintCompile(), TRUE, updateVariableDegreesCons(), and SCIP_NlpiOracle::vardegreesuptodate. Referenced by SCIP_DECL_NLPIADDCONSTRAINTS().
sets or overwrites objective, a minimization problem is expected May change sparsity pattern.
Definition at line 1602 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, createConstraint(), SCIP_NlpiOracle::exprinterpreter, SCIP_NlpiOracleCons::exprtree, FALSE, freeConstraint(), SCIP_NlpiOracle::infinity, invalidateHessianLagSparsity(), NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::quadsize, REALABS, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPexprintCompile(), and SCIP_NlpiOracle::vardegreesuptodate. Referenced by SCIP_DECL_NLPISETOBJECTIVE().
change variable bounds
Definition at line 1639 of file nlpioracle.c. References EPSEQ, SCIP_NlpiOracle::infinity, NULL, SCIP_NlpiOracle::nvars, SCIP_DEFAULT_EPSILON, SCIP_OKAY, SCIPdebugMessage, SCIP_NlpiOracle::varlbs, and SCIP_NlpiOracle::varubs. Referenced by SCIP_DECL_NLPICHGVARBOUNDS().
change constraint bounds
Definition at line 1675 of file nlpioracle.c. References SCIP_NlpiOracle::conss, EPSEQ, SCIP_NlpiOracle::infinity, SCIP_NlpiOracleCons::lhs, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracleCons::rhs, SCIP_DEFAULT_EPSILON, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIP_DECL_NLPICHGCONSSIDES().
deletes a set of variables
Definition at line 1709 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, clearDeletedLinearElements(), clearDeletedQuadElements(), SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, freeVariables(), invalidateHessianLagSparsity(), invalidateJacobiSparsity(), SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, mapIndices(), mapIndicesQuad(), moveVariable(), SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::quadelems, SCIP_NlpiOracleCons::quadsize, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPexprtreeFree(), SCIPexprtreeGetNVars(), SCIPquadelemSort(), SCIPsortIntReal(), and SCIP_NlpiOracle::varnames. Referenced by SCIP_DECL_NLPIDELVARSET().
deletes a set of constraints
Definition at line 1819 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, SCIP_NlpiOracle::conss, FALSE, freeConstraint(), freeConstraints(), invalidateHessianLagSparsity(), invalidateJacobiSparsity(), SCIP_NlpiOracle::nconss, NULL, SCIP_OKAY, SCIPdebugMessage, and SCIP_NlpiOracle::vardegreesuptodate. Referenced by SCIP_DECL_NLPIDELCONSSET().
changes linear coefficients in one constraint or objective
Definition at line 1897 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSduplicateBlockMemoryArray, SCIP_NlpiOracle::conss, ensureConsLinSize(), FALSE, invalidateJacobiSparsity(), SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracleCons::linsize, MAX, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPsortedvecFindInt(), sortLinearCoefficients(), TRUE, SCIP_NlpiOracle::vardegrees, and SCIP_NlpiOracle::vardegreesuptodate. Referenced by SCIP_DECL_NLPICHGLINEARCOEFS().
changes (or adds) coefficients in the quadratic part of one constraint or objective
Definition at line 1994 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSduplicateBlockMemoryArray, SCIP_QuadElement::coef, SCIP_NlpiOracle::conss, ensureConsQuadSize(), FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, invalidateHessianLagSparsity(), invalidateJacobiSparsity(), MAX, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::quadelems, SCIP_NlpiOracleCons::quadsize, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPquadelemSort(), SCIPquadelemSortedFind(), SCIPquadelemSqueeze(), TRUE, SCIP_NlpiOracle::vardegrees, and SCIP_NlpiOracle::vardegreesuptodate. Referenced by SCIP_DECL_NLPICHGQUADCOEFS().
replaces expression tree of one constraint or objective
Definition at line 2092 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSduplicateBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::exprinterpreter, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, FALSE, invalidateHessianLagSparsity(), invalidateJacobiSparsity(), NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPexprintCompile(), SCIPexprtreeCopy(), SCIPexprtreeFree(), SCIPexprtreeGetNVars(), SCIP_NlpiOracle::vardegrees, and SCIP_NlpiOracle::vardegreesuptodate. Referenced by SCIP_DECL_NLPICHGEXPRTREE().
changes one parameter of expression tree of one constraint or objective
Definition at line 2149 of file nlpioracle.c. References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::exprtree, NULL, SCIP_NlpiOracle::objective, SCIP_OKAY, SCIPdebugMessage, SCIPexprtreeGetNParams(), and SCIPexprtreeSetParamVal(). Referenced by SCIP_DECL_NLPICHGNONLINCOEF().
changes the constant value in the objective function
Definition at line 2174 of file nlpioracle.c. References SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::rhs, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIP_DECL_NLPICHGOBJCONSTANT().
gives the current number of variables
Definition at line 2190 of file nlpioracle.c. References NULL, and SCIP_NlpiOracle::nvars. Referenced by SCIP_DECL_NLPISETINITIALGUESS().
gives the current number of constraints
Definition at line 2200 of file nlpioracle.c. References SCIP_NlpiOracle::nconss, and NULL.
gives the variables lower bounds
Definition at line 2210 of file nlpioracle.c. References NULL, and SCIP_NlpiOracle::varlbs.
gives the variables upper bounds
Definition at line 2220 of file nlpioracle.c. References NULL, and SCIP_NlpiOracle::varubs.
gives the variables names, or NULL if not set
Definition at line 2230 of file nlpioracle.c. References NULL, and SCIP_NlpiOracle::varnames.
Gives maximum degree of a variable w.r.t. objective and all constraints. The degree of a variable is the degree of the summand where it appears in, and is infinity for nonpolynomial terms.
Definition at line 2242 of file nlpioracle.c. References NULL, updateVariableDegrees(), and SCIP_NlpiOracle::vardegrees.
Gives maximum degree of all variables w.r.t. objective and all constraints. The degree of a variable is the degree of the summand where it appears in, and is infinity for nonpolynomial terms.
Definition at line 2259 of file nlpioracle.c. References NULL, updateVariableDegrees(), and SCIP_NlpiOracle::vardegrees.
gives left-hand side of a constraint
Definition at line 2271 of file nlpioracle.c. References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::lhs, and NULL.
gives right-hand side of a constraint
Definition at line 2284 of file nlpioracle.c. References SCIP_NlpiOracle::conss, NULL, and SCIP_NlpiOracleCons::rhs.
gives name of a constraint, may be NULL
Definition at line 2297 of file nlpioracle.c. References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::name, and NULL.
gives maximum degree of a constraint or objective The degree is the maximal degree of all summands,, and is infinity for nonpolynomial terms.
Definition at line 2312 of file nlpioracle.c. References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::nlinidxs, SCIP_NlpiOracleCons::nquadelems, NULL, and SCIP_NlpiOracle::objective.
Gives maximum degree over all constraints and the objective (or over all variables, resp.). Thus, if this function returns 0, then the objective and all constraints are constant. If it returns 1, then the problem in linear. If it returns 2, then its a QP, QCP, or QCQP. And if it returns > 2, then it is an NLP.
Definition at line 2344 of file nlpioracle.c. References NULL, SCIP_NlpiOracle::nvars, SCIPdebugMessage, updateVariableDegrees(), and SCIP_NlpiOracle::vardegrees. Referenced by SCIP_DECL_NLPISOLVE().
evaluates the objective function in a given point
Definition at line 2370 of file nlpioracle.c. References evalFunctionValue(), SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::rhs, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
evaluates one constraint function in a given point
Definition at line 2389 of file nlpioracle.c. References SCIP_NlpiOracle::conss, evalFunctionValue(), NULL, SCIP_NlpiOracle::nvars, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
evaluates all constraint functions in a given point
Definition at line 2408 of file nlpioracle.c. References SCIP_NlpiOracle::conss, evalFunctionValue(), SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::nvars, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
computes the objective gradient in a given point
Definition at line 2431 of file nlpioracle.c. References evalFunctionGradient(), SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::rhs, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
computes a constraints gradient in a given point
Definition at line 2452 of file nlpioracle.c. References SCIP_NlpiOracle::conss, evalFunctionGradient(), NULL, SCIP_NlpiOracle::nvars, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPnlpiOracleEvalJacobian().
gets sparsity pattern (rowwise) of Jacobian matrix Note that internal data is returned in *offset and *col, thus the user does not need to allocate memory there. Adding or deleting constraints destroys the sparsity structure and make another call to this function necessary.
Definition at line 2477 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMSclearMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArray, BMSreallocBlockMemoryArray, SCIP_NlpiOracle::conss, ensureIntArraySize(), SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_NlpiOracle::jaccols, SCIP_NlpiOracle::jacoffsets, SCIP_NlpiOracleCons::linidxs, MIN, SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracleCons::quadelems, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPexprtreeGetNVars(), and TRUE.
evaluates the Jacobi matrix in a given point The values in the Jacobi matrix are returned in the same order as specified by the offset and col arrays obtained by SCIPnlpiOracleGetJacobianSparsity. The user need to call SCIPnlpiOracleGetJacobianSparsity at least ones before using this function.
Definition at line 2616 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMScopyMemoryArray, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::exprinterpreter, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, SCIP_NlpiOracle::infinity, SCIP_NlpiOracle::jaccols, SCIP_NlpiOracle::jacoffsets, SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracle::nvars, SCIP_ALLOC, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPdebug, SCIPdebugMessage, SCIPexprintEval(), SCIPexprintGrad(), SCIPexprtreeGetNVars(), and SCIPnlpiOracleEvalConstraintGradient().
gets sparsity pattern of the Hessian matrix of the Lagrangian Note that internal data is returned in *offset and *col, thus the user must not allocate memory there. Adding or deleting variables, objective, or constraints may destroy the sparsity structure and make another call to this function necessary. Only elements of the lower left triangle and the diagonal are counted. nonzeros in Hessian corresponding to one column collen[i] is length of array colnz[i] colnnz[i] is number of entries in colnz[i] (<= collen[i])
Definition at line 2755 of file nlpioracle.c. References SCIP_NlpiOracle::blkmem, BMSallocBlockMemoryArray, BMSclearMemoryArray, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, SCIP_NlpiOracle::heslagcols, SCIP_NlpiOracle::heslagoffsets, hessLagSparsitySetNzFlagForExprtree(), hessLagSparsitySetNzFlagForQuad(), SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::quadelems, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
evaluates the Hessian matrix of the Lagrangian in a given point The values in the Hessian matrix are returned in the same order as specified by the offset and col arrays obtained by SCIPnlpiOracleGetHessianLagSparsity. The user must call SCIPnlpiOracleGetHessianLagSparsity at least ones before using this function. Only elements of the lower left triangle and the diagonal are computed.
Definition at line 2852 of file nlpioracle.c. References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::exprtree, SCIP_NlpiOracleCons::exprvaridxs, SCIP_NlpiOracle::heslagcols, SCIP_NlpiOracle::heslagoffsets, hessLagAddExprtree(), hessLagAddQuad(), SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nquadelems, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::quadelems, SCIP_CALL, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
prints the problem to a file.
Definition at line 2894 of file nlpioracle.c. References SCIP_NlpiOracle::conss, FALSE, SCIP_NlpiOracle::infinity, SCIP_NlpiOracleCons::lhs, SCIP_NlpiOracleCons::name, SCIP_NlpiOracle::name, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, printFunction(), SCIP_NlpiOracleCons::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPmessageFPrintInfo(), SCIP_NlpiOracle::vardegrees, SCIP_NlpiOracle::vardegreesuptodate, SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varnames, and SCIP_NlpiOracle::varubs.
prints the problem to a file in GAMS format If there are variable (equation, resp.) names with more than 9 characters, then variable (equation, resp.) names are prefixed with an unique identifier. This is to make it easier to identify variables solution output in the listing file. Names with more than 64 characters are shorten to 64 letters due to GAMS limits.
Definition at line 2963 of file nlpioracle.c. References SCIP_NlpiOracle::conss, exprIsNonSmooth(), SCIP_NlpiOracleCons::exprtree, FALSE, SCIP_NlpiOracle::infinity, SCIP_NlpiOracleCons::lhs, SCIP_NlpiOracleCons::name, SCIP_NlpiOracle::name, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, printFunction(), printName(), SCIP_NlpiOracleCons::rhs, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPexprtreeGetRoot(), SCIPmessageFPrintInfo(), TRUE, SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varnames, and SCIP_NlpiOracle::varubs. |