internal methods for NLP management
Definition in file nlp.h.
#include <stdio.h>#include "scip/def.h"#include "blockmemshell/memory.h"#include "scip/type_event.h"#include "scip/type_set.h"#include "scip/type_stat.h"#include "scip/type_misc.h"#include "scip/type_lp.h"#include "scip/type_var.h"#include "scip/type_prob.h"#include "scip/type_sol.h"#include "scip/type_primal.h"#include "scip/pub_nlp.h"Go to the source code of this file.
| SCIP_RETCODE SCIPnlpInclude | ( | SCIP_SET * | set, |
| BMS_BLKMEM * | blkmem ) |
includes event handler that is used by NLP
| set | global SCIP settings |
| blkmem | block memory |
Definition at line 3511 of file nlp.c.
References assert(), EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_INIT, SCIPerrorMessage, SCIPeventhdlrCreate(), SCIPnlpInclude(), SCIPsetFindEventhdlr(), and SCIPsetIncludeEventhdlr().
Referenced by doScipCreate(), and SCIPnlpInclude().
| SCIP_RETCODE SCIPnlpCreate | ( | SCIP_NLP ** | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| const char * | name, | ||
| int | nvars_estimate ) |
construct a new empty NLP
| nlp | NLP handler, call by reference |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics |
| name | problem name |
| nvars_estimate | an estimate on the number of variables that may be added to the NLP later |
Definition at line 3537 of file nlp.c.
References assert(), BMSallocMemory, BMSduplicateBlockMemoryArray, EVENTHDLR_NAME, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_EVENTTYPE_VARDELETED, SCIP_INVALID, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPerrorMessage, SCIPeventfilterAdd(), SCIPhashmapCreate(), SCIPnlpCreate(), SCIPnlpiCreateProblem(), SCIPsetFindEventhdlr(), SCIPsetFindNlpi(), SCIPsetSortNlpis(), and TRUE.
Referenced by initSolve(), and SCIPnlpCreate().
| SCIP_RETCODE SCIPnlpFree | ( | SCIP_NLP ** | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_EVENTQUEUE * | eventqueue, | ||
| SCIP_LP * | lp ) |
frees NLP data object
| nlp | pointer to NLP data object |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics |
| eventqueue | event queue |
| lp | SCIP LP, needed for releasing variables |
Definition at line 3661 of file nlp.c.
References assert(), BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, BMSfreeMemory, NULL, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_EVENTTYPE_VARDELETED, SCIP_OKAY, SCIPeventfilterDel(), SCIPhashmapFree(), SCIPnlpFree(), SCIPnlpiFreeProblem(), and SCIPnlpReset().
Referenced by freeReoptSolve(), freeSolve(), and SCIPnlpFree().
| SCIP_RETCODE SCIPnlpReset | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_EVENTQUEUE * | eventqueue, | ||
| SCIP_LP * | lp ) |
resets the NLP to the empty NLP by removing all variables and rows from NLP, releasing all rows, and flushing the changes to the NLP solver
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics data |
| eventqueue | event queue |
| lp | SCIP LP, needed for releasing variables |
Definition at line 3721 of file nlp.c.
References assert(), BMSfreeBlockMemoryArrayNull, FALSE, SCIP_Nlp::haveinitguess, i, SCIP_Nlp::indiving, SCIP_Nlp::initialguess, nlpDelNlRowPos(), nlpDelVarPos(), SCIP_Nlp::nnlrows, NULL, SCIP_Nlp::nvars, SCIP_CALL, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIPnlpEndDive(), SCIPnlpFlush(), SCIPnlpReset(), SCIP_Nlp::sizevars, SCIP_Nlp::solstat, and SCIP_Nlp::termstat.
Referenced by SCIPnlpFree(), and SCIPnlpReset().
currently a dummy function that always returns TRUE
| nlp | NLP data |
Definition at line 3763 of file nlp.c.
References assert(), NULL, SCIP_Bool, SCIPnlpHasCurrentNodeNLP(), and TRUE.
Referenced by SCIPgetNlRowActivity(), SCIPgetNlRowFeasibility(), SCIPgetNlRowSolActivity(), SCIPgetNlRowSolFeasibility(), SCIPnlpHasCurrentNodeNLP(), and SCIPrecalcNlRowActivity().
| SCIP_RETCODE SCIPnlpEnsureVarsSize | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| int | num ) |
ensures, that variables array of NLP can store at least num entries
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| num | minimum number of entries to store |
Definition at line 3772 of file nlp.c.
References assert(), BMSreallocBlockMemoryArray, SCIP_Nlp::initialguess, NULL, SCIP_Nlp::nvars, SCIP_ALLOC, SCIP_OKAY, SCIPnlpEnsureVarsSize(), SCIPsetCalcMemGrowSize(), SCIP_Nlp::sizevars, SCIP_Nlp::varlbdualvals, SCIP_Nlp::varmap_nlp2nlpi, SCIP_Nlp::vars, and SCIP_Nlp::varubdualvals.
Referenced by nlpAddVars(), and SCIPnlpEnsureVarsSize().
| SCIP_RETCODE SCIPnlpAddVar | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_VAR * | var ) |
adds a variable to the NLP and captures the variable
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| var | variable |
Definition at line 3806 of file nlp.c.
References assert(), SCIP_Nlp::indiving, nlpAddVars(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPhashmapExists(), SCIPnlpAddVar(), SCIPvarIsTransformed(), var, and SCIP_Nlp::varhash.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIPnlpAddVar().
| SCIP_RETCODE SCIPnlpAddVars | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| int | nvars, | ||
| SCIP_VAR ** | vars ) |
adds a set of variables to the NLP and captures the variables
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| nvars | number of variables to add |
| vars | variables to add |
Definition at line 3832 of file nlp.c.
References assert(), SCIP_Nlp::indiving, nlpAddVars(), NULL, nvars, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPnlpAddVars(), and vars.
Referenced by initSolve(), and SCIPnlpAddVars().
| SCIP_RETCODE SCIPnlpDelVar | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_EVENTQUEUE * | eventqueue, | ||
| SCIP_LP * | lp, | ||
| SCIP_VAR * | var ) |
deletes a variable from the NLP and releases the variable
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics data |
| eventqueue | event queue |
| lp | SCIP LP, needed to release variable |
| var | variable |
Definition at line 3857 of file nlp.c.
References assert(), SCIP_Nlp::indiving, nlpDelVarPos(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpDelVar(), SCIPvarGetName(), var, and SCIP_Nlp::varhash.
Referenced by nlpRemoveFixedVar(), SCIP_DECL_EVENTEXEC(), and SCIPnlpDelVar().
| SCIP_RETCODE SCIPnlpEnsureNlRowsSize | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| int | num ) |
ensures, that nonlinear rows array of NLP can store at least num entries
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| num | minimum number of entries to store |
Definition at line 3894 of file nlp.c.
References assert(), BMSreallocBlockMemoryArray, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPnlpEnsureNlRowsSize(), SCIPsetCalcMemGrowSize(), and SCIP_Nlp::sizenlrows.
Referenced by nlpAddNlRows(), and SCIPnlpEnsureNlRowsSize().
| SCIP_RETCODE SCIPnlpAddNlRow | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_NLROW * | nlrow ) |
adds a nonlinear row to the NLP and captures it
all variables of the row need to be present in the NLP
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics data |
| nlrow | nonlinear row |
Definition at line 3924 of file nlp.c.
References assert(), SCIP_Nlp::indiving, nlpAddNlRows(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, and SCIPnlpAddNlRow().
Referenced by SCIPaddNlRow(), and SCIPnlpAddNlRow().
| SCIP_RETCODE SCIPnlpAddNlRows | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| int | nnlrows, | ||
| SCIP_NLROW ** | nlrows ) |
adds nonlinear rows to the NLP and captures them
all variables of the row need to be present in the NLP
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics data |
| nnlrows | number of rows to add |
| nlrows | rows to add |
Definition at line 3950 of file nlp.c.
References assert(), SCIP_Nlp::indiving, nlpAddNlRows(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, and SCIPnlpAddNlRows().
Referenced by SCIPnlpAddNlRows().
| SCIP_RETCODE SCIPnlpDelNlRow | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_NLROW * | nlrow ) |
deletes a nonlinear row from the NLP
does nothing if nonlinear row is not in NLP
| nlp | NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics data |
| nlrow | nonlinear row |
Definition at line 3980 of file nlp.c.
References assert(), SCIP_Nlp::indiving, nlpDelNlRowPos(), SCIP_NlRow::nlpindex, SCIP_Nlp::nnlrows, NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, and SCIPnlpDelNlRow().
Referenced by SCIPdelNlRow(), and SCIPnlpDelNlRow().
| SCIP_RETCODE SCIPnlpFlush | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat ) |
applies all cached changes to the NLP solver
| nlp | current NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics |
Definition at line 4012 of file nlp.c.
References assert(), SCIP_Nlp::indiving, nlpFlushNlRowAdditions(), nlpFlushNlRowDeletions(), nlpFlushObjective(), nlpFlushVarAdditions(), nlpFlushVarDeletions(), SCIP_Nlp::nnlrows, SCIP_Nlp::nnlrows_solver, NULL, SCIP_Nlp::nunflushednlrowadd, SCIP_Nlp::nunflushednlrowdel, SCIP_Nlp::nunflushedvaradd, SCIP_Nlp::nunflushedvardel, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::objflushed, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPnlpFlush(), and TRUE.
Referenced by SCIPflushNLP(), SCIPnlpFlush(), SCIPnlpReset(), SCIPnlpSolve(), and SCIPnlpStartDive().
| SCIP_RETCODE SCIPnlpSolve | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_MESSAGEHDLR * | messagehdlr, | ||
| SCIP_STAT * | stat, | ||
| SCIP_PRIMAL * | primal, | ||
| SCIP_TREE * | tree, | ||
| SCIP_NLPPARAM * | nlpparam ) |
solves the NLP or diving NLP
| nlp | NLP data |
| blkmem | block memory buffers |
| set | global SCIP settings |
| messagehdlr | message handler |
| stat | problem statistics |
| primal | primal data |
| tree | branch and bound tree |
| nlpparam | NLP solve parameters |
Definition at line 4050 of file nlp.c.
References assert(), SCIP_Nlp::indiving, nlpSolve(), NULL, SCIP_CALL, SCIP_OKAY, SCIPnlpFlush(), and SCIPnlpSolve().
Referenced by SCIPnlpSolve(), and SCIPsolveNLPParam().
gets objective value of current NLP
| nlp | current NLP data |
Definition at line 4077 of file nlp.c.
References assert(), NULL, SCIP_Nlp::primalsolobjval, SCIP_Real, and SCIPnlpGetObjval().
Referenced by SCIPgetNLPObjval(), SCIPnlpGetObjval(), and SCIPsolLinkNLPSol().
| SCIP_RETCODE SCIPnlpGetPseudoObjval | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_PROB * | prob, | ||
| SCIP_PRIMAL * | primal, | ||
| SCIP_TREE * | tree, | ||
| SCIP_LP * | lp, | ||
| SCIP_Real * | pseudoobjval ) |
gives current pseudo objective value
| nlp | current NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics data |
| prob | SCIP problem |
| primal | primal data |
| tree | branch and bound tree |
| lp | SCIP LP |
| pseudoobjval | buffer to store pseudo objective value |
Definition at line 4087 of file nlp.c.
References assert(), SCIP_Nlp::divingobj, i, SCIP_Nlp::indiving, NULL, SCIP_Nlp::nvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpGetPseudoObjval(), SCIPnlrowGetPseudoActivity(), SCIPvarGetBestBoundLocal(), SCIPvarGetObj(), and SCIP_Nlp::vars.
Referenced by SCIPnlpGetPseudoObjval().
| SCIP_RETCODE SCIPnlpGetFracVars | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_VAR *** | fracvars, | ||
| SCIP_Real ** | fracvarssol, | ||
| SCIP_Real ** | fracvarsfrac, | ||
| int * | nfracvars, | ||
| int * | npriofracvars ) |
gets fractional variables of last NLP solution along with solution values and fractionalities
| nlp | NLP data structure |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics |
| fracvars | pointer to store the array of NLP fractional variables, or NULL |
| fracvarssol | pointer to store the array of NLP fractional variables solution values, or NULL |
| fracvarsfrac | pointer to store the array of NLP fractional variables fractionalities, or NULL |
| nfracvars | pointer to store the number of NLP fractional variables , or NULL |
| npriofracvars | pointer to store the number of NLP fractional variables with maximal branching priority, or NULL |
Definition at line 4121 of file nlp.c.
References assert(), SCIP_Nlp::fracvars, SCIP_Nlp::fracvarsfrac, SCIP_Nlp::fracvarssol, SCIP_Nlp::nfracvars, nlpCalcFracVars(), SCIP_Nlp::npriofracvars, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPnlpGetFracVars().
Referenced by SCIPgetNLPFracVars(), and SCIPnlpGetFracVars().
| SCIP_RETCODE SCIPnlpRemoveRedundantNlRows | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat ) |
removes all redundant nonlinear rows
| nlp | current NLP data |
| blkmem | block memory buffers |
| set | global SCIP settings |
| stat | problem statistics |
Definition at line 4155 of file nlp.c.
References assert(), i, SCIP_Nlp::indiving, nlpDelNlRowPos(), SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPnlpRemoveRedundantNlRows(), SCIPnlrowIsRedundant(), and SCIP_Nlp::solstat.
Referenced by SCIPnlpRemoveRedundantNlRows().
| SCIP_RETCODE SCIPnlpSetInitialGuess | ( | SCIP_SET * | set, |
| SCIP_NLP * | nlp, | ||
| BMS_BLKMEM * | blkmem, | ||
| SCIP_Real * | initguess ) |
set initial guess (approximate primal solution) for next solve
array initguess must be NULL or have length at least SCIPnlpGetNVars()
| set | global SCIP settings |
| nlp | current NLP data |
| blkmem | block memory buffers |
| initguess | new initial guess, or NULL to clear previous one |
Definition at line 4201 of file nlp.c.
References assert(), BMSallocBlockMemoryArray, BMScopyMemoryArray, FALSE, SCIP_Nlp::haveinitguess, SCIP_Nlp::initialguess, NULL, SCIP_Nlp::nvars, SCIP_Nlp::problem, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPnlpiSetInitialGuess(), SCIPnlpSetInitialGuess(), SCIP_Nlp::sizevars, SCIP_Nlp::solver, and TRUE.
Referenced by SCIPnlpSetInitialGuess(), SCIPsetNLPInitialGuess(), and SCIPsetNLPInitialGuessSol().
| SCIP_RETCODE SCIPnlpWrite | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_MESSAGEHDLR * | messagehdlr, | ||
| const char * | fname ) |
writes NLP to a file
| nlp | current NLP data |
| blkmem | block memory buffers |
| set | global SCIP settings |
| stat | problem statistics |
| messagehdlr | message handler |
| fname | file name |
Definition at line 4237 of file nlp.c.
References assert(), i, SCIP_Nlp::name, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, SCIP_Nlp::nvars, SCIP_CALL, SCIP_CALL_TERMINATE, SCIP_FILECREATEERROR, SCIP_OKAY, SCIPerrorMessage, SCIPmessageFPrintInfo(), SCIPnlpWrite(), SCIPnlrowPrint(), SCIPvarPrint(), and SCIP_Nlp::vars.
Referenced by SCIPnlpWrite(), and SCIPwriteNLP().
| SCIP_RETCODE SCIPnlpStartDive | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat ) |
signals start of diving
| nlp | current NLP data |
| blkmem | block memory buffers |
| set | global SCIP settings |
| stat | problem statistics |
Definition at line 4558 of file nlp.c.
References assert(), SCIP_Nlp::indiving, NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIPnlpFlush(), SCIPnlpStartDive(), SCIP_Nlp::solver, and TRUE.
Referenced by SCIPnlpStartDive(), and SCIPstartDiveNLP().
| SCIP_RETCODE SCIPnlpEndDive | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat ) |
resets the bound and objective changes made during diving and disables diving mode
| nlp | current NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics data |
Definition at line 4589 of file nlp.c.
References assert(), SCIP_Nlp::divingobj, FALSE, i, SCIP_Nlp::indiving, NULL, SCIP_Nlp::nvars, SCIP_Nlp::nvars_solver, SCIP_Nlp::objflushed, SCIP_Nlp::primalsolobjval, SCIP_Nlp::problem, SCIP_CALL, SCIP_ERROR, SCIP_INVALID, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_NLPTERMSTAT_OTHER, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIPnlpEndDive(), SCIPnlpiChgVarBounds(), SCIPnlrowRelease(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIP_Nlp::solstat, SCIP_Nlp::solver, SCIP_Nlp::termstat, varidx, SCIP_Nlp::varmap_nlpi2nlp, and SCIP_Nlp::vars.
Referenced by SCIPendDiveNLP(), SCIPnlpEndDive(), and SCIPnlpReset().
| SCIP_RETCODE SCIPnlpChgVarObjDive | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_VAR * | var, | ||
| SCIP_Real | coef ) |
changes coefficient of variable in diving NLP
| nlp | current NLP data |
| blkmem | block memory |
| set | global SCIP settings |
| stat | problem statistics data |
| var | variable which coefficient to change |
| coef | new linear coefficient of variable in objective |
Definition at line 4651 of file nlp.c.
References assert(), SCIP_Nlp::divingobj, FALSE, i, SCIP_Nlp::indiving, NULL, SCIP_Nlp::nvars, SCIP_Nlp::objflushed, SCIP_Nlp::problem, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpChgVarObjDive(), SCIPnlpiChgLinearCoefs(), SCIPnlrowChgLinearCoef(), SCIPnlrowCreate(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPvarGetObj(), SCIP_Nlp::solver, var, SCIP_Nlp::varhash, SCIP_Nlp::varmap_nlp2nlpi, and SCIP_Nlp::vars.
Referenced by SCIPchgVarObjDiveNLP(), and SCIPnlpChgVarObjDive().
| SCIP_RETCODE SCIPnlpChgVarBoundsDive | ( | SCIP_SET * | set, |
| SCIP_NLP * | nlp, | ||
| SCIP_VAR * | var, | ||
| SCIP_Real | lb, | ||
| SCIP_Real | ub ) |
changes bounds of variable in diving NLP
| set | global SCIP settings |
| nlp | current NLP data |
| var | variable which coefficient to change |
| lb | new lower bound of variable |
| ub | new upper bound of variable |
Definition at line 4708 of file nlp.c.
References assert(), SCIP_Nlp::indiving, NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpChgVarBoundsDive(), SCIPnlpiChgVarBounds(), SCIP_Nlp::solver, var, SCIP_Nlp::varhash, and SCIP_Nlp::varmap_nlp2nlpi.
Referenced by SCIPchgVarBoundsDiveNLP(), and SCIPnlpChgVarBoundsDive().
| SCIP_RETCODE SCIPnlpChgVarsBoundsDive | ( | SCIP_NLP * | nlp, |
| SCIP_SET * | set, | ||
| int | nvars, | ||
| SCIP_VAR ** | vars, | ||
| SCIP_Real * | lbs, | ||
| SCIP_Real * | ubs ) |
changes bounds of a set of variables in diving NLP
| nlp | current NLP data |
| set | global SCIP settings |
| nvars | number of variables which bounds to change |
| vars | variables which bounds to change |
| lbs | new lower bounds of variables |
| ubs | new upper bounds of variables |
Definition at line 4737 of file nlp.c.
References assert(), i, SCIP_Nlp::indiving, NULL, nvars, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpChgVarsBoundsDive(), SCIPnlpiChgVarBounds(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIP_Nlp::solver, SCIP_Nlp::varhash, SCIP_Nlp::varmap_nlp2nlpi, and vars.
Referenced by SCIPchgVarsBoundsDiveNLP(), and SCIPnlpChgVarsBoundsDive().
returns whether the objective function has been changed during diving
| nlp | current NLP data |
Definition at line 4781 of file nlp.c.
References SCIP_Nlp::divingobj, NULL, SCIP_Bool, and SCIPnlpIsDivingObjChanged().
Referenced by SCIPnlpIsDivingObjChanged(), and SCIPsolLinkNLPSol().
gets array with variables of the NLP
| nlp | current NLP data |
Definition at line 4292 of file nlp.c.
References assert(), NULL, SCIPnlpGetVars(), and SCIP_Nlp::vars.
Referenced by SCIPgetNLPVars(), SCIPgetNLPVarsData(), SCIPnlpGetVars(), SCIPsetNLPInitialGuessSol(), and SCIPsolLinkNLPSol().
| int SCIPnlpGetNVars | ( | SCIP_NLP * | nlp | ) |
gets current number of variables in NLP
| nlp | current NLP data |
Definition at line 4302 of file nlp.c.
References assert(), NULL, SCIP_Nlp::nvars, and SCIPnlpGetNVars().
Referenced by SCIPgetNLPVarsData(), SCIPgetNNLPVars(), SCIPnlpGetNVars(), SCIPsetNLPInitialGuessSol(), and SCIPsolLinkNLPSol().
| SCIP_RETCODE SCIPnlpGetVarsNonlinearity | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| int * | nlcount ) |
computes for each variables the number of NLP rows in which the variable appears in a nonlinear var
| nlp | current NLP data |
| blkmem | block memory buffers |
| set | global SCIP settings |
| stat | problem statistics |
| nlcount | an array of length at least SCIPnlpGetNVars() to store nonlinearity counts of variables |
Definition at line 4312 of file nlp.c.
References assert(), BMSclearMemoryArray, c, SCIP_NlRow::expr, FALSE, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, nvars, SCIP_Nlp::nvars, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_OKAY, SCIPexprIsVar(), SCIPexpriterCreate(), SCIPexpriterFree(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPgetVarExprVar(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPnlpGetVarsNonlinearity(), SCIP_Nlp::varhash, and varidx.
Referenced by SCIPgetNLPVarsNonlinearity(), and SCIPnlpGetVarsNonlinearity().
| SCIP_RETCODE SCIPnlpHasContinuousNonlinearity | ( | SCIP_NLP * | nlp, |
| BMS_BLKMEM * | blkmem, | ||
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_Bool * | result ) |
indicates whether there exists a row that contains a continuous variable in a nonlinear term
| nlp | current NLP data |
| blkmem | block memory buffers |
| set | global SCIP settings |
| stat | problem statistics |
| result | buffer to store whether continuous variable present in an expression of any row |
Definition at line 4366 of file nlp.c.
References assert(), c, SCIP_NlRow::expr, FALSE, SCIP_Nlp::nlrows, SCIP_Nlp::nnlrows, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_OKAY, SCIPexprIsVar(), SCIPexpriterCreate(), SCIPexpriterFree(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPgetVarExprVar(), SCIPnlpHasContinuousNonlinearity(), SCIPvarIsIntegral(), and TRUE.
Referenced by SCIPhasNLPContinuousNonlinearity(), and SCIPnlpHasContinuousNonlinearity().
gives dual solution values associated with lower bounds of NLP variables
| nlp | current NLP data |
Definition at line 4409 of file nlp.c.
References assert(), NULL, SCIP_Real, SCIPnlpGetVarsLbDualsol(), and SCIP_Nlp::varlbdualvals.
Referenced by SCIPgetNLPVarsLbDualsol(), and SCIPnlpGetVarsLbDualsol().
gives dual solution values associated with upper bounds of NLP variables
| nlp | current NLP data |
Definition at line 4419 of file nlp.c.
References assert(), NULL, SCIP_Real, SCIPnlpGetVarsUbDualsol(), and SCIP_Nlp::varubdualvals.
Referenced by SCIPgetNLPVarsUbDualsol(), and SCIPnlpGetVarsUbDualsol().
| SCIP_NLROW ** SCIPnlpGetNlRows | ( | SCIP_NLP * | nlp | ) |
gets array with nonlinear rows of the NLP
| nlp | current NLP data |
Definition at line 4429 of file nlp.c.
References assert(), SCIP_Nlp::nlrows, NULL, and SCIPnlpGetNlRows().
Referenced by SCIPgetNLPNlRows(), SCIPgetNLPNlRowsData(), and SCIPnlpGetNlRows().
| int SCIPnlpGetNNlRows | ( | SCIP_NLP * | nlp | ) |
gets current number of nonlinear rows in NLP
| nlp | current NLP data |
Definition at line 4439 of file nlp.c.
References assert(), SCIP_Nlp::nnlrows, NULL, and SCIPnlpGetNNlRows().
Referenced by SCIPgetNLPNlRowsData(), SCIPgetNNLPNlRows(), and SCIPnlpGetNNlRows().
| void SCIPnlpGetNlRowsStat | ( | SCIP_NLP * | nlp, |
| int * | nlinear, | ||
| int * | nconvexineq, | ||
| int * | nnonconvexineq, | ||
| int * | nnonlineareq ) |
gets statistics on convexity of nonlinear rows in NLP
| nlp | current NLP data |
| nlinear | buffer to store number of linear rows in NLP, or NULL |
| nconvexineq | buffer to store number of convex inequalities in NLP, or NULL |
| nnonconvexineq | buffer to store number of nonconvex inequalities in NLP, or NULL |
| nnonlineareq | buffer to store number of nonlinear equalities or ranged rows in NLP, or NULL |
Definition at line 4449 of file nlp.c.
References assert(), SCIP_Nlp::nnlrowconvexineq, SCIP_Nlp::nnlrowlinear, SCIP_Nlp::nnlrownonconvexineq, SCIP_Nlp::nnlrownonlineareq, NULL, and SCIPnlpGetNlRowsStat().
Referenced by SCIPgetNLPNlRowsStat(), and SCIPnlpGetNlRowsStat().
gets the NLP solver interface
| nlp | current NLP data |
Definition at line 4473 of file nlp.c.
References assert(), NULL, SCIPnlpGetNLPI(), and SCIP_Nlp::solver.
Referenced by SCIPgetNLPI(), and SCIPnlpGetNLPI().
| SCIP_NLPIPROBLEM * SCIPnlpGetNLPIProblem | ( | SCIP_NLP * | nlp | ) |
gets the NLP problem in the solver interface
| nlp | current NLP data |
Definition at line 4483 of file nlp.c.
References assert(), NULL, SCIP_Nlp::problem, and SCIPnlpGetNLPIProblem().
Referenced by SCIPgetNLPI(), and SCIPnlpGetNLPIProblem().
indicates whether NLP is currently in diving mode
| nlp | current NLP data |
Definition at line 4493 of file nlp.c.
References assert(), SCIP_Nlp::indiving, NULL, SCIP_Bool, and SCIPnlpIsDiving().
Referenced by SCIPnlpIsDiving().
| SCIP_NLPSOLSTAT SCIPnlpGetSolstat | ( | SCIP_NLP * | nlp | ) |
gets solution status of current NLP
| nlp | current NLP data |
Definition at line 4503 of file nlp.c.
References assert(), NULL, SCIPnlpGetSolstat(), and SCIP_Nlp::solstat.
Referenced by SCIP_DECL_SEPAEXECLP(), SCIPgetNLPSolstat(), SCIPlinkNLPSol(), and SCIPnlpGetSolstat().
| SCIP_NLPTERMSTAT SCIPnlpGetTermstat | ( | SCIP_NLP * | nlp | ) |
gets termination status of last NLP solve
| nlp | current NLP data |
Definition at line 4513 of file nlp.c.
References assert(), NULL, SCIPnlpGetTermstat(), and SCIP_Nlp::termstat.
Referenced by SCIPgetNLPTermstat(), and SCIPnlpGetTermstat().
| SCIP_RETCODE SCIPnlpGetStatistics | ( | SCIP_SET * | set, |
| SCIP_NLP * | nlp, | ||
| SCIP_NLPSTATISTICS * | statistics ) |
gives statistics (number of iterations, solving time, ...) of last NLP solve
| set | global SCIP settings |
| nlp | pointer to NLP datastructure |
| statistics | pointer to store statistics |
Definition at line 4523 of file nlp.c.
References assert(), NULL, SCIP_Nlp::problem, SCIP_CALL, SCIP_OKAY, SCIPnlpGetStatistics(), SCIPnlpiGetStatistics(), and SCIP_Nlp::solver.
Referenced by SCIPgetNLPStatistics(), and SCIPnlpGetStatistics().
indicates whether a solution for the current NLP is available
The solution may be optimal, feasible, or infeasible. Thus, returns whether the NLP solution status is at most SCIP_NLPSOLSTAT_LOCINFEASIBLE.
| nlp | current NLP data |
Definition at line 4544 of file nlp.c.
References assert(), NULL, SCIP_Bool, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIPnlpHasSolution(), and SCIP_Nlp::solstat.
Referenced by nlpCalcFracVars(), SCIPcreateNLPSol(), SCIPgetNlRowActivity(), SCIPgetNlRowFeasibility(), SCIPgetNlRowSolActivity(), SCIPgetNlRowSolFeasibility(), SCIPhasNLPSolution(), SCIPnlpHasSolution(), SCIPrecalcNlRowActivity(), and SCIPsolLinkNLPSol().