Detailed Description
methods for the management of NLP solver interfaces
Macros | |
#define | SCIPsolveNlpi(scip, nlpi, ...) |
Statistics | |
int | SCIPnlpiGetNProblems (SCIP_NLPI *nlpi) |
SCIP_Real | SCIPnlpiGetProblemTime (SCIP_NLPI *nlpi) |
int | SCIPnlpiGetNSolves (SCIP_NLPI *nlpi) |
SCIP_Real | SCIPnlpiGetSolveTime (SCIP_NLPI *nlpi) |
SCIP_Real | SCIPnlpiGetEvalTime (SCIP_NLPI *nlpi) |
SCIP_Longint | SCIPnlpiGetNIterations (SCIP_NLPI *nlpi) |
int | SCIPnlpiGetNTermStat (SCIP_NLPI *nlpi, SCIP_NLPTERMSTAT termstatus) |
int | SCIPnlpiGetNSolStat (SCIP_NLPI *nlpi, SCIP_NLPSOLSTAT solstatus) |
void | SCIPnlpiMergeStatistics (SCIP_NLPI *targetnlpi, SCIP_NLPI *sourcenlpi, SCIP_Bool reset) |
Convenience methods to setup and update an NLPI problem using NLROWS | |
These methods can be used, for example, to create a NLPI problem that contains only the convex rows of the SCIP NLP relaxation. | |
SCIP_RETCODE | SCIPcreateNlpiProblemFromNlRows (SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM **nlpiprob, const char *name, SCIP_NLROW **nlrows, int nnlrows, SCIP_HASHMAP *var2idx, SCIP_HASHMAP *nlrow2idx, SCIP_Real *nlscore, SCIP_Real cutoffbound, SCIP_Bool setobj, SCIP_Bool onlyconvex) |
SCIP_RETCODE | SCIPupdateNlpiProblem (SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *var2nlpiidx, SCIP_VAR **nlpivars, int nlpinvars, SCIP_Real cutoffbound) |
SCIP_RETCODE | SCIPaddNlpiProblemRows (SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *var2idx, SCIP_ROW **rows, int nrows) |
SCIP_RETCODE | SCIPaddNlpiProblemNlRows (SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *var2idx, SCIP_NLROW **nlrows, int nnlrows) |
Macro Definition Documentation
◆ SCIPsolveNlpi
#define SCIPsolveNlpi | ( | scip, | |
nlpi, | |||
... | |||
) |
try to solve NLP with non-default parameters given as optional arguments
Typical use is
SCIP_CALL( SCIPsolveNlpi(scip, nlpi, nlpiproblem) );
to solve with default parameters. Additionally, one or several values of SCIP_NLPPARAM can be set:
SCIP_CALL( SCIPsolveNlpi(scip, nlpi, nlpiproblem, .iterlimit = 42, .verblevel = 1) ); //lint !e666
Definition at line 208 of file scip_nlpi.h.
Referenced by computeInteriorPoint(), separateCuts(), and solveFeasibilityNonlinearSubproblem().
Function Documentation
◆ SCIP_DECL_SORTPTRCOMP()
SCIP_DECL_SORTPTRCOMP | ( | SCIPnlpiComp | ) |
◆ SCIPnlpiGetData()
SCIP_NLPIDATA* SCIPnlpiGetData | ( | SCIP_NLPI * | nlpi | ) |
gets data of an NLPI
- Parameters
-
nlpi NLP interface structure
Definition at line 712 of file nlpi.c.
References SCIP_Nlpi::nlpidata, and NULL.
Referenced by handleNlpParam(), SCIP_DECL_NLPIADDCONSTRAINTS(), SCIP_DECL_NLPIADDVARS(), SCIP_DECL_NLPICHGCONSSIDES(), SCIP_DECL_NLPICHGEXPR(), SCIP_DECL_NLPICHGLINEARCOEFS(), SCIP_DECL_NLPICHGOBJCONSTANT(), SCIP_DECL_NLPICHGVARBOUNDS(), SCIP_DECL_NLPICOPY(), SCIP_DECL_NLPICREATEPROBLEM(), SCIP_DECL_NLPIDELCONSSET(), SCIP_DECL_NLPIDELVARSET(), SCIP_DECL_NLPIFREEPROBLEM(), SCIP_DECL_NLPIGETSOLSTAT(), SCIP_DECL_NLPIGETSOLUTION(), SCIP_DECL_NLPIGETSTATISTICS(), SCIP_DECL_NLPIGETTERMSTAT(), SCIP_DECL_NLPISETINITIALGUESS(), SCIP_DECL_NLPISETOBJECTIVE(), and SCIP_DECL_NLPISOLVE().
◆ SCIPnlpiGetName()
const char* SCIPnlpiGetName | ( | SCIP_NLPI * | nlpi | ) |
gets NLP solver name
- Parameters
-
nlpi NLP interface structure
Definition at line 722 of file nlpi.c.
References SCIP_Nlpi::name, and NULL.
Referenced by computeInteriorPoint(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_NLPISOLVE(), SCIPincludeDialogDefaultFix(), SCIPincludeDialogDefaultSet(), SCIPmergeNLPIStatistics(), and SCIPprintNLPIStatistics().
◆ SCIPnlpiGetDesc()
const char* SCIPnlpiGetDesc | ( | SCIP_NLPI * | nlpi | ) |
gets NLP solver description
- Parameters
-
nlpi NLP interface structure
Definition at line 732 of file nlpi.c.
References SCIP_Nlpi::description, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC(), SCIPincludeDialogDefaultFix(), and SCIPincludeDialogDefaultSet().
◆ SCIPnlpiGetPriority()
int SCIPnlpiGetPriority | ( | SCIP_NLPI * | nlpi | ) |
gets NLP solver priority
- Parameters
-
nlpi NLP interface structure
Definition at line 742 of file nlpi.c.
References NULL, and SCIP_Nlpi::priority.
Referenced by SCIP_DECL_DIALOGEXEC(), and SCIPincludeNlpi().
◆ SCIPnlpiGetNProblems()
int SCIPnlpiGetNProblems | ( | SCIP_NLPI * | nlpi | ) |
gives number of problems created for NLP solver so far
- Parameters
-
nlpi NLP interface structure
Definition at line 756 of file nlpi.c.
References SCIP_Nlpi::nproblems, and NULL.
Referenced by SCIPprintNLPIStatistics().
◆ SCIPnlpiGetProblemTime()
gives total time spend in problem creation/modification/freeing
- Parameters
-
nlpi NLP interface structure
Definition at line 765 of file nlpi.c.
References NULL, SCIP_Nlpi::problemtime, and SCIPclockGetTime().
Referenced by SCIPprintNLPIStatistics().
◆ SCIPnlpiGetNSolves()
int SCIPnlpiGetNSolves | ( | SCIP_NLPI * | nlpi | ) |
total number of NLP solves so far
- Parameters
-
nlpi NLP interface structure
Definition at line 774 of file nlpi.c.
References SCIP_Nlpi::nsolves, and NULL.
Referenced by SCIPprintNLPIStatistics().
◆ SCIPnlpiGetSolveTime()
gives total time spend in NLP solves (as reported by solver)
- Parameters
-
nlpi NLP interface structure
Definition at line 783 of file nlpi.c.
References NULL, and SCIP_Nlpi::solvetime.
Referenced by SCIPprintNLPIStatistics().
◆ SCIPnlpiGetEvalTime()
gives total time spend in function evaluation during NLP solves
If parameter timing/nlpieval
is off (the default), depending on the NLP solver, this may just return 0.
- Parameters
-
nlpi NLP interface structure
Definition at line 795 of file nlpi.c.
References SCIP_Nlpi::evaltime, and NULL.
Referenced by SCIPprintNLPIStatistics().
◆ SCIPnlpiGetNIterations()
SCIP_Longint SCIPnlpiGetNIterations | ( | SCIP_NLPI * | nlpi | ) |
gives total number of iterations spend by NLP solver so far
- Parameters
-
nlpi NLP interface structure
Definition at line 804 of file nlpi.c.
References SCIP_Nlpi::niter, and NULL.
Referenced by SCIPprintNLPIStatistics().
◆ SCIPnlpiGetNTermStat()
int SCIPnlpiGetNTermStat | ( | SCIP_NLPI * | nlpi, |
SCIP_NLPTERMSTAT | termstatus | ||
) |
gives number of times a solve ended with a specific termination status
- Parameters
-
nlpi NLP interface structure termstatus the termination status to query for
Definition at line 813 of file nlpi.c.
References SCIP_Nlpi::ntermstat, and NULL.
Referenced by SCIPprintNLPIStatistics().
◆ SCIPnlpiGetNSolStat()
int SCIPnlpiGetNSolStat | ( | SCIP_NLPI * | nlpi, |
SCIP_NLPSOLSTAT | solstatus | ||
) |
gives number of times a solve ended with a specific solution status
- Parameters
-
nlpi NLP interface structure solstatus the solution status to query for
Definition at line 823 of file nlpi.c.
References SCIP_Nlpi::nsolstat, and NULL.
Referenced by SCIPprintNLPIStatistics().
◆ SCIPnlpiMergeStatistics()
adds statistics from one NLPI to another
- Parameters
-
targetnlpi NLP interface where to add statistics sourcenlpi NLP interface from which to add statistics reset whether to reset statistics in sourcescip
Definition at line 833 of file nlpi.c.
References SCIP_Nlpi::evaltime, SCIP_Nlpi::niter, SCIP_Nlpi::nproblems, SCIP_Nlpi::nsolstat, SCIP_Nlpi::nsolves, SCIP_Nlpi::ntermstat, NULL, SCIP_Nlpi::problemtime, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OKAY, SCIP_NLPTERMSTAT_OTHER, SCIPclockGetTime(), SCIPclockReset(), SCIPclockSetTime(), and SCIP_Nlpi::solvetime.
Referenced by SCIPmergeNLPIStatistics().
◆ SCIPincludeNlpi()
SCIP_RETCODE SCIPincludeNlpi | ( | SCIP * | scip, |
const char * | name, | ||
const char * | description, | ||
int | priority, | ||
SCIP_DECL_NLPICOPY((*nlpicopy)) | , | ||
SCIP_DECL_NLPIFREE((*nlpifree)) | , | ||
SCIP_DECL_NLPIGETSOLVERPOINTER((*nlpigetsolverpointer)) | , | ||
SCIP_DECL_NLPICREATEPROBLEM((*nlpicreateproblem)) | , | ||
SCIP_DECL_NLPIFREEPROBLEM((*nlpifreeproblem)) | , | ||
SCIP_DECL_NLPIGETPROBLEMPOINTER((*nlpigetproblempointer)) | , | ||
SCIP_DECL_NLPIADDVARS((*nlpiaddvars)) | , | ||
SCIP_DECL_NLPIADDCONSTRAINTS((*nlpiaddconstraints)) | , | ||
SCIP_DECL_NLPISETOBJECTIVE((*nlpisetobjective)) | , | ||
SCIP_DECL_NLPICHGVARBOUNDS((*nlpichgvarbounds)) | , | ||
SCIP_DECL_NLPICHGCONSSIDES((*nlpichgconssides)) | , | ||
SCIP_DECL_NLPIDELVARSET((*nlpidelvarset)) | , | ||
SCIP_DECL_NLPIDELCONSSET((*nlpidelconsset)) | , | ||
SCIP_DECL_NLPICHGLINEARCOEFS((*nlpichglinearcoefs)) | , | ||
SCIP_DECL_NLPICHGEXPR((*nlpichgexpr)) | , | ||
SCIP_DECL_NLPICHGOBJCONSTANT((*nlpichgobjconstant)) | , | ||
SCIP_DECL_NLPISETINITIALGUESS((*nlpisetinitialguess)) | , | ||
SCIP_DECL_NLPISOLVE((*nlpisolve)) | , | ||
SCIP_DECL_NLPIGETSOLSTAT((*nlpigetsolstat)) | , | ||
SCIP_DECL_NLPIGETTERMSTAT((*nlpigettermstat)) | , | ||
SCIP_DECL_NLPIGETSOLUTION((*nlpigetsolution)) | , | ||
SCIP_DECL_NLPIGETSTATISTICS((*nlpigetstatistics)) | , | ||
SCIP_NLPIDATA * | nlpidata | ||
) |
creates an NLPI and includes it into SCIP
- Parameters
-
scip SCIP data structure name name of NLP interface description description of NLP interface priority priority of NLP interface nlpidata NLP interface local data
Definition at line 107 of file scip_nlpi.c.
References FALSE, NULL, paramname, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddIntParam(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindNlpi(), SCIPnlpiCreate(), SCIPnlpiGetPriority(), SCIPsetIncludeNlpi(), SCIPsnprintf(), Scip::set, and TRUE.
Referenced by SCIPincludeNlpSolverAll(), SCIPincludeNlpSolverFilterSQP(), SCIPincludeNlpSolverIpopt(), and SCIPincludeNlpSolverWorhp().
◆ SCIPfindNlpi()
returns the NLPI of the given name, or NULL if not existing
- Parameters
-
scip SCIP data structure name name of NLPI
Definition at line 173 of file scip_nlpi.c.
References NULL, SCIPsetFindNlpi(), and Scip::set.
Referenced by SCIPincludeNlpi().
◆ SCIPgetNlpis()
returns the array of currently available NLPIs (sorted by priority)
- Parameters
-
scip SCIP data structure
Definition at line 186 of file scip_nlpi.c.
References SCIP_Set::nlpis, NULL, SCIPsetSortNlpis(), and Scip::set.
Referenced by applyNlobbt(), computeInteriorPoint(), createAuxiliaryNonlinearSubproblem(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEURINITSOL(), SCIP_DECL_RELAXEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPincludeDialogDefaultFix(), SCIPincludeDialogDefaultSet(), and SCIPincludeNlpSolverAll().
◆ SCIPgetNNlpis()
int SCIPgetNNlpis | ( | SCIP * | scip | ) |
returns the number of currently available NLPIs
- Parameters
-
scip SCIP data structure
Definition at line 199 of file scip_nlpi.c.
References SCIP_Set::nnlpis, NULL, and Scip::set.
Referenced by applyNlobbt(), checkSubproblemConvexity(), computeInteriorPoint(), createSubSCIP(), generateAndApplyBendersCuts(), runHeuristic(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEURINITSOL(), SCIP_DECL_PROPEXEC(), SCIP_DECL_RELAXEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPapplyHeurDualval(), SCIPapplyUndercover(), SCIPbendersComputeSubproblemLowerbound(), SCIPbendersSolSlackVarsActive(), SCIPbendersSolveSubproblemLP(), SCIPgenerateAndApplyBendersOptCut(), SCIPincludeDialogDefaultFix(), SCIPincludeDialogDefaultSet(), and SCIPincludeNlpSolverAll().
◆ SCIPsetNlpiPriority()
SCIP_RETCODE SCIPsetNlpiPriority | ( | SCIP * | scip, |
SCIP_NLPI * | nlpi, | ||
int | priority | ||
) |
sets the priority of an NLPI
- Parameters
-
scip SCIP data structure nlpi NLPI priority new priority of the NLPI
Definition at line 210 of file scip_nlpi.c.
References NULL, SCIP_OKAY, SCIPsetSetPriorityNlpi(), and Scip::set.
Referenced by SCIP_DECL_PARAMCHGD().
◆ SCIP_DECL_NLPIGETSOLVERPOINTER()
SCIP_DECL_NLPIGETSOLVERPOINTER | ( | SCIPgetNlpiSolverPointer | ) |
gets internal pointer to NLP solver
Depending on the solver interface, a solver pointer may exist for every NLP problem instance. For this case, a NLPI problem can be passed in as well.
gets internal pointer to NLP solver
Definition at line 225 of file scip_nlpi.c.
References NULL, SCIPnlpiGetSolverPointer(), and Scip::set.
◆ SCIP_DECL_NLPICREATEPROBLEM()
SCIP_DECL_NLPICREATEPROBLEM | ( | SCIPcreateNlpiProblem | ) |
creates an empty problem instance
Definition at line 233 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiCreateProblem(), and Scip::set.
◆ SCIP_DECL_NLPIFREEPROBLEM()
SCIP_DECL_NLPIFREEPROBLEM | ( | SCIPfreeNlpiProblem | ) |
frees a problem instance
Definition at line 243 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiFreeProblem(), and Scip::set.
◆ SCIP_DECL_NLPIGETPROBLEMPOINTER()
SCIP_DECL_NLPIGETPROBLEMPOINTER | ( | SCIPgetNlpiProblemPointer | ) |
gets internal pointer to solver-internal problem instance
Definition at line 253 of file scip_nlpi.c.
References NULL, SCIPnlpiGetProblemPointer(), and Scip::set.
◆ SCIP_DECL_NLPIADDVARS()
SCIP_DECL_NLPIADDVARS | ( | SCIPaddNlpiVars | ) |
add variables to nlpi
Definition at line 261 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiAddVars(), and Scip::set.
◆ SCIP_DECL_NLPIADDCONSTRAINTS()
SCIP_DECL_NLPIADDCONSTRAINTS | ( | SCIPaddNlpiConstraints | ) |
add constraints to nlpi
Definition at line 271 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiAddConstraints(), and Scip::set.
◆ SCIP_DECL_NLPISETOBJECTIVE()
SCIP_DECL_NLPISETOBJECTIVE | ( | SCIPsetNlpiObjective | ) |
sets or overwrites objective, a minimization problem is expected
Definition at line 281 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiSetObjective(), and Scip::set.
◆ SCIP_DECL_NLPICHGVARBOUNDS()
SCIP_DECL_NLPICHGVARBOUNDS | ( | SCIPchgNlpiVarBounds | ) |
change variable bounds
Definition at line 291 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiChgVarBounds(), and Scip::set.
◆ SCIP_DECL_NLPICHGCONSSIDES()
SCIP_DECL_NLPICHGCONSSIDES | ( | SCIPchgNlpiConsSides | ) |
change constraint sides
Definition at line 301 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiChgConsSides(), and Scip::set.
◆ SCIP_DECL_NLPIDELVARSET()
SCIP_DECL_NLPIDELVARSET | ( | SCIPdelNlpiVarSet | ) |
delete a set of variables
Definition at line 311 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiDelVarSet(), and Scip::set.
◆ SCIP_DECL_NLPIDELCONSSET()
SCIP_DECL_NLPIDELCONSSET | ( | SCIPdelNlpiConsSet | ) |
delete a set of constraints
Definition at line 321 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiDelConsSet(), and Scip::set.
◆ SCIP_DECL_NLPICHGLINEARCOEFS()
SCIP_DECL_NLPICHGLINEARCOEFS | ( | SCIPchgNlpiLinearCoefs | ) |
changes or adds linear coefficients in a constraint or objective
Definition at line 331 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiChgLinearCoefs(), and Scip::set.
◆ SCIP_DECL_NLPICHGEXPR()
SCIP_DECL_NLPICHGEXPR | ( | SCIPchgNlpiExpr | ) |
change the expression in the nonlinear part
Definition at line 341 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiChgExpr(), and Scip::set.
◆ SCIP_DECL_NLPICHGOBJCONSTANT()
SCIP_DECL_NLPICHGOBJCONSTANT | ( | SCIPchgNlpiObjConstant | ) |
change the constant offset in the objective
Definition at line 351 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiChgObjConstant(), and Scip::set.
◆ SCIP_DECL_NLPISETINITIALGUESS()
SCIP_DECL_NLPISETINITIALGUESS | ( | SCIPsetNlpiInitialGuess | ) |
sets initial guess
Definition at line 361 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiSetInitialGuess(), and Scip::set.
◆ SCIP_DECL_NLPISOLVE()
SCIP_DECL_NLPISOLVE | ( | SCIPsolveNlpiParam | ) |
try to solve NLP with all parameters given as SCIP_NLPPARAM struct
Typical use is
SCIP_NLPPARAM nlparam = { SCIP_NLPPARAM_DEFAULT(scip); } nlpparam.iterlimit = 42; SCIP_CALL( SCIPsolveNlpiParam(scip, nlpi, nlpiproblem, nlpparam) );
or, in "one" line:
SCIP_CALL( SCIPsolveNlpiParam(scip, nlpi, nlpiproblem, (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT(scip), .iterlimit = 42 }) );
To get the latter, also SCIPsolveNlpi can be used.
try to solve NLP with all parameters given as SCIP_NLPPARAM struct
Typical use is
SCIP_NLPPARAM nlparam = { SCIP_NLPPARAM_DEFAULT(scip); } nlpparam.iterlim = 42; SCIP_CALL( SCIPsolveNlpiParam(scip, nlpi, nlpiproblem, nlpparam) );
or, in "one" line:
SCIP_CALL( SCIPsolveNlpiParam(scip, nlpi, nlpiproblem, (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT(scip), .iterlimit = 42 }) );
To get the latter, also SCIPsolveNlpi can be used.
Definition at line 385 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiSolve(), Scip::set, and Scip::stat.
◆ SCIP_DECL_NLPIGETSOLSTAT()
SCIP_DECL_NLPIGETSOLSTAT | ( | SCIPgetNlpiSolstat | ) |
gives solution status
Definition at line 400 of file scip_nlpi.c.
References NULL, SCIPnlpiGetSolstat(), and Scip::set.
◆ SCIP_DECL_NLPIGETTERMSTAT()
SCIP_DECL_NLPIGETTERMSTAT | ( | SCIPgetNlpiTermstat | ) |
gives termination reason
Definition at line 408 of file scip_nlpi.c.
References NULL, SCIPnlpiGetTermstat(), and Scip::set.
◆ SCIP_DECL_NLPIGETSOLUTION()
SCIP_DECL_NLPIGETSOLUTION | ( | SCIPgetNlpiSolution | ) |
gives primal and dual solution for a ranged constraint, the dual variable is positive if the right hand side is active and negative if the left hand side is active
Definition at line 418 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetSolution(), and Scip::set.
◆ SCIP_DECL_NLPIGETSTATISTICS()
SCIP_DECL_NLPIGETSTATISTICS | ( | SCIPgetNlpiStatistics | ) |
gives solve statistics
Definition at line 428 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpiGetStatistics(), and Scip::set.
◆ SCIPcreateNlpiProblemFromNlRows()
SCIP_RETCODE SCIPcreateNlpiProblemFromNlRows | ( | SCIP * | scip, |
SCIP_NLPI * | nlpi, | ||
SCIP_NLPIPROBLEM ** | nlpiprob, | ||
const char * | name, | ||
SCIP_NLROW ** | nlrows, | ||
int | nnlrows, | ||
SCIP_HASHMAP * | var2idx, | ||
SCIP_HASHMAP * | nlrow2idx, | ||
SCIP_Real * | nlscore, | ||
SCIP_Real | cutoffbound, | ||
SCIP_Bool | setobj, | ||
SCIP_Bool | onlyconvex | ||
) |
creates a NLPI problem from given nonlinear rows
The function computes for each variable the number of non-linear occurrences and stores it in the nlscore array.
- Note
- the first row corresponds always to the cutoff row (even if cutoffbound is SCIPinfinity(scip))
- Parameters
-
scip SCIP data structure nlpi interface to NLP solver nlpiprob buffer to store pointer to created nlpi problem name name to give to problem nlrows nonlinear rows nnlrows number of nonlinear rows var2idx empty hash map to store mapping between variables and indices in nlpiprob nlrow2idx empty hash map to store mapping between variables and indices in nlpiprob, can be NULL nlscore array to store the score of each nonlinear variable (NULL if not needed) cutoffbound cutoff bound setobj whether the objective function should be set to one of the SCIP problem onlyconvex filter only for convex constraints
Definition at line 443 of file scip_nlpi.c.
References BMSclearMemoryArray, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRITER_DFS, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateExpriter(), SCIPdebugMsg, SCIPduplicateExpr(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPfreeBufferArray, SCIPfreeExpriter(), SCIPgetIndexExprVaridx(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPhashmapInsertInt(), SCIPinfinity(), SCIPisExprVaridx(), SCIPisInfinity(), SCIPisZero(), SCIPnlpiCreateProblem(), SCIPnlrowGetConstant(), SCIPnlrowGetCurvature(), SCIPnlrowGetExpr(), SCIPnlrowGetLhs(), SCIPnlrowGetLinearCoefs(), SCIPnlrowGetLinearVars(), SCIPnlrowGetName(), SCIPnlrowGetNLinearVars(), SCIPnlrowGetRhs(), SCIPreleaseExpr(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetUbLocal(), Scip::set, and TRUE.
Referenced by applyNlobbt(), computeInteriorPoint(), createAuxiliaryNonlinearSubproblem(), createNLP(), SCIP_DECL_RELAXEXEC(), and SCIP_DECL_SEPAEXECLP().
◆ SCIPupdateNlpiProblem()
SCIP_RETCODE SCIPupdateNlpiProblem | ( | SCIP * | scip, |
SCIP_NLPI * | nlpi, | ||
SCIP_NLPIPROBLEM * | nlpiprob, | ||
SCIP_HASHMAP * | var2nlpiidx, | ||
SCIP_VAR ** | nlpivars, | ||
int | nlpinvars, | ||
SCIP_Real | cutoffbound | ||
) |
updates variable bounds and the cutoff row in a NLPI problem
The NLPI problem must have been setup by SCIPcreateNlpiProblemFromNlRows().
- Parameters
-
scip SCIP data structure nlpi interface to NLP solver nlpiprob nlpi problem representing the convex NLP relaxation var2nlpiidx mapping between variables and nlpi indices nlpivars array containing all variables of the nlpi nlpinvars total number of nlpi variables cutoffbound new cutoff bound
Definition at line 729 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPinfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by applyNlobbt(), SCIP_DECL_SEPAEXECLP(), and updateAuxiliaryNonlinearSubproblem().
◆ SCIPaddNlpiProblemRows()
SCIP_RETCODE SCIPaddNlpiProblemRows | ( | SCIP * | scip, |
SCIP_NLPI * | nlpi, | ||
SCIP_NLPIPROBLEM * | nlpiprob, | ||
SCIP_HASHMAP * | var2idx, | ||
SCIP_ROW ** | rows, | ||
int | nrows | ||
) |
adds SCIP_ROWs to a NLPI problem
- Parameters
-
scip SCIP data structure nlpi interface to NLP solver nlpiprob nlpi problem var2idx empty hash map to store mapping between variables and indices in nlpiprob rows rows to add nrows number of rows to add
Definition at line 781 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcolGetVar(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetNVars(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwGetRhs(), and SCIProwGetVals().
Referenced by applyNlobbt(), computeInteriorPoint(), SCIP_DECL_RELAXEXEC(), and SCIP_DECL_SEPAEXECLP().
◆ SCIPaddNlpiProblemNlRows()
SCIP_RETCODE SCIPaddNlpiProblemNlRows | ( | SCIP * | scip, |
SCIP_NLPI * | nlpi, | ||
SCIP_NLPIPROBLEM * | nlpiprob, | ||
SCIP_HASHMAP * | var2idx, | ||
SCIP_NLROW ** | nlrows, | ||
int | nnlrows | ||
) |
adds SCIP_NLROWs to a NLPI problem
- Parameters
-
scip SCIP data structure nlpi interface to NLP solver nlpiprob nlpi problem var2idx empty hash map to store mapping between variables and indices in nlpiprob nlrows rows to add nnlrows number of rows to add
Definition at line 864 of file scip_nlpi.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPduplicateExpr(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPinfinity(), SCIPisInfinity(), SCIPnlrowGetConstant(), SCIPnlrowGetExpr(), SCIPnlrowGetLhs(), SCIPnlrowGetLinearCoefs(), SCIPnlrowGetLinearVars(), SCIPnlrowGetName(), SCIPnlrowGetNLinearVars(), SCIPnlrowGetRhs(), and SCIPreleaseExpr().
Referenced by addRegularScholtes().