Detailed Description
NLP representation used by various NLP solver interface implementations.
Typedefs | |
typedef struct SCIP_NlpiOracle | SCIP_NLPIORACLE |
Typedef Documentation
◆ SCIP_NLPIORACLE
typedef struct SCIP_NlpiOracle SCIP_NLPIORACLE |
NLPI oracle data structure
Definition at line 51 of file nlpioracle.h.
Function Documentation
◆ SCIPnlpiOracleCreate()
SCIP_RETCODE SCIPnlpiOracleCreate | ( | SCIP * | scip, |
SCIP_NLPIORACLE ** | oracle | ||
) |
creates an NLPIORACLE data structure
- Parameters
-
scip SCIP data structure oracle pointer to store NLPIORACLE data structure
Definition at line 983 of file nlpioracle.c.
References BMSclearMemory, createConstraint(), FALSE, NULL, SCIP_NlpiOracle::objective, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocMemory, SCIPcreateClock(), SCIPdebugMessage, SCIPexprintCreate(), SCIPexprintGetName(), SCIPgetBoolParam(), and SCIPsetClockEnabled().
Referenced by SCIP_DECL_NLPICREATEPROBLEM().
◆ SCIPnlpiOracleFree()
SCIP_RETCODE SCIPnlpiOracleFree | ( | SCIP * | scip, |
SCIP_NLPIORACLE ** | oracle | ||
) |
frees an NLPIORACLE data structure
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure
Definition at line 1013 of file nlpioracle.c.
References BMSfreeMemory, FALSE, freeConstraint(), freeConstraints(), freeVariables(), invalidateHessianLagSparsity(), invalidateJacobiSparsity(), NULL, SCIP_NlpiOracle::objective, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPexprintFree(), SCIPfreeClock(), and SCIPnlpiOracleSetProblemName().
Referenced by SCIP_DECL_NLPIFREEPROBLEM().
◆ SCIPnlpiOracleSetProblemName()
SCIP_RETCODE SCIPnlpiOracleSetProblemName | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const char * | name | ||
) |
sets the problem name (used for printing)
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure name name of problem
Definition at line 1045 of file nlpioracle.c.
References SCIP_NlpiOracle::name, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPduplicateBlockMemoryArray, and SCIPfreeBlockMemoryArray.
Referenced by SCIP_DECL_NLPICREATEPROBLEM(), and SCIPnlpiOracleFree().
◆ SCIPnlpiOracleGetProblemName()
const char * SCIPnlpiOracleGetProblemName | ( | SCIP_NLPIORACLE * | oracle | ) |
gets the problem name, or NULL if none set
- Parameters
-
oracle pointer to NLPIORACLE data structure
Definition at line 1069 of file nlpioracle.c.
References SCIP_NlpiOracle::name, NULL, and SCIPdebugMessage.
Referenced by SCIP_DECL_NLPISOLVE().
◆ SCIPnlpiOracleAddVars()
SCIP_RETCODE SCIPnlpiOracleAddVars | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | nvars, | ||
const SCIP_Real * | lbs, | ||
const SCIP_Real * | ubs, | ||
const char ** | varnames | ||
) |
adds variables
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure nvars number of variables to add lbs array with lower bounds of new variables, or NULL if all -infinity ubs array with upper bounds of new variables, or NULL if all +infinity varnames array with names of new variables, or NULL if no names should be stored
Definition at line 1081 of file nlpioracle.c.
References BMSclearMemoryArray, BMScopyMemoryArray, ensureVarsSize(), EPSEQ, invalidateHessianLagSparsity(), NULL, SCIP_NlpiOracle::nvars, SCIP_CALL, SCIP_DEFAULT_EPSILON, SCIP_OKAY, SCIPallocClearBlockMemoryArray, SCIPdebugMessage, SCIPduplicateBlockMemoryArray, SCIPinfinity(), SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varlincount, SCIP_NlpiOracle::varnames, SCIP_NlpiOracle::varnlcount, SCIP_NlpiOracle::varssize, and SCIP_NlpiOracle::varubs.
Referenced by SCIP_DECL_NLPIADDVARS().
◆ SCIPnlpiOracleAddConstraints()
SCIP_RETCODE SCIPnlpiOracleAddConstraints | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | nconss, | ||
const SCIP_Real * | lhss, | ||
const SCIP_Real * | rhss, | ||
const int * | nlininds, | ||
int *const * | lininds, | ||
SCIP_Real *const * | linvals, | ||
SCIP_EXPR ** | exprs, | ||
const char ** | consnames | ||
) |
adds constraints
linear coefficients: row(=constraint) oriented matrix; quadratic coefficients: row oriented matrix for each constraint
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure nconss number of constraints to add lhss array with left-hand sides of constraints, or NULL if all -infinity rhss array with right-hand sides of constraints, or NULL if all +infinity nlininds number of linear coefficients for each constraint, may be NULL in case of no linear part lininds indices of variables for linear coefficients for each constraint, may be NULL in case of no linear part linvals values of linear coefficient for each constraint, may be NULL in case of no linear part exprs NULL if no nonlinear parts, otherwise exprs[.] gives nonlinear part, or NULL if no nonlinear part in this constraint consnames names of new constraints, or NULL if no names should be stored
Definition at line 1167 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, createConstraint(), ensureConssSize(), SCIP_NlpiOracleCons::expr, FALSE, invalidateHessianLagSparsity(), invalidateJacobiSparsity(), SCIP_NlpiOracle::nconss, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPinfinity(), and TRUE.
Referenced by SCIP_DECL_NLPIADDCONSTRAINTS().
◆ SCIPnlpiOracleSetObjective()
SCIP_RETCODE SCIPnlpiOracleSetObjective | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const SCIP_Real | constant, | ||
int | nlin, | ||
const int * | lininds, | ||
const SCIP_Real * | linvals, | ||
SCIP_EXPR * | expr | ||
) |
sets or overwrites objective, a minimization problem is expected
May change sparsity pattern.
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure constant constant part of objective nlin number of linear variable coefficients lininds indices of linear variables, or NULL if no linear part linvals coefficients of linear variables, or NULL if no linear part expr expression of nonlinear part, or NULL if no nonlinear part
Definition at line 1228 of file nlpioracle.c.
References createConstraint(), SCIP_NlpiOracleCons::expr, freeConstraint(), invalidateHessianLagSparsity(), NULL, SCIP_NlpiOracle::objective, REALABS, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPisInfinity(), and TRUE.
Referenced by SCIP_DECL_NLPISETOBJECTIVE().
◆ SCIPnlpiOracleChgVarBounds()
SCIP_RETCODE SCIPnlpiOracleChgVarBounds | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | nvars, | ||
const int * | indices, | ||
const SCIP_Real * | lbs, | ||
const SCIP_Real * | ubs | ||
) |
change variable bounds
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure nvars number of variables to change bounds indices indices of variables to change bounds lbs new lower bounds, or NULL if all should be -infty ubs new upper bounds, or NULL if all should be +infty
Definition at line 1257 of file nlpioracle.c.
References EPSEQ, NULL, SCIP_NlpiOracle::nvars, SCIP_DEFAULT_EPSILON, SCIP_OKAY, SCIPdebugMessage, SCIPinfinity(), SCIP_NlpiOracle::varlbs, and SCIP_NlpiOracle::varubs.
Referenced by SCIP_DECL_NLPICHGVARBOUNDS().
◆ SCIPnlpiOracleChgConsSides()
SCIP_RETCODE SCIPnlpiOracleChgConsSides | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | nconss, | ||
const int * | indices, | ||
const SCIP_Real * | lhss, | ||
const SCIP_Real * | rhss | ||
) |
change constraint sides
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure nconss number of constraints to change bounds indices indices of constraints to change bounds lhss new left-hand sides, or NULL if all should be -infty rhss new right-hand sides, or NULL if all should be +infty
Definition at line 1294 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, EPSEQ, SCIP_NlpiOracleCons::lhs, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracleCons::rhs, SCIP_DEFAULT_EPSILON, SCIP_OKAY, SCIPdebugMessage, and SCIPinfinity().
Referenced by SCIP_DECL_NLPICHGCONSSIDES().
◆ SCIPnlpiOracleDelVarSet()
SCIP_RETCODE SCIPnlpiOracleDelVarSet | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int * | delstats | ||
) |
deletes a set of variables
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure delstats deletion status of vars in input (1 if var should be deleted, 0 if not); new position of var in output (-1 if var was deleted)
Definition at line 1329 of file nlpioracle.c.
References clearDeletedLinearElements(), SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::exprinterpreter, FALSE, freeVariables(), invalidateHessianLagSparsity(), invalidateJacobiSparsity(), SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, mapIndices(), moveVariable(), SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_Bool, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_OKAY, SCIPcreateExpriter(), SCIPdebugMessage, SCIPexprintFreeData(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPfreeBlockMemoryArray, SCIPfreeExpriter(), SCIPgetIndexExprVaridx(), SCIPisExprVaridx(), SCIPreleaseExpr(), SCIPsetIndexExprVaridx(), SCIPsortIntReal(), TRUE, and SCIP_NlpiOracle::varnames.
Referenced by SCIP_DECL_NLPIDELVARSET().
◆ SCIPnlpiOracleDelConsSet()
SCIP_RETCODE SCIPnlpiOracleDelConsSet | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int * | delstats | ||
) |
deletes a set of constraints
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure delstats array with deletion status of rows in input (1 if row should be deleted, 0 if not); new position of row in output (-1 if row was deleted)
Definition at line 1471 of file nlpioracle.c.
References BMSclearMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, freeConstraint(), freeConstraints(), invalidateHessianLagSparsity(), invalidateJacobiSparsity(), SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, TRUE, updateVariableCounts(), SCIP_NlpiOracle::varlincount, and SCIP_NlpiOracle::varnlcount.
Referenced by SCIP_DECL_NLPIDELCONSSET().
◆ SCIPnlpiOracleChgLinearCoefs()
SCIP_RETCODE SCIPnlpiOracleChgLinearCoefs | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | considx, | ||
int | nentries, | ||
const int * | varidxs, | ||
const SCIP_Real * | newcoefs | ||
) |
changes (or adds) linear coefficients in one constraint or objective
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure considx index of constraint where linear coefficients should be changed, or -1 for objective nentries number of coefficients to change varidxs array with indices of variables which coefficients should be changed newcoefs array with new coefficients of variables
Definition at line 1557 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, ensureConsLinSize(), FALSE, invalidateJacobiSparsity(), SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracleCons::linsize, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPduplicateBlockMemoryArray, SCIPsortedvecFindInt(), sortLinearCoefficients(), TRUE, updateVariableCounts(), and SCIP_NlpiOracle::varlincount.
Referenced by SCIP_DECL_NLPICHGLINEARCOEFS().
◆ SCIPnlpiOracleChgExpr()
SCIP_RETCODE SCIPnlpiOracleChgExpr | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | considx, | ||
SCIP_EXPR * | expr | ||
) |
replaces expression of one constraint or objective
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure considx index of constraint where expression should be changed, or -1 for objective expr new expression, or NULL
Definition at line 1653 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::exprinterpreter, invalidateHessianLagSparsity(), invalidateJacobiSparsity(), NULL, SCIP_NlpiOracle::objective, SCIP_CALL, SCIP_OKAY, SCIPcaptureExpr(), SCIPdebugMessage, SCIPexprintCompile(), SCIPexprintFreeData(), SCIPreleaseExpr(), and updateVariableCounts().
Referenced by SCIP_DECL_NLPICHGEXPR().
◆ SCIPnlpiOracleChgObjConstant()
SCIP_RETCODE SCIPnlpiOracleChgObjConstant | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
SCIP_Real | objconstant | ||
) |
changes the constant value in the objective function
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure objconstant new value for objective constant
Definition at line 1699 of file nlpioracle.c.
References SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::rhs, SCIP_OKAY, and SCIPdebugMessage.
Referenced by SCIP_DECL_NLPICHGOBJCONSTANT().
◆ SCIPnlpiOracleGetNVars()
int SCIPnlpiOracleGetNVars | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the current number of variables
- Parameters
-
oracle pointer to NLPIORACLE data structure
Definition at line 1716 of file nlpioracle.c.
References NULL, and SCIP_NlpiOracle::nvars.
Referenced by computeInteriorPoint(), ensureStartingPoint(), handleNlpParam(), initWorhp(), processSolveOutcome(), SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPIADDVARS(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPIDELVARSET(), SCIP_DECL_NLPIFREEPROBLEM(), SCIP_DECL_NLPISETINITIALGUESS(), SCIP_DECL_NLPISOLVE(), setupGradients(), setupHessian(), setupStart(), updateWorhp(), userDF(), userDG(), userF(), userG(), and userHM().
◆ SCIPnlpiOracleGetNConstraints()
int SCIPnlpiOracleGetNConstraints | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the current number of constraints
- Parameters
-
oracle pointer to NLPIORACLE data structure
Definition at line 1726 of file nlpioracle.c.
References SCIP_NlpiOracle::nconss, and NULL.
Referenced by computeInteriorPoint(), handleNlpParam(), initWorhp(), processSolveOutcome(), SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPIADDVARS(), SCIP_DECL_NLPIDELCONSSET(), SCIP_DECL_NLPIFREEPROBLEM(), SCIP_DECL_NLPISETINITIALGUESS(), SCIP_DECL_NLPISOLVE(), setupGradients(), setupStart(), updateWorhp(), userDF(), userDG(), userF(), userG(), and userHM().
◆ SCIPnlpiOracleGetVarLbs()
const SCIP_Real * SCIPnlpiOracleGetVarLbs | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the variables lower bounds
- Parameters
-
oracle pointer to NLPIORACLE data structure
Definition at line 1736 of file nlpioracle.c.
References NULL, and SCIP_NlpiOracle::varlbs.
Referenced by ensureStartingPoint(), handleNlpParam(), initWorhp(), SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPISOLVE(), setupStart(), and updateWorhp().
◆ SCIPnlpiOracleGetVarUbs()
const SCIP_Real * SCIPnlpiOracleGetVarUbs | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the variables upper bounds
- Parameters
-
oracle pointer to NLPIORACLE data structure
Definition at line 1746 of file nlpioracle.c.
References NULL, and SCIP_NlpiOracle::varubs.
Referenced by ensureStartingPoint(), handleNlpParam(), initWorhp(), SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPISOLVE(), setupStart(), and updateWorhp().
◆ SCIPnlpiOracleGetVarNames()
char ** SCIPnlpiOracleGetVarNames | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the variables names, or NULL if not set
- Parameters
-
oracle pointer to NLPIORACLE data structure
Definition at line 1756 of file nlpioracle.c.
References NULL, and SCIP_NlpiOracle::varnames.
◆ SCIPnlpiOracleIsVarNonlinear()
SCIP_Bool SCIPnlpiOracleIsVarNonlinear | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | varidx | ||
) |
indicates whether variable appears nonlinear in any objective or constraint
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure varidx the variable to check
Definition at line 1766 of file nlpioracle.c.
References NULL, and SCIP_NlpiOracle::varnlcount.
Referenced by handleNlpParam().
◆ SCIPnlpiOracleGetVarCounts()
void SCIPnlpiOracleGetVarCounts | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const int ** | lincounts, | ||
const int ** | nlcounts | ||
) |
returns number of linear and nonlinear appearances of variables in objective and constraints
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure lincounts buffer to return pointer to array of counts of linear appearances nlcounts buffer to return pointer to array of counts of nonlinear appearances
Definition at line 1781 of file nlpioracle.c.
References NULL, SCIP_NlpiOracle::varlincount, and SCIP_NlpiOracle::varnlcount.
◆ SCIPnlpiOracleGetObjectiveConstant()
SCIP_Real SCIPnlpiOracleGetObjectiveConstant | ( | SCIP_NLPIORACLE * | oracle | ) |
gives constant term of objective
- Parameters
-
oracle pointer to NLPIORACLE data structure
Definition at line 1797 of file nlpioracle.c.
References SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, and SCIP_NlpiOracleCons::rhs.
Referenced by SCIP_DECL_NLPICHGOBJCONSTANT().
◆ SCIPnlpiOracleGetConstraintLhs()
SCIP_Real SCIPnlpiOracleGetConstraintLhs | ( | SCIP_NLPIORACLE * | oracle, |
int | considx | ||
) |
gives left-hand side of a constraint
- Parameters
-
oracle pointer to NLPIORACLE data structure considx constraint index
Definition at line 1808 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::lhs, and NULL.
Referenced by handleNlpParam(), initWorhp(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPISOLVE(), and updateWorhp().
◆ SCIPnlpiOracleGetConstraintRhs()
SCIP_Real SCIPnlpiOracleGetConstraintRhs | ( | SCIP_NLPIORACLE * | oracle, |
int | considx | ||
) |
gives right-hand side of a constraint
- Parameters
-
oracle pointer to NLPIORACLE data structure considx constraint index
Definition at line 1821 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, NULL, and SCIP_NlpiOracleCons::rhs.
Referenced by handleNlpParam(), initWorhp(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPISOLVE(), and updateWorhp().
◆ SCIPnlpiOracleGetConstraintName()
char * SCIPnlpiOracleGetConstraintName | ( | SCIP_NLPIORACLE * | oracle, |
int | considx | ||
) |
gives name of a constraint, may be NULL
- Parameters
-
oracle pointer to NLPIORACLE data structure considx constraint index
Definition at line 1834 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::name, and NULL.
◆ SCIPnlpiOracleIsConstraintNonlinear()
SCIP_Bool SCIPnlpiOracleIsConstraintNonlinear | ( | SCIP_NLPIORACLE * | oracle, |
int | considx | ||
) |
indicates whether constraint is nonlinear
- Parameters
-
oracle pointer to NLPIORACLE data structure considx index of constraint for which nonlinearity status is returned, or -1 for objective
Definition at line 1847 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, NULL, and SCIP_NlpiOracle::objective.
Referenced by computeInteriorPoint(), handleNlpParam(), SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPISETOBJECTIVE(), and SCIP_DECL_NLPISOLVE().
◆ SCIPnlpiOracleGetEvalCapability()
SCIP_EXPRINTCAPABILITY SCIPnlpiOracleGetEvalCapability | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle | ||
) |
gives the evaluation capabilities that are shared among all expressions in the problem
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure
Definition at line 1864 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::exprinterpreter, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::objective, SCIP_EXPRINTCAPABILITY_ALL, and SCIPexprintGetExprCapability().
Referenced by SCIP_DECL_NLPISOLVE().
◆ SCIPnlpiOracleEvalObjectiveValue()
SCIP_RETCODE SCIPnlpiOracleEvalObjectiveValue | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const SCIP_Real * | x, | ||
SCIP_Real * | objval | ||
) |
evaluates the objective function in a given point
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure x point where to evaluate objval pointer to store objective value
Definition at line 1887 of file nlpioracle.c.
References SCIP_NlpiOracle::evalclock, evalFunctionValue(), SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::rhs, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), SCIP_DECL_NLPIGETSOLUTION(), setupStart(), and userF().
◆ SCIPnlpiOracleEvalConstraintValue()
SCIP_RETCODE SCIPnlpiOracleEvalConstraintValue | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | considx, | ||
const SCIP_Real * | x, | ||
SCIP_Real * | conval | ||
) |
evaluates one constraint function in a given point
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure considx index of constraint to evaluate x point where to evaluate conval pointer to store constraint value
Definition at line 1912 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, evalFunctionValue(), NULL, SCIP_NlpiOracle::nvars, SCIP_CALL, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), and setupStart().
◆ SCIPnlpiOracleEvalConstraintValues()
SCIP_RETCODE SCIPnlpiOracleEvalConstraintValues | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const SCIP_Real * | x, | ||
SCIP_Real * | convals | ||
) |
evaluates all constraint functions in a given point
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure x point where to evaluate convals buffer to store constraint values
Definition at line 1936 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, evalFunctionValue(), SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::nvars, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by userG().
◆ SCIPnlpiOracleEvalObjectiveGradient()
SCIP_RETCODE SCIPnlpiOracleEvalObjectiveGradient | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const SCIP_Real * | x, | ||
SCIP_Bool | isnewx, | ||
SCIP_Real * | objval, | ||
SCIP_Real * | objgrad | ||
) |
computes the objective gradient in a given point
- Returns
- SCIP_INVALIDDATA, if the function or its gradient could not be evaluated (domain error, etc.)
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure x point where to evaluate isnewx has the point x changed since the last call to some evaluation function? objval pointer to store objective value objgrad pointer to store (dense) objective gradient
Definition at line 1968 of file nlpioracle.c.
References SCIP_NlpiOracle::evalclock, evalFunctionGradient(), SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::rhs, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), setupStart(), and userDF().
◆ SCIPnlpiOracleEvalConstraintGradient()
SCIP_RETCODE SCIPnlpiOracleEvalConstraintGradient | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const int | considx, | ||
const SCIP_Real * | x, | ||
SCIP_Bool | isnewx, | ||
SCIP_Real * | conval, | ||
SCIP_Real * | congrad | ||
) |
computes a constraints gradient in a given point
- Returns
- SCIP_INVALIDDATA, if the function or its gradient could not be evaluated (domain error, etc.)
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure considx index of constraint to compute gradient for x point where to evaluate isnewx has the point x changed since the last call to some evaluation function? conval pointer to store constraint value congrad pointer to store (dense) constraint gradient
Definition at line 1997 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, evalFunctionGradient(), NULL, SCIP_NlpiOracle::nvars, SCIP_CALL, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
◆ SCIPnlpiOracleGetJacobianSparsity()
SCIP_RETCODE SCIPnlpiOracleGetJacobianSparsity | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const int ** | offset, | ||
const int ** | col | ||
) |
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.
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure offset pointer to store pointer that stores the offsets to each rows sparsity pattern in col, can be NULL col pointer to store pointer that stores the indices of variables that appear in each row, offset[nconss] gives length of col, can be NULL
Definition at line 2027 of file nlpioracle.c.
References BMSclearMemoryArray, BMScopyMemoryArray, SCIP_NlpiOracle::conss, ensureIntArraySize(), SCIP_NlpiOracle::evalclock, SCIP_NlpiOracleCons::expr, FALSE, SCIP_NlpiOracle::jaccols, SCIP_NlpiOracle::jacoffsets, SCIP_NlpiOracleCons::linidxs, MIN, SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, SCIP_Bool, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcreateExpriter(), SCIPdebugMessage, SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPfreeBlockMemoryArray, SCIPfreeExpriter(), SCIPgetIndexExprVaridx(), SCIPisExprVaridx(), SCIPreallocBlockMemoryArray, SCIPstartClock(), SCIPstopClock(), and TRUE.
Referenced by handleNlpParam(), initWorhp(), and setupGradients().
◆ SCIPnlpiOracleEvalJacobian()
SCIP_RETCODE SCIPnlpiOracleEvalJacobian | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const SCIP_Real * | x, | ||
SCIP_Bool | isnewx, | ||
SCIP_Real * | convals, | ||
SCIP_Real * | jacobi | ||
) |
evaluates the Jacobian matrix in a given point
The values in the Jacobian 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.
- Returns
- SCIP_INVALIDDATA, if the Jacobian could not be evaluated (domain error, etc.)
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure x point where to evaluate isnewx has the point x changed since the last call to some evaluation function? convals pointer to store constraint values, can be NULL jacobi pointer to store sparse jacobian values
Definition at line 2159 of file nlpioracle.c.
References ABS, BMSclearMemoryArray, BMScopyMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::exprinterpreter, SCIP_NlpiOracle::jaccols, SCIP_NlpiOracle::jacoffsets, SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPallocCleanBufferArray, SCIPdebug, SCIPdebugMessage, SCIPdebugMsg, SCIPexprintGrad(), SCIPfreeCleanBufferArray, SCIPisFinite, SCIPisInfinity(), SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), setupStart(), and userDG().
◆ SCIPnlpiOracleGetHessianLagSparsity()
SCIP_RETCODE SCIPnlpiOracleGetHessianLagSparsity | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const int ** | offset, | ||
const int ** | col | ||
) |
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 to 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.
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure offset pointer to store pointer that stores the offsets to each rows sparsity pattern in col, can be NULL col pointer to store pointer that stores the indices of variables that appear in each row, offset[nconss] gives length of col, can be NULL
Definition at line 2286 of file nlpioracle.c.
References BMSclearMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::heslagcols, SCIP_NlpiOracle::heslagoffsets, hessLagSparsitySetNzFlagForExpr(), SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPdebugMessage, SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, SCIPstartClock(), and SCIPstopClock().
Referenced by initWorhp(), setupHessian(), and userHM().
◆ SCIPnlpiOracleEvalHessianLag()
SCIP_RETCODE SCIPnlpiOracleEvalHessianLag | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const SCIP_Real * | x, | ||
SCIP_Bool | isnewx_obj, | ||
SCIP_Bool | isnewx_cons, | ||
SCIP_Real | objfactor, | ||
const SCIP_Real * | lambda, | ||
SCIP_Real * | hessian | ||
) |
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.
- Returns
- SCIP_INVALIDDATA, if the Hessian could not be evaluated (domain error, etc.)
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure x point where to evaluate isnewx_obj has the point x changed since the last call to an objective evaluation function? isnewx_cons has the point x changed since the last call to the constraint evaluation function? objfactor weight for objective function lambda weights (Lagrangian multipliers) for the constraints hessian pointer to store sparse hessian values
Definition at line 2380 of file nlpioracle.c.
References BMSclearMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::heslagcols, SCIP_NlpiOracle::heslagoffsets, hessLagAddExpr(), SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), and userHM().
◆ SCIPnlpiOracleResetEvalTime()
SCIP_RETCODE SCIPnlpiOracleResetEvalTime | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle | ||
) |
resets clock that measures evaluation time
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure
Definition at line 2427 of file nlpioracle.c.
References SCIP_NlpiOracle::evalclock, NULL, SCIP_CALL, SCIP_OKAY, and SCIPresetClock().
Referenced by SCIP_DECL_NLPISOLVE().
◆ SCIPnlpiOracleGetEvalTime()
SCIP_Real SCIPnlpiOracleGetEvalTime | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle | ||
) |
gives time spend in evaluation since last reset of clock
Gives 0 if the eval clock is disabled.
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure
Definition at line 2443 of file nlpioracle.c.
References SCIP_NlpiOracle::evalclock, NULL, and SCIPgetClockTime().
Referenced by SCIP_DECL_NLPIGETSTATISTICS().
◆ SCIPnlpiOraclePrintProblem()
SCIP_RETCODE SCIPnlpiOraclePrintProblem | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
FILE * | file | ||
) |
prints the problem to a file.
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure file file to print to, or NULL for standard output
Definition at line 2454 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, FALSE, 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, SCIPinfoMessage(), SCIPisInfinity(), SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varlincount, SCIP_NlpiOracle::varnames, SCIP_NlpiOracle::varnlcount, and SCIP_NlpiOracle::varubs.
Referenced by computeInteriorPoint(), and SCIP_DECL_NLPISOLVE().
◆ SCIPnlpiOraclePrintProblemGams()
SCIP_RETCODE SCIPnlpiOraclePrintProblemGams | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
SCIP_Real * | initval, | ||
FILE * | file | ||
) |
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.
- Parameters
-
scip SCIP data structure oracle pointer to NLPIORACLE data structure initval starting point values for variables or NULL file file to print to, or NULL for standard output
Definition at line 2522 of file nlpioracle.c.
References SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, exprIsNonSmooth(), FALSE, 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_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPinfoMessage(), SCIPisInfinity(), SCIPsnprintf(), TRUE, SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varnames, and SCIP_NlpiOracle::varubs.