Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for the management of NLP solver interfaces

Macros

#define SCIPsolveNlpi(scip, nlpi, ...)
 

Functions

 SCIP_DECL_SORTPTRCOMP (SCIPnlpiComp)
 
SCIP_NLPIDATASCIPnlpiGetData (SCIP_NLPI *nlpi)
 
const char * SCIPnlpiGetName (SCIP_NLPI *nlpi)
 
const char * SCIPnlpiGetDesc (SCIP_NLPI *nlpi)
 
int SCIPnlpiGetPriority (SCIP_NLPI *nlpi)
 
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)
 
SCIP_NLPISCIPfindNlpi (SCIP *scip, const char *name)
 
SCIP_NLPI ** SCIPgetNlpis (SCIP *scip)
 
int SCIPgetNNlpis (SCIP *scip)
 
SCIP_RETCODE SCIPsetNlpiPriority (SCIP *scip, SCIP_NLPI *nlpi, int priority)
 
 SCIP_DECL_NLPIGETSOLVERPOINTER (SCIPgetNlpiSolverPointer)
 
 SCIP_DECL_NLPICREATEPROBLEM (SCIPcreateNlpiProblem)
 
 SCIP_DECL_NLPIFREEPROBLEM (SCIPfreeNlpiProblem)
 
 SCIP_DECL_NLPIGETPROBLEMPOINTER (SCIPgetNlpiProblemPointer)
 
 SCIP_DECL_NLPIADDVARS (SCIPaddNlpiVars)
 
 SCIP_DECL_NLPIADDCONSTRAINTS (SCIPaddNlpiConstraints)
 
 SCIP_DECL_NLPISETOBJECTIVE (SCIPsetNlpiObjective)
 
 SCIP_DECL_NLPICHGVARBOUNDS (SCIPchgNlpiVarBounds)
 
 SCIP_DECL_NLPICHGCONSSIDES (SCIPchgNlpiConsSides)
 
 SCIP_DECL_NLPIDELVARSET (SCIPdelNlpiVarSet)
 
 SCIP_DECL_NLPIDELCONSSET (SCIPdelNlpiConsSet)
 
 SCIP_DECL_NLPICHGLINEARCOEFS (SCIPchgNlpiLinearCoefs)
 
 SCIP_DECL_NLPICHGEXPR (SCIPchgNlpiExpr)
 
 SCIP_DECL_NLPICHGOBJCONSTANT (SCIPchgNlpiObjConstant)
 
 SCIP_DECL_NLPISETINITIALGUESS (SCIPsetNlpiInitialGuess)
 
 SCIP_DECL_NLPISOLVE (SCIPsolveNlpiParam)
 
 SCIP_DECL_NLPIGETSOLSTAT (SCIPgetNlpiSolstat)
 
 SCIP_DECL_NLPIGETTERMSTAT (SCIPgetNlpiTermstat)
 
 SCIP_DECL_NLPIGETSOLUTION (SCIPgetNlpiSolution)
 
 SCIP_DECL_NLPIGETSTATISTICS (SCIPgetNlpiStatistics)
 

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,
  ... 
)
Value:
SCIPsolveNlpiParam(scip, nlpi, SCIP_VARARGS_FIRST((__VA_ARGS__, ignored)), \
(SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT_INITS(scip), SCIP_VARARGS_REST(__VA_ARGS__, .caller = __FILE__) })
#define SCIP_VARARGS_FIRST(args)
Definition: def.h:83
#define SCIP_VARARGS_REST(firstarg,...)
Definition: def.h:86
#define SCIP_NLPPARAM_DEFAULT_INITS(scip)
Definition: type_nlpi.h:102

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  )

compares two NLPIs w.r.t. their priority

Definition at line 47 of file nlpi.c.

◆ SCIPnlpiGetData()

◆ SCIPnlpiGetName()

const char* SCIPnlpiGetName ( SCIP_NLPI nlpi)

gets NLP solver name

Parameters
nlpiNLP 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
nlpiNLP 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
nlpiNLP 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
nlpiNLP interface structure

Definition at line 756 of file nlpi.c.

