42 #define NLPI_NAME "filtersqp" 43 #define NLPI_DESC "Sequential Quadratic Programming trust region solver by R. Fletcher and S. Leyffer" 44 #define NLPI_PRIORITY -1000 46 #define RANDSEED 26051979 47 #define MAXPERTURB 0.01 49 #define WORKSPACEGROWTHFACTOR 2 51 #define OPTTOLFACTOR 0.5 52 #define DEFAULT_LOBJLIM (real)(-1e100) 53 #define DEFAULT_FEASOPTTOL 1e-6 54 #define DEFAULT_MAXITER 3000 135 #ifdef FNAME_LCASE_DECOR 136 # define F77_FUNC(name,NAME) name ## _ 138 #ifdef FNAME_UCASE_DECOR 139 # define F77_FUNC(name,NAME) NAME ## _ 141 #ifdef FNAME_LCASE_NODECOR 142 # define F77_FUNC(name,NAME) name 144 #ifdef FNAME_UCASE_NODECOR 145 # define F77_FUNC(name,NAME) NAME 204 void F77_FUNC(objgrad,OBJGRAD)(void);
238 }
F77_FUNC(nlp_eps_inf,NLP_EPS_INF);
271 (void) gettimeofday(&tp, NULL);
287 assert(nlpidata != NULL);
292 assert(now.
sec >= nlpidata->starttime.sec);
293 assert(now.
sec > nlpidata->starttime.sec || now.
usec >= nlpidata->starttime.usec);
304 if( nlpiproblem->
maxtime == DBL_MAX )
324 assert(problem != NULL);
328 SCIPdebugMessage(
"timelimit reached, issuing arithmetic exception in objfun\n");
363 assert(problem != NULL);
366 for( j = 0; j < *m; ++j )
400 assert(problem != NULL);
473 assert(problem != NULL);
483 for( i = 0; i < *m; ++i )
484 lambda[i] = -lam[*n+i];
495 for( i = 0; i < nnz + *n + 2; ++i )
497 *li_hess = nnz + *n + 2;
527 assert(lasize != NULL);
550 *lasize = 1 + (nvars+nnz) + 1+ncons + 1;
553 (*la)[0] = nvars+nnz+1;
556 for( i = 0; i < nvars; ++i )
561 for( i = 0; i < nnz; ++i )
562 (*la)[1+nvars+i] = col[i] + 1;
565 for( c = 0; c <= ncons; ++c )
566 (*la)[(*la)[0]+1+c] = offset[c] + nvars + 1;
571 for( i = 0; i < 1 + (nvars+nnz) + 1+ncons + 1; ++i )
572 printf(
"la[%2d] = %2d\n", i, (*la)[i]);
594 assert(lasize != NULL);
617 *lasize = 1 + nnz + nvars + 1;
623 for( i = 0; i < nnz; ++i )
624 (*la)[1+i] = col[i] + 1;
627 for( v = 0; v <= nvars; ++v )
628 (*la)[(*la)[0]+v] = offset[v] + 1;
633 for( i = 0; i < 1 + nnz + nvars + 1; ++i )
634 printf(
"lw[%2d] = %2d\n", i, (*la)[i]);
653 assert(data != NULL);
654 assert(problem != NULL);
656 assert(success != NULL);
663 for( i = 0; i < n; ++i )
671 SCIPdebugMessage(
"FilterSQP started without initial primal values; make up something by projecting 0 onto variable bounds and perturb\n");
673 if( data->randnumgen == NULL )
678 for( i = 0; i < n; ++i )
703 SCIPdebugMessage(
"could not evaluate or constraint %d in %s starting point or Jacobian not available\n", i-1, problem->
initguess != NULL ?
"provided" :
"made up");
724 assert(problem != NULL);
745 assert(problem != NULL);
747 assert((x != NULL) == (lam != NULL));
754 if( ifail <= 8 && x != NULL )
779 for( i = 0; i < nvars; ++i )
789 for( i = 0; i < ncons; ++i )
889 size = (int)(1.2 * size + 4);
911 assert(sourcenlpi != NULL);
912 assert(targetnlpi != NULL);
915 assert(sourcedata != NULL);
918 assert(*targetnlpi != NULL);
936 assert(nlpi != NULL);
939 assert(data != NULL);
941 if( data->randnumgen != NULL )
947 assert(data == NULL);
979 assert(nlpi != NULL);
980 assert(problem != NULL);
983 assert(data != NULL);
995 (*problem)->maxtime = DBL_MAX;
997 (*problem)->iprint = 0;
1015 assert(nlpi != NULL);
1016 assert(problem != NULL);
1017 assert(*problem != NULL);
1020 assert(data != NULL);
1022 if( (*problem)->oracle != NULL )
1047 assert(*problem == NULL);
1084 assert(nlpi != NULL);
1085 assert(problem != NULL);
1086 assert(problem->oracle != NULL);
1089 assert(nlpidata != NULL);
1097 problem->warmstart =
FALSE;
1104 if( problem->primalvalues != NULL )
1109 if( problem->varlbdualvalues != NULL )
1114 if( problem->varubdualvalues != NULL )
1119 if( problem->x != NULL )
1124 if( problem->lam != NULL )
1129 if( problem->bl != NULL )
1131 assert(problem->bu != NULL);
1136 if( problem->s != NULL )
1141 problem->varssize = newsize;
1145 if( problem->bl != NULL )
1155 for( i = nconss-1; i >= 0; --i )
1157 problem->bl[oldnvars+nvars+i] = problem->bl[oldnvars+i];
1158 problem->bu[oldnvars+nvars+i] = problem->bu[oldnvars+i];
1162 for( i = 0; i < nvars; ++i )
1164 problem->bl[oldnvars+i] = lbs[i];
1165 problem->bu[oldnvars+i] = ubs[i];
1224 assert(nlpi != NULL);
1225 assert(problem != NULL);
1226 assert(problem->oracle != NULL);
1229 assert(nlpidata != NULL);
1235 nlininds, lininds, linvals,
1236 nquadelems, quadelems,
1237 exprvaridxs, exprtrees, names) );
1240 problem->warmstart =
FALSE;
1247 if( problem->consdualvalues != NULL )
1252 if( problem->c != NULL )
1257 if( problem->lam != NULL )
1262 if( problem->bl != NULL )
1264 assert(problem->bu != NULL);
1265 assert(problem->cstype != NULL);
1271 if( problem->s != NULL )
1276 problem->conssize = newsize;
1280 if( problem->bl != NULL )
1287 for( i = 0; i < ncons; ++i )
1289 problem->bl[nvars+oldnconss+i] = lhss[i];
1290 problem->bu[nvars+oldnconss+i] = rhss[i];
1337 assert(nlpi != NULL);
1338 assert(problem != NULL);
1339 assert(problem->oracle != NULL);
1342 assert(nlpidata != NULL);
1345 constant, nlins, lininds, linvals,
1346 nquadelems, quadelems,
1347 exprvaridxs, exprtree) );
1372 assert(nlpi != NULL);
1373 assert(problem != NULL);
1374 assert(problem->oracle != NULL);
1381 if( problem->bl != NULL )
1385 for( i = 0; i < nvars; ++i )
1387 problem->bl[indices[i]] = lbs[i];
1388 problem->bu[indices[i]] = ubs[i];
1408 assert(nlpi != NULL);
1409 assert(problem != NULL);
1410 assert(problem->oracle != NULL);
1417 if( problem->bl != NULL )
1424 for( i = 0; i < nconss; ++i )
1426 problem->bl[nvars+indices[i]] = lhss[i];
1427 problem->bu[nvars+indices[i]] = rhss[i];
1449 assert(nlpi != NULL);
1450 assert(problem != NULL);
1451 assert(problem->oracle != NULL);
1454 assert(nlpidata != NULL);
1462 problem->warmstart =
FALSE;
1493 assert(nlpi != NULL);
1494 assert(problem != NULL);
1495 assert(problem->oracle != NULL);
1498 assert(nlpidata != NULL);
1503 problem->warmstart =
FALSE;
1534 assert(nlpi != NULL);
1535 assert(problem != NULL);
1536 assert(problem->oracle != NULL);
1539 assert(nlpidata != NULL);
1573 assert(nlpi != NULL);
1574 assert(problem != NULL);
1575 assert(problem->oracle != NULL);
1578 assert(nlpidata != NULL);
1585 if( problem->cstype != NULL && idx >= 0 )
1617 assert(nlpi != NULL);
1618 assert(problem != NULL);
1619 assert(problem->oracle != NULL);
1622 assert(nlpidata != NULL);
1629 if( problem->cstype != NULL && idxcons >= 0 )
1658 assert(nlpi != NULL);
1659 assert(problem != NULL);
1660 assert(problem->oracle != NULL);
1663 assert(nlpidata != NULL);
1689 assert(nlpi != NULL);
1690 assert(problem != NULL);
1691 assert(problem->oracle != NULL);
1715 assert(nlpi != NULL);
1716 assert(problem != NULL);
1717 assert(problem->oracle != NULL);
1720 assert(nlpidata != NULL);
1722 if( primalvalues != NULL )
1724 if( problem->initguess == NULL )
1771 assert(data != NULL);
1777 if( problem->fromscratch )
1778 problem->warmstart =
FALSE;
1790 ifail = problem->warmstart ? -1 : 0;
1794 iuser = (
fint*)problem;
1795 if( problem->warmstart )
1796 memset(problem->istat+1, 0,
sizeof(problem->istat)-
sizeof(*problem->istat));
1798 memset(problem->istat, 0,
sizeof(problem->istat));
1799 memset(problem->rstat, 0,
sizeof(problem->rstat));
1800 problem->niterations = 0;
1802 if( problem->x == NULL )
1806 if( problem->c == NULL )
1810 if( problem->lam == NULL )
1818 if( problem->s == NULL )
1823 if( problem->la == NULL )
1829 maxa = problem->la[0]-1;
1831 if( problem->hessiannz == NULL )
1834 SCIP_CALL(
setupHessian(data->blkmem, problem->oracle, &problem->hessiannz, &problem->hessiannzsize) );
1838 if( problem->bl == NULL )
1840 assert(problem->bu == NULL);
1841 assert(problem->cstype == NULL);
1849 for( i = 0; i < m; ++i )
1858 if( problem->evalbufsize < MAX3(n, problem->hessiannz[0], maxa) )
1860 int newsize =
calcGrowSize(MAX3(n, problem->hessiannz[0], maxa));
1862 problem->evalbufsize = newsize;
1879 lh1 = problem->hessiannz[0]-1 + 8 + 2*n + m;
1880 minmxwk = 21*n + 8*m + mlp + 8*maxf + lh1 + kmax*(kmax+9)/2 +
MAX(20*n,2000);
1881 if( problem->ws == NULL )
1883 problem->mxwk = minmxwk;
1886 else if( problem->mxwk < minmxwk )
1890 problem->mxwk = newsize;
1896 minmxiwk = 13*n + 4*m + mlp + lh1 + 100 + kmax + 113 +
MAX(5*n,5000);
1897 if( problem->lws == NULL )
1899 assert(!problem->warmstart);
1901 problem->mxiwk = minmxiwk;
1904 else if( problem->mxiwk < minmxiwk && !problem->warmstart )
1908 problem->mxiwk = newsize;
1911 memset(problem->ws, 0, problem->mxwk *
sizeof(
real));
1926 F77_FUNC(scalec,SCALEC).scale_mode = 0;
1928 for( nruns = 1; ; ++nruns )
1930 maxiter = problem->maxiter - problem->niterations;
1933 &n, &m, &kmax, &maxa,
1934 &maxf, &mlp, &problem->mxwk, &problem->mxiwk,
1935 &problem->iprint, &nout, &ifail, &rho,
1936 problem->x, problem->c, &f, &problem->fmin, problem->bl,
1937 problem->bu, problem->s, problem->a, problem->la, problem->ws,
1938 problem->lws, problem->lam, problem->cstype, user,
1939 iuser, &maxiter, problem->istat,
1940 problem->rstat, cstype_len);
1942 problem->niterations += problem->istat[1];
1944 assert(ifail <= 10);
1948 if( ifail < 8 && (ifail != 0 || problem->rstat[0] <= problem->opttol) )
1951 if( problem->iprint > 0 )
1953 SCIPmessagePrintInfo(data->messagehdlr,
"FilterSQP terminated with status %d in run %d, absolute KKT violation is %g\n", ifail, nruns, problem->rstat[0]);
1957 if( problem->niterations >= problem->maxiter ||
timelimitreached(data, problem) )
1959 if( problem->iprint > 0 )
1969 if( problem->iprint > 0 )
1982 if( problem->iprint > 0 )
1989 epsfactor = problem->opttol / problem->rstat[0];
1990 assert(epsfactor < 1.0);
1994 if( problem->iprint > 0 )
2004 if( ifail == 8 || ifail == 9 )
2013 problem->mxwk = newsize;
2017 if( ifail == 8 || ifail == 10 )
2026 problem->mxiwk = newsize;
2036 (void)
setupStart(data, problem, problem->x, &success);
2060 assert(problem != NULL);
2062 return problem->solstat;
2076 assert(problem != NULL);
2078 return problem->termstat;
2100 assert(problem != NULL);
2102 if( primalvalues != NULL )
2104 assert(problem->primalvalues != NULL);
2106 *primalvalues = problem->primalvalues;
2109 if( consdualvalues != NULL )
2111 assert(problem->consdualvalues != NULL);
2113 *consdualvalues = problem->consdualvalues;
2116 if( varlbdualvalues != NULL )
2118 assert(problem->varlbdualvalues != NULL);
2120 *varlbdualvalues = problem->varlbdualvalues;
2123 if( varubdualvalues != NULL )
2125 assert(problem->varubdualvalues != NULL);
2127 *varubdualvalues = problem->varubdualvalues;
2130 if( objval != NULL )
2132 if( problem->primalvalues != NULL )
2157 assert(problem != NULL);
2178 SCIPerrorMessage(
"method of filtersqp nonlinear solver is not implemented\n");
2199 SCIPerrorMessage(
"method of filtersqp nonlinear solver is not implemented\n");
2217 SCIPerrorMessage(
"method of filtersqp nonlinear solver is not implemented\n");
2237 assert(nlpi != NULL);
2238 assert(ival != NULL);
2239 assert(problem != NULL);
2245 *ival = problem->fromscratch ? 1 : 0;
2251 *ival = problem->iprint;
2263 SCIPerrorMessage(
"relative objective tolerance parameter is of type real.\n");
2281 *ival = problem->maxiter;
2324 assert(nlpi != NULL);
2325 assert(problem != NULL);
2331 if( ival == 0 || ival == 1 )
2337 SCIPerrorMessage(
"Value %d for parameter from scratch out of range {0, 1}\n", ival);
2347 problem->iprint = ival;
2351 SCIPerrorMessage(
"Value %d for parameter from verbosity level out of range\n", ival);
2365 SCIPerrorMessage(
"relative objective tolerance parameter is of type real.\n");
2385 problem->maxiter = ival;
2389 SCIPerrorMessage(
"Value %d for parameter iteration limit is negative\n", ival);
2409 if( ival == 0 || ival == 1 )
2411 SCIPdebugMessage(
"fast fail parameter not supported by FilterSQP interface yet. Ignored.\n");
2415 SCIPerrorMessage(
"Value %d for parameter fastfail out of range {0, 1}\n", ival);
2423 SCIPerrorMessage(
"Parameter %d not known to FilterSQP interface.\n", type);
2445 assert(nlpi != NULL);
2446 assert(dval != NULL);
2465 *dval = problem->feastol;
2471 *dval = problem->opttol;
2477 *dval = problem->fmin;
2490 assert(data != NULL);
2491 *dval = data->infinity;
2504 *dval = problem->maxtime;
2522 SCIPerrorMessage(
"Parameter %d not known to FilterSQP interface.\n", type);
2541 assert(nlpi != NULL);
2562 problem->feastol = dval;
2566 SCIPerrorMessage(
"Value %g for parameter feasibility tolerance is negative\n", dval);
2576 problem->opttol = dval;
2580 SCIPerrorMessage(
"Value %g for parameter relative objective tolerance is negative\n", dval);
2588 problem->fmin = dval;
2603 assert(data != NULL);
2604 data->infinity = dval;
2619 problem->maxtime = dval;
2643 SCIPerrorMessage(
"Parameter %d not known to FilterSQP interface.\n", type);
2665 assert(nlpi != NULL);
2666 assert(problem != NULL);
2732 SCIPerrorMessage(
"Parameter %d not known to FilterSQP interface.\n", type);
2749 assert(nlpi != NULL);
2750 assert(problem != NULL);
2833 assert(nlpi != NULL);
2836 assert(nlpidata != NULL);
2838 nlpidata->messagehdlr = messagehdlr;
2855 assert(blkmem != NULL);
2856 assert(nlpi != NULL);
2861 nlpidata->blkmem = blkmem;
2862 nlpidata->messagehdlr = NULL;
2864 nlpidata->randnumgen = NULL;
2869 nlpiCopyFilterSQP, nlpiFreeFilterSQP, nlpiGetSolverPointerFilterSQP,
2870 nlpiCreateProblemFilterSQP, nlpiFreeProblemFilterSQP, nlpiGetProblemPointerFilterSQP,
2871 nlpiAddVarsFilterSQP, nlpiAddConstraintsFilterSQP, nlpiSetObjectiveFilterSQP,
2872 nlpiChgVarBoundsFilterSQP, nlpiChgConsSidesFilterSQP, nlpiDelVarSetFilterSQP, nlpiDelConstraintSetFilterSQP,
2873 nlpiChgLinearCoefsFilterSQP, nlpiChgQuadraticCoefsFilterSQP, nlpiChgExprtreeFilterSQP, nlpiChgNonlinCoefFilterSQP,
2874 nlpiChgObjConstantFilterSQP, nlpiSetInitialGuessFilterSQP, nlpiSolveFilterSQP, nlpiGetSolstatFilterSQP, nlpiGetTermstatFilterSQP,
2875 nlpiGetSolutionFilterSQP, nlpiGetStatisticsFilterSQP,
2876 nlpiGetWarmstartSizeFilterSQP, nlpiGetWarmstartMemoFilterSQP, nlpiSetWarmstartMemoFilterSQP,
2877 nlpiGetIntParFilterSQP, nlpiSetIntParFilterSQP, nlpiGetRealParFilterSQP, nlpiSetRealParFilterSQP, nlpiGetStringParFilterSQP, nlpiSetStringParFilterSQP,
2878 nlpiSetMessageHdlrFilterSQP,
static SCIP_DECL_NLPIFREEPROBLEM(nlpiFreeProblemFilterSQP)
static SCIP_DECL_NLPIGETWARMSTARTSIZE(nlpiGetWarmstartSizeFilterSQP)
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
static SCIP_DECL_NLPIGETSOLSTAT(nlpiGetSolstatFilterSQP)
const SCIP_Real * SCIPnlpiOracleGetVarUbs(SCIP_NLPIORACLE *oracle)
const char * SCIPgetSolverNameFilterSQP(void)
SCIP_RETCODE SCIPnlpiOracleGetJacobianSparsity(SCIP_NLPIORACLE *oracle, const int **offset, const int **col)
static SCIP_RETCODE setupGradients(BMS_BLKMEM *blkmem, SCIP_NLPIORACLE *oracle, fint **la, int *lasize, real **a)
SCIP_RETCODE SCIPcreateNlpSolverFilterSQP(BMS_BLKMEM *blkmem, SCIP_NLPI **nlpi)
SCIP_RETCODE SCIPnlpiOracleGetHessianLagSparsity(SCIP_NLPIORACLE *oracle, const int **offset, const int **col)
int SCIPnlpiOracleGetNVars(SCIP_NLPIORACLE *oracle)
static SCIP_DECL_NLPIGETWARMSTARTMEMO(nlpiGetWarmstartMemoFilterSQP)
static SCIP_DECL_NLPIADDCONSTRAINTS(nlpiAddConstraintsFilterSQP)
static SCIP_DECL_NLPICHGVARBOUNDS(nlpiChgVarBoundsFilterSQP)
static SCIP_DECL_NLPISETWARMSTARTMEMO(nlpiSetWarmstartMemoFilterSQP)
internal methods for NLPI solver interfaces
SCIP_Bool SCIPisFilterSQPAvailableFilterSQP(void)
SCIP_RETCODE SCIPnlpiOracleSetObjective(SCIP_NLPIORACLE *oracle, const SCIP_Real constant, int nlin, const int *lininds, const SCIP_Real *linvals, int nquadelems, const SCIP_QUADELEM *quadelems, const int *exprvaridxs, const SCIP_EXPRTREE *exprtree)
SCIP_Real * varubdualvalues
static SCIP_DECL_NLPISOLVE(nlpiSolveFilterSQP)
methods to store an NLP and request function, gradient, and hessian values
SCIP_Real SCIPnlpiOracleGetConstraintLhs(SCIP_NLPIORACLE *oracle, int considx)
static SCIP_DECL_NLPICHGCONSSIDES(nlpiChgConsSidesFilterSQP)
enum SCIP_Retcode SCIP_RETCODE
void F77_FUNC(filtersqp, FILTERSQP)
SCIP_RETCODE SCIPnlpiOracleEvalObjectiveValue(SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Real *objval)
static SCIP_DECL_NLPIADDVARS(nlpiAddVarsFilterSQP)
#define WORKSPACEGROWTHFACTOR
static SCIP_TIME gettime(void)
#define BMSallocMemoryArray(ptr, num)
static SCIP_DECL_NLPIGETSOLUTION(nlpiGetSolutionFilterSQP)
SCIP_RETCODE SCIPnlpiSetMessageHdlr(SCIP_NLPI *nlpi, SCIP_MESSAGEHDLR *messagehdlr)
static SCIP_DECL_NLPIGETPROBLEMPOINTER(nlpiGetProblemPointerFilterSQP)
static pthread_mutex_t filtersqpmutex
SCIP_RETCODE SCIPnlpiOracleEvalObjectiveGradient(SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Bool isnewx, SCIP_Real *objval, SCIP_Real *objgrad)
SCIP_RETCODE SCIPnlpiOracleDelConsSet(SCIP_NLPIORACLE *oracle, int *delstats)
SCIP_RETCODE SCIPnlpiOracleChgObjConstant(SCIP_NLPIORACLE *oracle, SCIP_Real objconstant)
int SCIPnlpiOracleGetNConstraints(SCIP_NLPIORACLE *oracle)
SCIP_Real * varlbdualvalues
static SCIP_DECL_NLPIDELVARSET(nlpiDelVarSetFilterSQP)
static SCIP_DECL_NLPIGETTERMSTAT(nlpiGetTermstatFilterSQP)
static SCIP_DECL_NLPISETINITIALGUESS(nlpiSetInitialGuessFilterSQP)
int SCIPnlpiOracleGetConstraintDegree(SCIP_NLPIORACLE *oracle, int considx)
#define BMSfreeMemoryArray(ptr)
SCIP_RETCODE SCIPnlpiOracleChgExprtree(SCIP_NLPIORACLE *oracle, int considx, const int *exprvaridxs, const SCIP_EXPRTREE *exprtree)
static SCIP_DECL_NLPICHGQUADCOEFS(nlpiChgQuadraticCoefsFilterSQP)
SCIP_RETCODE SCIPnlpiOracleCreate(BMS_BLKMEM *blkmem, SCIP_NLPIORACLE **oracle)
static SCIP_DECL_NLPIGETSOLVERPOINTER(nlpiGetSolverPointerFilterSQP)
const SCIP_Real * SCIPnlpiOracleGetVarLbs(SCIP_NLPIORACLE *oracle)
SCIP_RETCODE SCIPnlpiOracleChgVarBounds(SCIP_NLPIORACLE *oracle, int nvars, const int *indices, const SCIP_Real *lbs, const SCIP_Real *ubs)
struct SCIP_NlpiData SCIP_NLPIDATA
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
SCIP_RETCODE SCIPnlpiOracleAddVars(SCIP_NLPIORACLE *oracle, int nvars, const SCIP_Real *lbs, const SCIP_Real *ubs, const char **varnames)
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
#define BMSallocClearBlockMemoryArray(mem, ptr, num)
internal miscellaneous methods
void SCIPrandomFree(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem)
static SCIP_DECL_NLPIGETINTPAR(nlpiGetIntParFilterSQP)
static SCIP_DECL_NLPISETINTPAR(nlpiSetIntParFilterSQP)
static SCIP_DECL_NLPICOPY(nlpiCopyFilterSQP)
const char * SCIPgetSolverDescFilterSQP(void)
void SCIPmessagePrintInfo(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
static SCIP_DECL_NLPIFREE(nlpiFreeFilterSQP)
static SCIP_DECL_NLPIGETREALPAR(nlpiGetRealParFilterSQP)
SCIP_Real SCIPnlpiOracleGetConstraintRhs(SCIP_NLPIORACLE *oracle, int considx)
SCIP_Real SCIPnlpiOracleGetInfinity(SCIP_NLPIORACLE *oracle)
SCIP_RETCODE SCIPnlpiOracleFree(SCIP_NLPIORACLE **oracle)
static SCIP_Real timeelapsed(SCIP_NLPIDATA *nlpidata)
#define BMSfreeBlockMemory(mem, ptr)
SCIP_RETCODE SCIPnlpiCreate(SCIP_NLPI **nlpi, 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_NLPICHGQUADCOEFS((*nlpichgquadcoefs)), SCIP_DECL_NLPICHGEXPRTREE((*nlpichgexprtree)), SCIP_DECL_NLPICHGNONLINCOEF((*nlpichgnonlincoef)), 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_DECL_NLPIGETWARMSTARTSIZE((*nlpigetwarmstartsize)), SCIP_DECL_NLPIGETWARMSTARTMEMO((*nlpigetwarmstartmemo)), SCIP_DECL_NLPISETWARMSTARTMEMO((*nlpisetwarmstartmemo)), SCIP_DECL_NLPIGETINTPAR((*nlpigetintpar)), SCIP_DECL_NLPISETINTPAR((*nlpisetintpar)), SCIP_DECL_NLPIGETREALPAR((*nlpigetrealpar)), SCIP_DECL_NLPISETREALPAR((*nlpisetrealpar)), SCIP_DECL_NLPIGETSTRINGPAR((*nlpigetstringpar)), SCIP_DECL_NLPISETSTRINGPAR((*nlpisetstringpar)), SCIP_DECL_NLPISETMESSAGEHDLR((*nlpisetmessagehdlr)), SCIP_NLPIDATA *nlpidata)
static SCIP_Bool timelimitreached(SCIP_NLPIDATA *nlpidata, SCIP_NLPIPROBLEM *nlpiproblem)
#define BMSallocBlockMemoryArray(mem, ptr, num)
SCIP_RETCODE SCIPnlpiOracleSetProblemName(SCIP_NLPIORACLE *oracle, const char *name)
SCIP_RETCODE SCIPnlpiOracleAddConstraints(SCIP_NLPIORACLE *oracle, int nconss, const SCIP_Real *lhss, const SCIP_Real *rhss, const int *nlininds, int *const *lininds, SCIP_Real *const *linvals, const int *nquadelems, SCIP_QUADELEM *const *quadelems, int *const *exprvaridxs, SCIP_EXPRTREE *const *exprtrees, const char **consnames)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
void SCIPnlpStatisticsSetNIterations(SCIP_NLPSTATISTICS *statistics, int niterations)
void SCIPnlpStatisticsSetTotalTime(SCIP_NLPSTATISTICS *statistics, SCIP_Real totaltime)
static int calcGrowSize(int num)
SCIP_RETCODE SCIPnlpiOracleEvalConstraintValue(SCIP_NLPIORACLE *oracle, int considx, const SCIP_Real *x, SCIP_Real *conval)
static SCIP_DECL_NLPIGETSTRINGPAR(nlpiGetStringParFilterSQP)
SCIP_RETCODE SCIPnlpiOracleChgLinearCoefs(SCIP_NLPIORACLE *oracle, int considx, int nentries, const int *varidxs, const SCIP_Real *newcoefs)
#define BMScopyMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPnlpiOracleChgQuadCoefs(SCIP_NLPIORACLE *oracle, int considx, int nquadelems, const SCIP_QUADELEM *quadelems)
static SCIP_DECL_NLPISETMESSAGEHDLR(nlpiSetMessageHdlrFilterSQP)
SCIP_RETCODE SCIPnlpiOracleChgConsSides(SCIP_NLPIORACLE *oracle, int nconss, const int *indices, const SCIP_Real *lhss, const SCIP_Real *rhss)
#define BMSclearMemory(ptr)
static SCIP_DECL_NLPIGETSTATISTICS(nlpiGetStatisticsFilterSQP)
static SCIP_DECL_NLPICHGNONLINCOEF(nlpiChgNonlinCoefFilterSQP)
#define DEFAULT_FEASOPTTOL
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIP_RETCODE SCIPnlpiOracleDelVarSet(SCIP_NLPIORACLE *oracle, int *delstats)
#define SCIP_DEFAULT_INFINITY
static SCIP_RETCODE processSolveOutcome(SCIP_NLPIDATA *nlpidata, SCIP_NLPIPROBLEM *problem, fint ifail, real *x, real *lam)
static SCIP_DECL_NLPIDELCONSSET(nlpiDelConstraintSetFilterSQP)
SCIP_RETCODE SCIPnlpiOracleChgExprParam(SCIP_NLPIORACLE *oracle, int considx, int paramidx, SCIP_Real paramval)
SCIP_NLPIDATA * SCIPnlpiGetData(SCIP_NLPI *nlpi)
static SCIP_DECL_NLPICHGOBJCONSTANT(nlpiChgObjConstantFilterSQP)
SCIP_RETCODE SCIPnlpiOracleEvalHessianLag(SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Bool isnewx, SCIP_Real objfactor, const SCIP_Real *lambda, SCIP_Real *hessian)
static SCIP_DECL_NLPICREATEPROBLEM(nlpiCreateProblemFilterSQP)
SCIP_RETCODE SCIPrandomCreate(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem, unsigned int initialseed)
static void invalidateSolution(SCIP_NLPIPROBLEM *problem)
static SCIP_RETCODE setupHessian(BMS_BLKMEM *blkmem, SCIP_NLPIORACLE *oracle, fint **la, int *lasize)
static SCIP_DECL_NLPICHGEXPRTREE(nlpiChgExprtreeFilterSQP)
static SCIP_RETCODE setupStart(SCIP_NLPIDATA *data, SCIP_NLPIPROBLEM *problem, real *x, SCIP_Bool *success)
SCIP_RETCODE SCIPnlpiOracleSetInfinity(SCIP_NLPIORACLE *oracle, SCIP_Real infinity)
SCIP_Real * consdualvalues
SCIP_NLPTERMSTAT termstat
static SCIP_DECL_NLPISETREALPAR(nlpiSetRealParFilterSQP)
SCIP_RETCODE SCIPnlpiOracleEvalJacobian(SCIP_NLPIORACLE *oracle, const SCIP_Real *x, SCIP_Bool isnewx, SCIP_Real *convals, SCIP_Real *jacobi)
#define BMSallocBlockMemory(mem, ptr)
#define BMSclearMemoryArray(ptr, num)
static SCIP_DECL_NLPISETSTRINGPAR(nlpiSetStringParFilterSQP)
struct BMS_BlkMem BMS_BLKMEM
static SCIP_DECL_NLPISETOBJECTIVE(nlpiSetObjectiveFilterSQP)
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
static SCIP_DECL_NLPICHGLINEARCOEFS(nlpiChgLinearCoefsFilterSQP)
SCIP_RETCODE SCIPnlpiSetRealPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, SCIP_Real dval)