nlpi_all.c
Go to the documentation of this file.
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
41 #define NLPI_DESC "NLP interface that uses all available NLP interfaces" /**< description of solver */
167 SCIP_CALL( SCIPaddNlpiVars(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], nvars, lbs, ubs, varnames) );
189 SCIP_CALL( SCIPaddNlpiConstraints(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], nconss, lhss, rhss,
211 SCIP_CALL( SCIPsetNlpiObjective(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], nlins, lininds, linvals, expr, constant) );
232 SCIP_CALL( SCIPchgNlpiVarBounds(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], nvars, indices, lbs, ubs) );
253 SCIP_CALL( SCIPchgNlpiConsSides(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], nconss, indices, lhss, rhss) );
282 SCIP_CALL( SCIPdelNlpiVarSet(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], tmpdstats, dstatssize) );
286 /* NOTE this works only when all dstats array are the same after calling the nlpidelvarset callback
287 * As long as all solvers use the SCIP NLPI oracle to store the NLP problem data, this is the case.
290 SCIP_CALL( SCIPdelNlpiVarSet(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], dstats, dstatssize) );
322 SCIP_CALL( SCIPdelNlpiConsSet(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], tmpdstats, dstatssize) );
326 /* NOTE this works only when all dstats array are the same after calling the nlpidelconsset callback
327 * As long as all solvers use the SCIP NLPI oracle to store the NLP problem data, this is the case.
330 SCIP_CALL( SCIPdelNlpiConsSet(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], dstats, dstatssize) );
354 SCIP_CALL( SCIPchgNlpiLinearCoefs(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], idx, nvals, varidxs, vals) );
375 SCIP_CALL( SCIPchgNlpiExpr(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], idxcons, expr) );
396 SCIP_CALL( SCIPchgNlpiObjConstant(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], objconstant) );
417 SCIP_CALL( SCIPsetNlpiInitialGuess(scip, nlpidata->nlpis[i], problem->nlpiproblems[i], primalvalues, consdualvalues,
476 else if( bestsolstat >= SCIP_NLPSOLSTAT_LOCINFEASIBLE && solstat <= SCIP_NLPSOLSTAT_LOCINFEASIBLE )
530 return SCIPgetNlpiSolstat(scip, nlpidata->nlpis[problem->bestidx], problem->nlpiproblems[problem->bestidx]);
547 return SCIPgetNlpiTermstat(scip, nlpidata->nlpis[problem->bestidx], problem->nlpiproblems[problem->bestidx]);
564 SCIP_CALL( SCIPgetNlpiSolution(scip, nlpidata->nlpis[problem->bestidx], problem->nlpiproblems[problem->bestidx],
584 SCIP_CALL( SCIPgetNlpiStatistics(scip, nlpidata->nlpis[problem->bestidx], problem->nlpiproblems[problem->bestidx],
594 /** create solver interface for the solver "All" and includes it into SCIP, if at least 2 NLPIs have already been included
629 nlpiChgObjConstantAll, nlpiSetInitialGuessAll, nlpiSolveAll, nlpiGetSolstatAll, nlpiGetTermstatAll,
Definition: type_nlpi.h:163
Definition: struct_scip.h:68
public methods for memory management
Definition: type_nlpi.h:182
Definition: type_nlpi.h:166
public methods for numerical tolerances
public methods for NLPI solver interfaces
Definition: type_nlpi.h:162
static SCIP_DECL_NLPIGETSOLSTAT(nlpiGetSolstatAll)
Definition: nlpi_all.c:518
Definition: type_nlpi.h:197
static SCIP_DECL_NLPISETOBJECTIVE(nlpiSetObjectiveAll)
Definition: nlpi_all.c:198
Definition: type_retcode.h:42
static SCIP_DECL_NLPIGETSOLUTION(nlpiGetSolutionAll)
Definition: nlpi_all.c:552
static SCIP_DECL_NLPICHGLINEARCOEFS(nlpiChgLinearCoefsAll)
Definition: nlpi_all.c:341
static SCIP_DECL_NLPIGETSTATISTICS(nlpiGetStatisticsAll)
Definition: nlpi_all.c:572
static SCIP_DECL_NLPIDELCONSSET(nlpiDelConstraintSetAll)
Definition: nlpi_all.c:301
Definition: type_nlpi.h:177
static SCIP_DECL_NLPICHGOBJCONSTANT(nlpiChgObjConstantAll)
Definition: nlpi_all.c:383
static SCIP_DECL_NLPIADDCONSTRAINTS(nlpiAddConstraintsAll)
Definition: nlpi_all.c:176
NLP interface that uses all available NLP interfaces.
static SCIP_DECL_NLPIGETTERMSTAT(nlpiGetTermstatAll)
Definition: nlpi_all.c:535
static SCIP_DECL_NLPICREATEPROBLEM(nlpiCreateProblemAll)
Definition: nlpi_all.c:100
static SCIP_DECL_NLPISETINITIALGUESS(nlpiSetInitialGuessAll)
Definition: nlpi_all.c:404
static SCIP_DECL_NLPICHGVARBOUNDS(nlpiChgVarBoundsAll)
Definition: nlpi_all.c:219
static SCIP_DECL_NLPIFREEPROBLEM(nlpiFreeProblemAll)
Definition: nlpi_all.c:128
Definition: type_nlpi.h:174
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
Definition: scip_mem.h:111
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)
Definition: scip_nlpi.c:107
static SCIP_DECL_NLPICHGCONSSIDES(nlpiChgConsSidesAll)
Definition: nlpi_all.c:240
Definition: objbenders.h:43
Definition: nlpi_all.c:54
Definition: struct_nlpi.h:46