References SCIP_Nlpi::nproblems, and NULL.

Referenced by SCIPprintNLPIStatistics().

◆ SCIPnlpiGetProblemTime()

SCIP_Real SCIPnlpiGetProblemTime ( SCIP_NLPI nlpi)

gives total time spend in problem creation/modification/freeing

Parameters
nlpiNLP 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
nlpiNLP interface structure

Definition at line 774 of file nlpi.c.

References SCIP_Nlpi::nsolves, and NULL.

Referenced by SCIPprintNLPIStatistics().

◆ SCIPnlpiGetSolveTime()

SCIP_Real SCIPnlpiGetSolveTime ( SCIP_NLPI nlpi)

gives total time spend in NLP solves (as reported by solver)

Parameters
nlpiNLP interface structure

Definition at line 783 of file nlpi.c.

References NULL, and SCIP_Nlpi::solvetime.

Referenced by SCIPprintNLPIStatistics().

◆ SCIPnlpiGetEvalTime()

SCIP_Real SCIPnlpiGetEvalTime ( SCIP_NLPI nlpi)

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
nlpiNLP 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
nlpiNLP 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
nlpiNLP interface structure
termstatusthe 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
nlpiNLP interface structure
solstatusthe solution status to query for

Definition at line 823 of file nlpi.c.

References SCIP_Nlpi::nsolstat, and NULL.

Referenced by SCIPprintNLPIStatistics().

◆ SCIPnlpiMergeStatistics()

void SCIPnlpiMergeStatistics ( SCIP_NLPI targetnlpi,
SCIP_NLPI sourcenlpi,
SCIP_Bool  reset 
)

adds statistics from one NLPI to another

Parameters
targetnlpiNLP interface where to add statistics
sourcenlpiNLP interface from which to add statistics
resetwhether 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
scipSCIP data structure
namename of NLP interface
descriptiondescription of NLP interface
prioritypriority of NLP interface
nlpidataNLP 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()

SCIP_NLPI* SCIPfindNlpi ( SCIP scip,
const char *  name 
)

returns the NLPI of the given name, or NULL if not existing

Parameters
scipSCIP data structure
namename of NLPI

Definition at line 173 of file scip_nlpi.c.

References NULL, SCIPsetFindNlpi(), and Scip::set.

Referenced by SCIPincludeNlpi().

◆ SCIPgetNlpis()

SCIP_NLPI** SCIPgetNlpis ( SCIP scip)

◆ SCIPgetNNlpis()

◆ SCIPsetNlpiPriority()

SCIP_RETCODE SCIPsetNlpiPriority ( SCIP scip,
SCIP_NLPI nlpi,
int  priority 
)

sets the priority of an NLPI

Parameters
scipSCIP data structure
nlpiNLPI
prioritynew 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
scipSCIP data structure
nlpiinterface to NLP solver
nlpiprobbuffer to store pointer to created nlpi problem
namename to give to problem
nlrowsnonlinear rows
nnlrowsnumber of nonlinear rows
var2idxempty hash map to store mapping between variables and indices in nlpiprob
nlrow2idxempty hash map to store mapping between variables and indices in nlpiprob, can be NULL
nlscorearray to store the score of each nonlinear variable (NULL if not needed)
cutoffboundcutoff bound
setobjwhether the objective function should be set to one of the SCIP problem
onlyconvexfilter 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
scipSCIP data structure
nlpiinterface to NLP solver
nlpiprobnlpi problem representing the convex NLP relaxation
var2nlpiidxmapping between variables and nlpi indices
nlpivarsarray containing all variables of the nlpi
nlpinvarstotal number of nlpi variables
cutoffboundnew 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
scipSCIP data structure
nlpiinterface to NLP solver
nlpiprobnlpi problem
var2idxempty hash map to store mapping between variables and indices in nlpiprob
rowsrows to add
nrowsnumber 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
scipSCIP data structure
nlpiinterface to NLP solver
nlpiprobnlpi problem
var2idxempty hash map to store mapping between variables and indices in nlpiprob
nlrowsrows to add
nnlrowsnumber 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().