NLP representation used by various NLP solver interface implementations.
Typedefs | |
typedef struct SCIP_NlpiOracle | SCIP_NLPIORACLE |
NLPI oracle data structure
Definition at line 51 of file nlpioracle.h.
SCIP_RETCODE SCIPnlpiOracleCreate | ( | SCIP * | scip, |
SCIP_NLPIORACLE ** | oracle ) |
creates an NLPIORACLE data structure
scip | SCIP data structure |
oracle | pointer to store NLPIORACLE data structure |
Definition at line 983 of file nlpioracle.c.
References assert(), BMSclearMemory, createConstraint(), FALSE, i, NULL, SCIP_NlpiOracle::objective, SCIP_CALL, SCIP_OKAY, SCIPallocMemory, SCIPcreateClock(), SCIPdebugMessage, SCIPexprintCreate(), SCIPexprintGetName(), SCIPgetBoolParam(), and SCIPsetClockEnabled().
Referenced by SCIP_DECL_NLPICREATEPROBLEM(), SCIP_DECL_NLPICREATEPROBLEM(), and SCIP_DECL_NLPICREATEPROBLEM().
SCIP_RETCODE SCIPnlpiOracleFree | ( | SCIP * | scip, |
SCIP_NLPIORACLE ** | oracle ) |
frees an NLPIORACLE data structure
scip | SCIP data structure |
oracle | pointer to NLPIORACLE data structure |
Definition at line 1013 of file nlpioracle.c.
References assert(), 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(), SCIP_DECL_NLPIFREEPROBLEM(), and SCIP_DECL_NLPIFREEPROBLEM().
SCIP_RETCODE SCIPnlpiOracleSetProblemName | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const char * | name ) |
sets the problem name (used for printing)
scip | SCIP data structure |
oracle | pointer to NLPIORACLE data structure |
name | name of problem |
Definition at line 1045 of file nlpioracle.c.
References assert(), i, SCIP_NlpiOracle::name, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPduplicateBlockMemoryArray, and SCIPfreeBlockMemoryArray.
Referenced by SCIP_DECL_NLPICREATEPROBLEM(), SCIP_DECL_NLPICREATEPROBLEM(), SCIP_DECL_NLPICREATEPROBLEM(), and SCIPnlpiOracleFree().
const char * SCIPnlpiOracleGetProblemName | ( | SCIP_NLPIORACLE * | oracle | ) |
gets the problem name, or NULL if none set
oracle | pointer to NLPIORACLE data structure |
Definition at line 1069 of file nlpioracle.c.
References assert(), SCIP_NlpiOracle::name, NULL, and SCIPdebugMessage.
Referenced by SCIP_DECL_NLPISOLVE().
SCIP_RETCODE SCIPnlpiOracleAddVars | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | nvars, | ||
const SCIP_Real * | lbs, | ||
const SCIP_Real * | ubs, | ||
const char ** | varnames ) |
adds variables
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 assert(), BMSclearMemoryArray, BMScopyMemoryArray, ensureVarsSize(), EPSEQ, i, invalidateHessianLagSparsity(), NULL, nvars, 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(), SCIP_DECL_NLPIADDVARS(), and SCIP_DECL_NLPIADDVARS().
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
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 assert(), c, SCIP_NlpiOracle::conss, createConstraint(), ensureConssSize(), SCIP_NlpiOracleCons::expr, FALSE, i, invalidateHessianLagSparsity(), invalidateJacobiSparsity(), SCIP_NlpiOracle::nconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPinfinity(), and TRUE.
Referenced by SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPIADDCONSTRAINTS(), and SCIP_DECL_NLPIADDCONSTRAINTS().
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.
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 assert(), createConstraint(), SCIP_NlpiOracleCons::expr, freeConstraint(), i, invalidateHessianLagSparsity(), NULL, SCIP_NlpiOracle::objective, REALABS, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPisInfinity(), and TRUE.
Referenced by SCIP_DECL_NLPISETOBJECTIVE(), SCIP_DECL_NLPISETOBJECTIVE(), and SCIP_DECL_NLPISETOBJECTIVE().
SCIP_RETCODE SCIPnlpiOracleChgVarBounds | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | nvars, | ||
const int * | indices, | ||
const SCIP_Real * | lbs, | ||
const SCIP_Real * | ubs ) |
change variable bounds
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 assert(), EPSEQ, i, NULL, nvars, SCIP_NlpiOracle::nvars, SCIP_DEFAULT_EPSILON, SCIP_OKAY, SCIPdebugMessage, SCIPinfinity(), SCIP_NlpiOracle::varlbs, and SCIP_NlpiOracle::varubs.
Referenced by SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPICHGVARBOUNDS(), and SCIP_DECL_NLPICHGVARBOUNDS().
SCIP_RETCODE SCIPnlpiOracleChgConsSides | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | nconss, | ||
const int * | indices, | ||
const SCIP_Real * | lhss, | ||
const SCIP_Real * | rhss ) |
change constraint sides
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 assert(), SCIP_NlpiOracle::conss, EPSEQ, i, SCIP_NlpiOracleCons::lhs, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracleCons::rhs, SCIP_DEFAULT_EPSILON, SCIP_OKAY, SCIPdebugMessage, and SCIPinfinity().
Referenced by SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPICHGCONSSIDES(), and SCIP_DECL_NLPICHGCONSSIDES().
SCIP_RETCODE SCIPnlpiOracleDelVarSet | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int * | delstats ) |
deletes a set of variables
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 assert(), c, clearDeletedLinearElements(), SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::exprinterpreter, FALSE, freeVariables(), i, invalidateHessianLagSparsity(), invalidateJacobiSparsity(), SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, mapIndices(), moveVariable(), SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, 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(), SCIP_DECL_NLPIDELVARSET(), and SCIP_DECL_NLPIDELVARSET().
SCIP_RETCODE SCIPnlpiOracleDelConsSet | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int * | delstats ) |
deletes a set of constraints
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 assert(), BMSclearMemoryArray, c, SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, freeConstraint(), freeConstraints(), i, 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(), SCIP_DECL_NLPIDELCONSSET(), and SCIP_DECL_NLPIDELCONSSET().
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
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 assert(), SCIP_NlpiOracle::conss, ensureConsLinSize(), FALSE, i, invalidateJacobiSparsity(), SCIP_NlpiOracleCons::lincoefs, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracleCons::linsize, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, SCIP_NlpiOracle::objective, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPduplicateBlockMemoryArray, SCIPsortedvecFindInt(), sortLinearCoefficients(), TRUE, updateVariableCounts(), and SCIP_NlpiOracle::varlincount.
Referenced by SCIP_DECL_NLPICHGLINEARCOEFS(), SCIP_DECL_NLPICHGLINEARCOEFS(), and SCIP_DECL_NLPICHGLINEARCOEFS().
SCIP_RETCODE SCIPnlpiOracleChgExpr | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | considx, | ||
SCIP_EXPR * | expr ) |
replaces expression of one constraint or objective
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 assert(), SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::exprinterpreter, i, invalidateHessianLagSparsity(), invalidateJacobiSparsity(), NULL, SCIP_NlpiOracle::objective, SCIP_CALL, SCIP_OKAY, SCIPcaptureExpr(), SCIPdebugMessage, SCIPexprintCompile(), SCIPexprintFreeData(), SCIPreleaseExpr(), and updateVariableCounts().
Referenced by SCIP_DECL_NLPICHGEXPR(), SCIP_DECL_NLPICHGEXPR(), and SCIP_DECL_NLPICHGEXPR().
SCIP_RETCODE SCIPnlpiOracleChgObjConstant | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
SCIP_Real | objconstant ) |
changes the constant value in the objective function
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 assert(), i, SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, SCIP_NlpiOracleCons::rhs, SCIP_OKAY, and SCIPdebugMessage.
Referenced by SCIP_DECL_NLPICHGOBJCONSTANT(), SCIP_DECL_NLPICHGOBJCONSTANT(), and SCIP_DECL_NLPICHGOBJCONSTANT().
int SCIPnlpiOracleGetNVars | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the current number of variables
oracle | pointer to NLPIORACLE data structure |
Definition at line 1716 of file nlpioracle.c.
References assert(), NULL, and SCIP_NlpiOracle::nvars.
Referenced by computeInteriorPoint(), ensureStartingPoint(), handleNlpParam(), initWorhp(), processSolveOutcome(), SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPIADDVARS(), SCIP_DECL_NLPIADDVARS(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPIDELVARSET(), SCIP_DECL_NLPIFREEPROBLEM(), SCIP_DECL_NLPISETINITIALGUESS(), SCIP_DECL_NLPISETINITIALGUESS(), SCIP_DECL_NLPISETINITIALGUESS(), SCIP_DECL_NLPISOLVE(), setupGradients(), setupHessian(), setupStart(), updateWorhp(), userDF(), userDG(), userF(), userG(), and userHM().
int SCIPnlpiOracleGetNConstraints | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the current number of constraints
oracle | pointer to NLPIORACLE data structure |
Definition at line 1726 of file nlpioracle.c.
References assert(), SCIP_NlpiOracle::nconss, and NULL.
Referenced by computeInteriorPoint(), handleNlpParam(), initWorhp(), processSolveOutcome(), SCIP_DECL_NLPIADDCONSTRAINTS(), 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().
const SCIP_Real * SCIPnlpiOracleGetVarLbs | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the variables lower bounds
oracle | pointer to NLPIORACLE data structure |
Definition at line 1736 of file nlpioracle.c.
References assert(), NULL, and SCIP_NlpiOracle::varlbs.
Referenced by ensureStartingPoint(), handleNlpParam(), initWorhp(), SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPISOLVE(), SCIP_DECL_NLPISOLVE(), setupStart(), and updateWorhp().
const SCIP_Real * SCIPnlpiOracleGetVarUbs | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the variables upper bounds
oracle | pointer to NLPIORACLE data structure |
Definition at line 1746 of file nlpioracle.c.
References assert(), NULL, and SCIP_NlpiOracle::varubs.
Referenced by ensureStartingPoint(), handleNlpParam(), initWorhp(), SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPISOLVE(), SCIP_DECL_NLPISOLVE(), setupStart(), and updateWorhp().
char ** SCIPnlpiOracleGetVarNames | ( | SCIP_NLPIORACLE * | oracle | ) |
gives the variables names, or NULL if not set
oracle | pointer to NLPIORACLE data structure |
Definition at line 1756 of file nlpioracle.c.
References assert(), NULL, and SCIP_NlpiOracle::varnames.
SCIP_Bool SCIPnlpiOracleIsVarNonlinear | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
int | varidx ) |
indicates whether variable appears nonlinear in any objective or constraint
scip | SCIP data structure |
oracle | pointer to NLPIORACLE data structure |
varidx | the variable to check |
Definition at line 1766 of file nlpioracle.c.
References assert(), i, NULL, nvars, varidx, and SCIP_NlpiOracle::varnlcount.
Referenced by handleNlpParam().
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
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 assert(), i, NULL, SCIP_NlpiOracle::varlincount, and SCIP_NlpiOracle::varnlcount.
SCIP_Real SCIPnlpiOracleGetObjectiveConstant | ( | SCIP_NLPIORACLE * | oracle | ) |
gives constant term of objective
oracle | pointer to NLPIORACLE data structure |
Definition at line 1797 of file nlpioracle.c.
References assert(), SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, and SCIP_NlpiOracleCons::rhs.
Referenced by SCIP_DECL_NLPICHGOBJCONSTANT().
SCIP_Real SCIPnlpiOracleGetConstraintLhs | ( | SCIP_NLPIORACLE * | oracle, |
int | considx ) |
gives left-hand side of a constraint
oracle | pointer to NLPIORACLE data structure |
considx | constraint index |
Definition at line 1808 of file nlpioracle.c.
References assert(), SCIP_NlpiOracle::conss, i, SCIP_NlpiOracleCons::lhs, and NULL.
Referenced by handleNlpParam(), initWorhp(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPISOLVE(), and updateWorhp().
SCIP_Real SCIPnlpiOracleGetConstraintRhs | ( | SCIP_NLPIORACLE * | oracle, |
int | considx ) |
gives right-hand side of a constraint
oracle | pointer to NLPIORACLE data structure |
considx | constraint index |
Definition at line 1821 of file nlpioracle.c.
References assert(), SCIP_NlpiOracle::conss, i, NULL, and SCIP_NlpiOracleCons::rhs.
Referenced by handleNlpParam(), initWorhp(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPISOLVE(), and updateWorhp().
char * SCIPnlpiOracleGetConstraintName | ( | SCIP_NLPIORACLE * | oracle, |
int | considx ) |
gives name of a constraint, may be NULL
oracle | pointer to NLPIORACLE data structure |
considx | constraint index |
Definition at line 1834 of file nlpioracle.c.
References assert(), SCIP_NlpiOracle::conss, i, SCIP_NlpiOracleCons::name, and NULL.
SCIP_Bool SCIPnlpiOracleIsConstraintNonlinear | ( | SCIP_NLPIORACLE * | oracle, |
int | considx ) |
indicates whether constraint is nonlinear
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 assert(), SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, i, NULL, and SCIP_NlpiOracle::objective.
Referenced by computeInteriorPoint(), handleNlpParam(), SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPISETOBJECTIVE(), SCIP_DECL_NLPISETOBJECTIVE(), and SCIP_DECL_NLPISOLVE().
SCIP_EXPRINTCAPABILITY SCIPnlpiOracleGetEvalCapability | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle ) |
gives the evaluation capabilities that are shared among all expressions in the problem
scip | SCIP data structure |
oracle | pointer to NLPIORACLE data structure |
Definition at line 1864 of file nlpioracle.c.
References assert(), c, SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::exprinterpreter, i, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::objective, SCIP_EXPRINTCAPABILITY_ALL, and SCIPexprintGetExprCapability().
Referenced by SCIP_DECL_NLPISOLVE().
SCIP_RETCODE SCIPnlpiOracleEvalObjectiveValue | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const SCIP_Real * | x, | ||
SCIP_Real * | objval ) |
evaluates the objective function in a given point
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 assert(), SCIP_NlpiOracle::evalclock, evalFunctionValue(), SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, objval, SCIP_NlpiOracleCons::rhs, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), SCIP_DECL_NLPIGETSOLUTION(), SCIP_DECL_NLPIGETSOLUTION(), setupStart(), and userF().
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
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 assert(), SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, evalFunctionValue(), i, NULL, SCIP_NlpiOracle::nvars, SCIP_CALL, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), and setupStart().
SCIP_RETCODE SCIPnlpiOracleEvalConstraintValues | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
const SCIP_Real * | x, | ||
SCIP_Real * | convals ) |
evaluates all constraint functions in a given point
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 assert(), SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, evalFunctionValue(), i, SCIP_NlpiOracle::nconss, NULL, SCIP_NlpiOracle::nvars, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by userG().
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
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 assert(), SCIP_NlpiOracle::evalclock, evalFunctionGradient(), i, SCIP_NlpiOracleCons::lhs, NULL, SCIP_NlpiOracle::objective, objval, SCIP_NlpiOracleCons::rhs, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), setupStart(), and userDF().
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
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 assert(), SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, evalFunctionGradient(), i, NULL, SCIP_NlpiOracle::nvars, SCIP_CALL, SCIPdebugMessage, SCIPstartClock(), SCIPstopClock(), and x.
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.
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 assert(), BMSclearMemoryArray, BMScopyMemoryArray, SCIP_NlpiOracle::conss, ensureIntArraySize(), SCIP_NlpiOracle::evalclock, SCIP_NlpiOracleCons::expr, FALSE, i, SCIP_NlpiOracle::jaccols, SCIP_NlpiOracle::jacoffsets, SCIP_NlpiOracleCons::linidxs, SCIP_NlpiOracle::nconss, SCIP_NlpiOracleCons::nlinidxs, NULL, SCIP_NlpiOracle::nvars, 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().
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.
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 assert(), BMSclearMemoryArray, BMScopyMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::exprinterpreter, i, 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, SCIPallocCleanBufferArray, SCIPdebug, SCIPdebugMessage, SCIPdebugMsg, SCIPexprintGrad(), SCIPfreeCleanBufferArray, SCIPisFinite, SCIPisInfinity(), SCIPstartClock(), SCIPstopClock(), and x.
Referenced by F77_FUNC(), setupStart(), and userDG().
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.
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 assert(), BMSclearMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::heslagcols, SCIP_NlpiOracle::heslagoffsets, hessLagSparsitySetNzFlagForExpr(), i, 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().
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.
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 assert(), BMSclearMemoryArray, SCIP_NlpiOracle::conss, SCIP_NlpiOracle::evalclock, SCIP_NlpiOracleCons::expr, SCIP_NlpiOracleCons::exprintdata, SCIP_NlpiOracle::heslagcols, SCIP_NlpiOracle::heslagoffsets, hessLagAddExpr(), i, 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().
SCIP_RETCODE SCIPnlpiOracleResetEvalTime | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle ) |
resets clock that measures evaluation time
scip | SCIP data structure |
oracle | pointer to NLPIORACLE data structure |
Definition at line 2427 of file nlpioracle.c.
References assert(), SCIP_NlpiOracle::evalclock, NULL, SCIP_CALL, SCIP_OKAY, and SCIPresetClock().
Referenced by SCIP_DECL_NLPISOLVE(), SCIP_DECL_NLPISOLVE(), and SCIP_DECL_NLPISOLVE().
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.
scip | SCIP data structure |
oracle | pointer to NLPIORACLE data structure |
Definition at line 2443 of file nlpioracle.c.
References assert(), SCIP_NlpiOracle::evalclock, NULL, and SCIPgetClockTime().
Referenced by SCIP_DECL_NLPIGETSTATISTICS(), SCIP_DECL_NLPIGETSTATISTICS(), and SCIP_DECL_NLPIGETSTATISTICS().
SCIP_RETCODE SCIPnlpiOraclePrintProblem | ( | SCIP * | scip, |
SCIP_NLPIORACLE * | oracle, | ||
FILE * | file ) |
prints the problem to a file.
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 assert(), SCIP_NlpiOracle::conss, FALSE, i, 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, 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().
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.
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 assert(), SCIP_NlpiOracle::conss, SCIP_NlpiOracleCons::expr, exprIsNonSmooth(), FALSE, i, 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_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPdebugMessage, SCIPinfoMessage(), SCIPisInfinity(), SCIPsnprintf(), TRUE, SCIP_NlpiOracle::varlbs, SCIP_NlpiOracle::varnames, and SCIP_NlpiOracle::varubs.