59 #define EVENTHDLR_NAME "nlpEventHdlr" 60 #define EVENTHDLR_DESC "handles all events necessary for maintaining NLP data" 61 #define ADDNAMESTONLPI 0 105 assert(tree != NULL);
117 assert(tree != NULL);
118 assert(vars != NULL || nvars == 0);
125 else if( tree->
vars != NULL )
137 assert(tree->
vars != NULL || tree->
nvars == 0);
149 assert(tree != NULL);
150 assert(vars != NULL || nvars == 0);
151 assert(tree->
vars != NULL || tree->
nvars == 0);
156 if( tree->
nvars == 0 )
166 tree->
nvars += nvars;
178 const char** varnames;
181 assert(tree != NULL);
183 if( tree->
nvars == 0 )
189 assert(tree->
vars != NULL);
192 for( i = 0; i < tree->
nvars; ++i )
212 assert(tree != NULL);
215 for( i = 0; i < tree->
nvars; ++i )
244 assert(tree != NULL);
245 assert(tree->
vars != NULL || tree->
nvars == 0);
246 assert(changed != NULL);
249 if( newvarsstart != NULL )
250 *newvarsstart = tree->
nvars;
252 if( tree->
nvars == 0 )
256 havefixedvar =
FALSE;
258 for( i = 0; i < tree->
nvars; ++i )
274 for( i = 0; i < tree->
nvars; ++i )
283 nvarsold = tree->
nvars;
290 for( i = 0; i < nvarsold; ++i )
315 idx = tree->
nvars - 1;
322 assert(idx >= 0 && idx < tree->nvars);
326 if( scalar != 1.0 || constant != 0.0 )
368 idx = tree->
nvars - 1;
375 assert(idx >= 0 && idx < tree->nvars);
379 coefs[nchildren] = mscalar;
391 else if( nchildren == 1 && constant == 0.0 )
394 replaceexprs[i] = children[0];
410 for( i = 0; i < nvarsold; ++i )
411 if( replaceexprs[i] != NULL )
421 for( i = 0; i < tree->
nvars; ++i )
427 newpos[i] = i - offset;
435 if( varpos != NULL && i < nvarsold )
436 varpos[i] = newpos[i];
438 if( newvarsstart != NULL )
439 *newvarsstart -= offset;
446 havefixedvar =
FALSE;
447 for( i = 0; i < tree->
nvars; ++i )
449 if( newpos[i] == -1 )
456 tree->
vars[newpos[i]] = tree->
vars[i];
463 if( offset < tree->nvars )
466 tree->
nvars -= offset;
505 assert(nlrow != NULL);
531 assert(idx >= 0 && idx < nlp->nvars);
534 assert(idx >= 0 && idx < nlp->nvars_solver);
554 assert(nlrow != NULL);
555 assert(quadelem.
idx1 >= 0);
557 assert(quadelem.
idx2 >= 0);
626 assert(nlrow != NULL);
660 for( i = 0; i < n; ++i )
694 assert(nlrow != NULL);
696 assert(paramidx >= -1);
730 for( i = 0; i < n; ++i )
750 assert(nlrow != NULL);
788 assert(nlrow != NULL);
831 assert(nlrow != NULL);
852 assert(nlrow != NULL);
873 assert(nlrow != NULL);
874 assert(0 <= oldpos && oldpos < nlrow->nlinvars);
875 assert(0 <= newpos && newpos < nlrow->nlinvars);
876 assert(nlrow->
linvars[oldpos] != NULL);
878 if( oldpos == newpos )
902 assert(nlrow != NULL);
903 assert(blkmem != NULL);
911 assert(nlrow->
linvars != NULL);
927 SCIPsetDebugMsg(
set,
"added linear coefficient %g * <%s> at position %d to nonlinear row <%s>\n",
950 assert(nlrow != NULL);
951 assert(blkmem != NULL);
960 if( constant != 0.0 )
1002 assert(pos < nlrow->nlinvars);
1003 assert(nlrow->
linvars[pos] == var);
1024 assert(nlrow != NULL);
1025 assert(
set != NULL);
1026 assert(0 <= pos && pos < nlrow->nlinvars);
1027 assert(nlrow->
linvars[pos] != NULL);
1052 assert(nlrow != NULL);
1053 assert(0 <= pos && pos < nlrow->nlinvars);
1054 assert(nlrow->
linvars[pos] != NULL);
1079 assert(blkmem != NULL);
1080 assert(nlrow != NULL);
1103 assert(nlrow != NULL);
1126 assert(nlrow != NULL);
1128 assert(idx1 < nlrow->nquadvars);
1130 assert(idx2 < nlrow->nquadvars);
1147 assert(nlrow != NULL);
1148 assert(0 <= oldpos && oldpos < nlrow->nquadelems);
1149 assert(0 <= newpos && newpos < nlrow->nquadelems);
1151 if( oldpos == newpos )
1173 assert(nlrow != NULL);
1174 assert(blkmem != NULL);
1175 assert(elem.
idx1 >= 0);
1177 assert(elem.
idx2 >= 0);
1199 SCIPsetDebugMsg(
set,
"added quadratic element %g * <%s> * <%s> at position %d to nonlinear row <%s>\n",
1217 assert(nlrow != NULL);
1218 assert(
set != NULL);
1219 assert(0 <= pos && pos < nlrow->nquadelems);
1248 assert(nlrow != NULL);
1249 assert(0 <= pos && pos < nlrow->nquadelems);
1281 assert(nlrow != NULL);
1282 assert(
set != NULL);
1283 assert(stat != NULL);
1323 while( i < nlrow->nquadvars && idx1 == nlrow->
quadelems[i].
idx1 );
1339 for( i = 0; i < n; ++i )
1374 assert(nlrow != NULL);
1375 assert(blkmem != NULL);
1377 assert(pos < nlrow->nlinvars);
1395 if( pos < nlrow->nlinvars )
1408 if( oldconstant != nlrow->
constant )
1473 assert(nlrow != NULL);
1477 for( i = 0; i < MIN(oldlen, nlrow->
nlinvars); ++i )
1479 assert(nlrow->
linvars[i] != NULL);
1511 assert(nlrow != NULL);
1512 assert(blkmem != NULL);
1517 SCIPsetDebugMsg(
set,
"removing fixed quadratic variables from nlrow\n");
1527 while( i < nlrow->nquadelems )
1538 if( elem.
idx1 < nvarsold )
1540 if( elem.
idx2 < nvarsold )
1546 SCIPsetDebugMsg(
set,
"removing fixed quadratic variables from %dth element %g <%s> <%s>\n",
1563 if( coef1 == 0.0 && coef2 == 0.0 )
1566 if( constant1 != 0.0 && constant2 != 0.0 )
1578 if( constant1 != 0.0 )
1581 if( constant2 != 0.0 )
1595 if( constant2 != 0.0 )
1598 if( constant1 != 0.0 )
1611 int* multaggrvaridxs;
1615 assert(coef1 == coef2);
1616 assert(constant1 == constant2);
1648 if( multaggrvaridxs[j] == -1 )
1652 multaggrvaridxs[j] = nlrow->
nquadvars-1;
1661 for( k = 0; k < j; ++k )
1663 newelem.
idx1 = MIN(multaggrvaridxs[j], multaggrvaridxs[k]);
1664 newelem.
idx2 =
MAX(multaggrvaridxs[j], multaggrvaridxs[k]);
1670 newelem.
idx1 = multaggrvaridxs[j];
1671 newelem.
idx2 = multaggrvaridxs[j];
1682 assert(var1 != NULL);
1683 assert(var2 != NULL);
1693 tmpconstant = constant1;
1696 constant2 = constant1;
1699 constant1 = tmpconstant;
1728 if( constant2 != 0.0 )
1743 assert(nlrow->
quadvars[idx2] == var2);
1750 if( newelem.
idx1 == -1 )
1758 newelem.
idx2 = idx2;
1761 if( newelem.
idx1 > idx2 )
1764 newelem.
idx1 = idx2;
1780 if( constant1 != 0.0 && constant2 != 0.0 )
1790 if( newelem.
idx1 == -1 )
1799 if( newelem.
idx2 == -1 )
1809 idx2 = newelem.
idx2;
1811 newelem.
idx1 = idx2;
1813 newelem.
coef = elem.
coef * coef1 * coef2;
1834 else if( havechange )
1844 for( i = 0; i < nvarsold; ++i )
1858 newpos[i] = i-offset;
1875 newpos[i] = i-offset;
1892 if( newpos[i] == -1 )
1915 SCIPsetDebugMsg(
set,
"finished removing fixed quadratic variables\n");
1966 assert(nlrow != NULL);
1967 assert(var != NULL);
2023 assert(nlrow != NULL);
2024 assert(blkmem != NULL);
2025 assert(
set != NULL);
2026 assert(name != NULL);
2028 assert(nlinvars == 0 || linvars != NULL);
2029 assert(nlinvars == 0 || lincoefs != NULL);
2030 assert(nquadvars == 0 || quadvars != NULL);
2031 assert(nquadelems == 0 || quadelems != NULL);
2032 assert(nquadelems == 0 || nquadvars > 0);
2039 (*nlrow)->constant = constant;
2042 for( i = 0; i < nlinvars; ++i )
2044 assert(linvars[i] != NULL);
2050 (*nlrow)->nlinvars = nlinvars;
2051 (*nlrow)->linvarssize = nlinvars;
2056 (*nlrow)->linvarssorted =
FALSE;
2060 (*nlrow)->linvars = NULL;
2061 (*nlrow)->lincoefs = NULL;
2062 (*nlrow)->linvarssorted =
TRUE;
2067 for( i = 0; i < nquadvars; ++i )
2068 assert(quadvars[i] != NULL);
2071 (*nlrow)->nquadvars = nquadvars;
2072 (*nlrow)->quadvarssize = nquadvars;
2073 (*nlrow)->quadvarshash = NULL;
2081 (*nlrow)->quadvars = NULL;
2086 for( i = 0; i < nquadelems; ++i )
2088 assert(quadelems[i].idx1 >= 0);
2089 assert(quadelems[i].idx1 < nquadvars);
2090 assert(quadelems[i].idx2 >= 0);
2091 assert(quadelems[i].idx2 < nquadvars);
2092 assert(quadelems[i].idx1 <= quadelems[i].idx2);
2097 (*nlrow)->nquadelems = nquadelems;
2098 (*nlrow)->quadelemssize = nquadelems;
2099 if( nquadelems > 0 )
2101 assert(nquadvars > 0);
2103 (*nlrow)->quadelemssorted =
FALSE;
2107 (*nlrow)->quadelems = NULL;
2108 (*nlrow)->quadelemssorted =
TRUE;
2112 if( exprtree != NULL )
2118 (*nlrow)->exprtree = NULL;
2122 (*nlrow)->lhs = MIN(lhs, rhs);
2123 (*nlrow)->rhs =
MAX(lhs, rhs);
2128 (*nlrow)->validactivitynlp =
FALSE;
2130 (*nlrow)->validpsactivitydomchg =
FALSE;
2133 (*nlrow)->validactivitybdsdomchg =
FALSE;
2134 (*nlrow)->nlpindex = -1;
2135 (*nlrow)->nlpiindex = -1;
2136 (*nlrow)->nuses = 0;
2137 (*nlrow)->dualsol = 0.0;
2138 (*nlrow)->curvature = curvature;
2156 assert(nlrow != NULL);
2157 assert(blkmem != NULL);
2158 assert(
set != NULL);
2159 assert(sourcenlrow != NULL);
2170 (*nlrow)->activity = sourcenlrow->
activity;
2193 assert(nlrow != NULL);
2194 assert(blkmem != NULL);
2195 assert(
set != NULL);
2196 assert(row != NULL);
2207 for( i = 0; i < rownz; ++i )
2210 assert(rowvars[i] != NULL);
2223 else if( rownz == 1 )
2257 assert(blkmem != NULL);
2258 assert(nlrow != NULL);
2259 assert(*nlrow != NULL);
2260 assert((*nlrow)->nuses == 0);
2261 assert((*nlrow)->nlpindex == -1);
2262 assert((*nlrow)->nlpiindex == -1);
2271 if( (*nlrow)->quadvarshash != NULL )
2275 if( (*nlrow)->exprtree != NULL )
2297 assert(nlrow != NULL);
2300 if( nlrow->
name != NULL && nlrow->
name[0] !=
'\0' )
2312 for( i = 0; i < nlrow->
nlinvars; ++i )
2314 assert(nlrow->
linvars[i] != NULL);
2348 assert(nlrow != NULL);
2349 assert(nlrow->
nuses >= 0);
2362 assert(blkmem != NULL);
2363 assert(nlrow != NULL);
2364 assert(*nlrow != NULL);
2365 assert((*nlrow)->nuses >= 1);
2367 SCIPsetDebugMsg(
set,
"release nonlinear row <%s> with nuses=%d\n", (*nlrow)->name, (*nlrow)->nuses);
2369 if( (*nlrow)->nuses == 0 )
2387 assert(nlrow != NULL);
2399 assert(num <= nlrow->linvarssize);
2463 assert(nlrow != NULL);
2464 assert(var != NULL);
2476 assert(0 <= pos && pos < nlrow->nlinvars);
2477 assert(nlrow->
linvars[pos] == var);
2498 assert(nlrow != NULL);
2499 assert(nlp != NULL);
2500 assert(var != NULL);
2531 assert(nlrow != NULL);
2542 assert(num <= nlrow->quadvarssize);
2555 assert(blkmem != NULL);
2556 assert(nlrow != NULL);
2557 assert(var != NULL);
2590 assert(nlrow != NULL);
2601 assert(num <= nlrow->quadelemssize);
2633 assert(nlrow != NULL);
2635 assert(idx1 < nlrow->nquadvars);
2637 assert(idx2 < nlrow->nquadvars);
2638 assert(idx1 <= idx2);
2644 SCIPerrorMessage(
"coefficient for index pair (idx1, idx2) doesn't exist in nonlinear row <%s>\n", idx1, idx2, nlrow->
name);
2647 assert(0 <= pos && pos < nlrow->nquadelems);
2667 assert(nlrow != NULL);
2668 assert(nlp != NULL);
2697 assert(nlrow != NULL);
2698 assert(blkmem != NULL);
2708 if( exprtree != NULL )
2737 assert(nlrow != NULL);
2738 assert(blkmem != NULL);
2759 assert(nlrow != NULL);
2760 assert(blkmem != NULL);
2780 assert(nlrow != NULL);
2800 assert(nlrow != NULL);
2820 assert(nlrow != NULL);
2859 assert(nlrow != NULL);
2860 assert(stat != NULL);
2861 assert(nlp != NULL);
2870 for( i = 0; i < nlrow->
nlinvars; ++i )
2872 assert(nlrow->
linvars[i] != NULL);
2908 for( i = 0; i < n; ++i )
2933 assert(nlrow != NULL);
2934 assert(stat != NULL);
2935 assert(activity != NULL);
2962 assert(nlrow != NULL);
2963 assert(feasibility != NULL);
2966 *feasibility = MIN(nlrow->
rhs - activity, activity - nlrow->
lhs);
2981 assert(nlrow != NULL);
2982 assert(stat != NULL);
2985 for( i = 0; i < nlrow->
nlinvars; ++i )
2987 assert(nlrow->
linvars[i] != NULL);
3012 for( i = 0; i < n; ++i )
3034 assert(nlrow != NULL);
3035 assert(stat != NULL);
3036 assert(pseudoactivity != NULL);
3062 assert(nlrow != NULL);
3063 assert(stat != NULL);
3064 assert(pseudofeasibility != NULL);
3067 *pseudofeasibility = MIN(nlrow->
rhs - pseudoactivity, pseudoactivity - nlrow->
lhs);
3085 assert(nlrow != NULL);
3086 assert(
set != NULL);
3087 assert(stat != NULL);
3088 assert(activity != NULL);
3091 for( i = 0; i < nlrow->
nlinvars; ++i )
3093 assert(nlrow->
linvars[i] != NULL);
3101 *activity += nlrow->
lincoefs[i] * val1;
3133 for( i = 0; i < n; ++i )
3151 *activity =
MAX(*activity, -inf);
3152 *activity = MIN(*activity, +inf);
3168 assert(nlrow != NULL);
3169 assert(feasibility != NULL);
3173 *feasibility = MIN(nlrow->
rhs - activity, activity - nlrow->
lhs);
3187 assert(nlrow != NULL);
3188 assert(
set != NULL);
3189 assert(stat != NULL);
3201 if( minactivity != NULL )
3203 if( maxactivity != NULL )
3220 assert(nlrow != NULL);
3221 assert(
set != NULL);
3222 assert(isredundant != NULL);
3226 *isredundant =
TRUE;
3229 *isredundant =
FALSE;
3239 assert(nlrow != NULL);
3249 assert(nlrow != NULL);
3259 assert(nlrow != NULL);
3269 assert(nlrow != NULL);
3279 assert(nlrow != NULL);
3289 assert(nlrow != NULL);
3302 assert(nlrow != NULL);
3303 assert(var != NULL);
3311 for( pos = nlrow->
nquadvars-1; pos >= 0; --pos )
3316 assert(pos == -1 || (pos < nlrow->nquadvars && nlrow->
quadvars[pos] == var));
3326 assert(nlrow != NULL);
3336 assert(nlrow != NULL);
3350 assert(nlrow != NULL);
3352 if( nquadvars != NULL )
3354 if( quadvars != NULL )
3356 if( nquadelems != NULL )
3358 if( quadelems != NULL )
3367 assert(nlrow != NULL);
3377 assert(nlrow != NULL);
3387 assert(nlrow != NULL);
3397 assert(nlrow != NULL);
3407 assert(nlrow != NULL);
3416 assert(nlrow != NULL);
3426 assert(nlrow != NULL);
3436 assert(nlrow != NULL);
3448 assert(nlrow != NULL);
3469 assert(nlp != NULL);
3470 assert(nlrow != NULL);
3512 assert(nlp != NULL);
3513 assert(blkmem != NULL);
3514 assert(
set != NULL);
3515 assert(nlrows != NULL || nnlrows == 0);
3520 for( j = 0; j < nnlrows; ++j )
3533 for( i = 0; i < nlrow->
nlinvars; ++i )
3546 for( i = 0; i < n; ++i )
3590 assert(nlp != NULL);
3591 assert(0 <= oldpos && oldpos < nlp->nnlrows);
3592 assert(0 <= newpos && newpos < nlp->nnlrows);
3593 assert(nlp->
nlrows[oldpos] != NULL);
3595 if( oldpos == newpos )
3613 assert(nlp != NULL);
3614 assert(blkmem != NULL);
3615 assert(
set != NULL);
3617 assert(pos < nlp->nnlrows);
3620 nlrow = nlp->
nlrows[pos];
3621 assert(nlrow != NULL);
3668 assert(nlp != NULL);
3669 assert(var != NULL);
3685 assert(nlp->
solver != NULL);
3725 assert(nlp != NULL);
3726 assert(var != NULL);
3746 if( nlp->
solver == NULL )
3761 assert(nlp->
solver != NULL);
3788 assert(nlp != NULL);
3789 assert(blkmem != NULL);
3790 assert(
set != NULL);
3791 assert(vars != NULL || nvars == 0);
3792 assert(!nlp->
indiving || nvars == 0);
3800 for( i = 0; i < nvars; ++i )
3848 nlp->
nvars += nvars;
3864 assert(nlp != NULL);
3865 assert(0 <= oldpos && oldpos < nlp->nvars);
3866 assert(0 <= newpos && newpos < nlp->nvars);
3867 assert(nlp->
vars[oldpos] != NULL);
3869 if( oldpos == newpos )
3873 nlp->
vars[newpos] = nlp->
vars[oldpos];
3904 assert(nlp != NULL);
3905 assert(blkmem != NULL);
3906 assert(
set != NULL);
3908 assert(pos < nlp->nvars);
3911 var = nlp->
vars[pos];
3912 assert(var != NULL);
3916 for( i = 0; i < nlp->
nnlrows; ++i )
3922 assert(nlrow != NULL);
3928 for( j = 0; j < nlrow->
nlinvars; ++j )
3929 assert( nlrow->
linvars[j] != var );
3949 assert(nlpipos < nlp->nvars_solver);
3987 assert(nlp != NULL);
3988 assert(var != NULL);
3994 for( i = 0; i < nlp->
nnlrows; ++i )
4019 assert(nlp != NULL);
4020 assert(
set != NULL);
4021 assert(nlrow != NULL);
4022 assert(linidxs != NULL);
4023 assert(quadelems != NULL);
4024 assert(nlinidxs != NULL);
4029 assert(nlrow->
linvars != NULL);
4034 for( i = 0; i < nlrow->
nlinvars; ++i )
4037 assert(var != NULL);
4042 assert((*linidxs)[i] >= 0);
4062 assert(var != NULL);
4078 (*quadelems)[i].idx1 = quadvarsidx[nlrow->
quadelems[i].
idx1];
4079 (*quadelems)[i].idx2 = quadvarsidx[nlrow->
quadelems[i].
idx2];
4080 if( (*quadelems)[i].idx1 > (*quadelems)[i].idx2 )
4082 int tmp = (*quadelems)[i].idx1;
4083 (*quadelems)[i].idx1 = (*quadelems)[i].idx2;
4084 (*quadelems)[i].idx2 = tmp;
4104 for( i = 0; i < n; ++i )
4107 assert(var != NULL);
4129 assert(nlp != NULL);
4130 assert(blkmem != NULL);
4131 assert(
set != NULL);
4143 assert(num <= nlp->sizevars_solver);
4157 assert(nlp != NULL);
4158 assert(blkmem != NULL);
4159 assert(
set != NULL);
4171 assert(num <= nlp->sizenlrows_solver);
4189 assert(nlp != NULL);
4190 assert(blkmem != NULL);
4191 assert(
set != NULL);
4205 assert(nlp->
solver != NULL);
4229 assert(rowset[j] <= j);
4235 else if( rowset[j] < j )
4281 assert(nlp != NULL);
4282 assert(blkmem != NULL);
4283 assert(
set != NULL);
4298 assert(nlp->
solver != NULL);
4322 assert(colset[i] <= i);
4328 else if( colset[i] < i)
4334 assert(varpos >= 0);
4335 assert(varpos < nlp->nvars);
4384 assert(nlp != NULL);
4385 assert(blkmem != NULL);
4386 assert(
set != NULL);
4396 for( i = 0; i < nlp->
nnlrows; ++i )
4402 assert(nlp->
solver != NULL);
4423 for( i = 0; i < nlp->
nnlrows; ++i )
4426 assert(nlrow != NULL);
4431 assert(c < nlp->nunflushednlrowadd);
4435 assert(linidxs[c] != NULL || nlrow->
nlinvars == 0);
4436 assert(quadelems[c] != NULL || nlrow->
nquadvars == 0);
4437 assert(nlidxs[c] != NULL || nlrow->
exprtree == NULL);
4442 lhss[c] = nlrow->
lhs;
4443 rhss[c] = nlrow->
rhs;
4451 if( rhss[c] < lhss[c] )
4465 names[c] = nlrow->
name;
4481 nlinvars, linidxs, lincoefs,
4482 nquadelems, quadelems,
4488 if( linidxs[c] != NULL )
4490 if( quadelems[c] != NULL )
4492 if( nlidxs[c] != NULL )
4529 assert(nlp != NULL);
4530 assert(blkmem != NULL);
4531 assert(
set != NULL);
4539 for( i = 0; i < nlp->
nvars; ++i )
4545 assert(nlp->
solver != NULL);
4559 for( i = 0; i < nlp->
nvars; ++i )
4564 assert(c < nlp->nunflushedvaradd);
4618 assert(nlp != NULL);
4619 assert(blkmem != NULL);
4620 assert(
set != NULL);
4628 assert(nlp->
solver != NULL);
4645 lincoefs[nz] = coef;
4650 nz, linindices, lincoefs,
4678 assert(nlp != NULL);
4679 assert(blkmem != NULL);
4680 assert(
set != NULL);
4681 assert(stat != NULL);
4683 if( nlp->
solver == NULL )
4693 assert(nlp->
solver != NULL);
4710 assert(nlpidx >= 0);
4711 assert(nlpidx < nlp->nvars);
4747 nlrowdualvals = NULL;
4748 varlbdualvals = NULL;
4749 varubdualvals = NULL;
4753 assert(primalvals != NULL || nlp->
nvars == 0);
4754 assert((varlbdualvals != NULL) == (varubdualvals != NULL));
4759 for( i = 0; i < nlp->
nvars; ++i )
4771 for( i = 0; i < nlp->
nvars; ++i )
4785 for( i = 0; i < nlp->
nnlrows; ++i )
4795 if( varlbdualvals != NULL )
4797 for( i = 0; i < nlp->
nvars; ++i )
4807 else if( nlp->
nvars > 0 )
4832 assert(nlp != NULL);
4833 assert(blkmem != NULL);
4834 assert(
set != NULL);
4835 assert(stat != NULL);
4839 SCIPsetDebugMsg(
set,
"calculating NLP fractional variables: validfracvars=%" SCIP_LONGINT_FORMAT
", nnlps=%" SCIP_LONGINT_FORMAT
"\n", nlp->
validfracvars, stat->
nnlps);
4847 SCIPsetDebugMsg(
set,
"NLP globally infeasible, unbounded, or worse -> no solution values -> no fractional variables\n");
4875 maxpriority = INT_MIN;
4878 for( i = 0; i < nlp->
nvars; ++i )
4881 assert(var != NULL);
4929 if( branchpriority > maxpriority )
4934 if( insertpos != 0 )
4942 maxpriority = branchpriority;
4944 else if( branchpriority == maxpriority )
4963 SCIPsetDebugMsg(
set,
" -> candidate %d: var=<%s>, sol=%g, frac=%g, prio=%d (max: %d) -> pos %d\n",
4984 assert(
scip != NULL);
4985 assert(eventhdlr != NULL);
4986 assert(event != NULL);
4987 assert(eventdata != NULL);
5042 assert(
set != NULL);
5053 NULL, NULL, NULL, NULL, NULL, NULL, NULL, eventExecNlp, NULL) );
5069 assert(nlp != NULL);
5070 assert(blkmem != NULL);
5071 assert(
set != NULL);
5072 assert(stat != NULL);
5073 assert(name != NULL);
5078 if( set->nnlpis > 0 )
5080 assert(set->nlp_solver != NULL);
5081 if( set->nlp_solver[0] ==
'\0' )
5083 assert(set->nlpis != NULL);
5086 if( !set->nlpissorted )
5089 (*nlp)->solver =
set->nlpis[0];
5094 if( (*nlp)->solver == NULL )
5096 SCIPerrorMessage(
"Selected NLP solver <%s> not available.\n", set->nlp_solver);
5100 assert((*nlp)->solver != NULL);
5107 (*nlp)->solver = NULL;
5108 (*nlp)->problem = NULL;
5112 (*nlp)->nunflushedvaradd = 0;
5113 (*nlp)->nunflushedvardel = 0;
5114 (*nlp)->nunflushednlrowadd = 0;
5115 (*nlp)->nunflushednlrowdel = 0;
5116 (*nlp)->isrelax =
TRUE;
5117 (*nlp)->indiving =
FALSE;
5121 (*nlp)->sizevars = 0;
5122 (*nlp)->vars = NULL;
5125 (*nlp)->nvars_solver = 0;
5126 (*nlp)->sizevars_solver = 0;
5127 (*nlp)->varmap_nlp2nlpi = NULL;
5128 (*nlp)->varmap_nlpi2nlp = NULL;
5131 (*nlp)->nnlrows = 0;
5132 (*nlp)->sizenlrows = 0;
5133 (*nlp)->nlrows = NULL;
5135 (*nlp)->nnlrows_solver = 0;
5136 (*nlp)->sizenlrows_solver = 0;
5137 (*nlp)->nlrowmap_nlpi2nlp = NULL;
5140 (*nlp)->objflushed =
TRUE;
5141 (*nlp)->divingobj = NULL;
5144 (*nlp)->haveinitguess =
FALSE;
5145 (*nlp)->initialguess = NULL;
5151 (*nlp)->varlbdualvals = NULL;
5152 (*nlp)->varubdualvals = NULL;
5156 if( (*nlp)->eventhdlr == NULL )
5163 (*nlp)->eventhdlr, (
SCIP_EVENTDATA*)(*nlp), &(*nlp)->globalfilterpos) );
5166 (*nlp)->fracvars = NULL;
5167 (*nlp)->fracvarssol = NULL;
5168 (*nlp)->fracvarsfrac = NULL;
5169 (*nlp)->nfracvars = 0;
5170 (*nlp)->npriofracvars = 0;
5171 (*nlp)->fracvarssize = 0;
5172 (*nlp)->validfracvars = -1;
5189 assert(nlp != NULL);
5190 assert(*nlp != NULL);
5191 assert(blkmem != NULL);
5192 assert(
set != NULL);
5202 (*nlp)->eventhdlr, (
SCIP_EVENTDATA*)(*nlp), (*nlp)->globalfilterpos) );
5205 assert((*nlp)->nnlrows == 0);
5206 assert((*nlp)->nnlrows_solver == 0);
5207 assert((*nlp)->nvars == 0);
5208 assert((*nlp)->nvars_solver == 0);
5209 assert((*nlp)->initialguess == NULL);
5226 if( (*nlp)->problem != NULL )
5250 assert(nlp != NULL);
5251 assert(blkmem != NULL);
5252 assert(
set != NULL);
5265 for(i = nlp->
nnlrows - 1; i >= 0; --i)
5270 for(i = nlp->
nvars - 1; i >= 0; --i)
5296 assert(nlp != NULL);
5297 assert(blkmem != NULL);
5298 assert(
set != NULL);
5317 assert(num <= nlp->sizevars);
5330 assert(nlp != NULL);
5331 assert(blkmem != NULL);
5332 assert(
set != NULL);
5333 assert(var != NULL);
5357 assert(nlp != NULL);
5358 assert(blkmem != NULL);
5359 assert(
set != NULL);
5360 assert(vars != NULL || nvars == 0);
5385 assert(nlp != NULL);
5386 assert(blkmem != NULL);
5387 assert(
set != NULL);
5388 assert(var != NULL);
5417 assert(nlp != NULL);
5418 assert(blkmem != NULL);
5419 assert(
set != NULL);
5431 assert(num <= nlp->sizenlrows);
5446 assert(nlp != NULL);
5447 assert(nlrow != NULL);
5471 assert(nlp != NULL);
5472 assert(nlrows != NULL || nnlrows == 0);
5497 assert(nlp != NULL);
5498 assert(blkmem != NULL);
5499 assert(
set != NULL);
5500 assert(nlrow != NULL);
5527 assert(nlp != NULL);
5528 assert(blkmem != NULL);
5529 assert(
set != NULL);
5566 assert(nlp != NULL);
5567 assert(blkmem != NULL);
5568 assert(
set != NULL);
5569 assert(stat != NULL);
5573 SCIPerrorMessage(
"cannot solve NLP during NLP diving (use SCIPsolveDiveNLP)\n");
5589 assert(nlp != NULL);
5602 assert(nlp != NULL);
5603 assert(pseudoobjval != NULL);
5614 *pseudoobjval = 0.0;
5615 for( i = 0; i < nlp->
nvars; ++i )
5636 assert(nlp != NULL);
5643 if( fracvars != NULL )
5645 if( fracvarssol != NULL )
5647 if( fracvarsfrac != NULL )
5649 if( nfracvars != NULL )
5651 if( npriofracvars != NULL )
5669 assert(nlp != NULL);
5670 assert(blkmem != NULL);
5671 assert(
set != NULL);
5672 assert(stat != NULL);
5686 for( i = 0; i < nlp->
nnlrows; ++i )
5710 assert(nlp != NULL);
5711 assert(blkmem != NULL);
5712 assert(nlp->
solver != NULL);
5716 if( initguess == NULL )
5747 assert(nlp != NULL);
5751 file = fopen(fname,
"w");
5767 for( i = 0; i < nlp->
nvars; ++i )
5773 for( i = 0; i < nlp->
nnlrows; ++i )
5792 assert(nlp != NULL);
5802 assert(nlp != NULL);
5818 assert(nlp != NULL);
5819 assert(nlcount != NULL || nlp->
nvars == 0);
5823 for( c = 0; c < nlp->
nnlrows; ++c )
5826 assert(nlrow != NULL);
5832 assert(varidx < nlp->nvars);
5843 assert(exprtreevars != NULL || nexprtreevars == 0);
5844 for( i = 0; i < nexprtreevars; ++i )
5853 assert(varidx < nlp->nvars);
5875 assert(nlp != NULL);
5877 for( c = 0; c < nlp->
nnlrows; ++c )
5880 assert(nlrow != NULL);
5893 assert(exprtreevars != NULL || nexprtreevars == 0);
5895 for( i = 0; i < nexprtreevars; ++i )
5909 assert(nlp != NULL);
5919 assert(nlp != NULL);
5929 assert(nlp != NULL);
5939 assert(nlp != NULL);
5949 assert(nlp != NULL);
5959 assert(nlp != NULL);
5969 assert(nlp != NULL);
5979 assert(nlp != NULL);
5989 assert(nlp != NULL);
6000 assert(nlp != NULL);
6001 assert(nlp->
solver != NULL);
6003 assert(statistics != NULL);
6016 assert(nlp != NULL);
6028 assert(nlp != NULL);
6029 assert(nlp->
solver != NULL);
6031 assert(ival != NULL);
6045 assert(nlp != NULL);
6046 assert(nlp->
solver != NULL);
6061 assert(nlp != NULL);
6062 assert(nlp->
solver != NULL);
6064 assert(dval != NULL);
6078 assert(nlp != NULL);
6079 assert(nlp->
solver != NULL);
6094 assert(nlp != NULL);
6095 assert(nlp->
solver != NULL);
6097 assert(sval != NULL);
6111 assert(nlp != NULL);
6112 assert(nlp->
solver != NULL);
6131 assert(nlp != NULL);
6139 if( nlp->
solver == NULL )
6166 assert(nlp != NULL);
6167 assert(
set != NULL);
6176 assert(nlp->
solver != NULL);
6183 for( i = 0; i < nlp->
nvars; ++i )
6228 assert(nlp != NULL);
6229 assert(var != NULL);
6232 assert(nlp->
solver != NULL);
6251 for( i = 0; i < nlp->
nvars; ++i )
6285 assert(nlp != NULL);
6286 assert(var != NULL);
6289 assert(nlp->
solver != NULL);
6316 assert(nlp != NULL);
6317 assert(vars != NULL || nvars == 0);
6319 assert(lbs != NULL || nvars == 0);
6320 assert(ubs != NULL || nvars == 0);
6321 assert(nlp->
solver != NULL);
6329 for( i = 0; i < nvars; ++i )
6336 assert(poss[i] >= 0);
SCIP_RETCODE SCIPnlpSetRealPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, SCIP_Real dval)
static SCIP_RETCODE nlrowRemoveFixedLinearCoefs(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
static SCIP_RETCODE nlrowLinearCoefChanged(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real coef, SCIP_NLP *nlp)
static int nlrowSearchQuadElem(SCIP_NLROW *nlrow, int idx1, int idx2)
SCIP_RETCODE SCIPnlpEnsureNlRowsSize(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
static SCIP_RETCODE nlpEnsureVarsSolverSize(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
SCIP_Longint validpsactivitydomchg
void SCIPexprFreeDeep(BMS_BLKMEM *blkmem, SCIP_EXPR **expr)
void SCIPquadelemSort(SCIP_QUADELEM *quadelems, int nquadelems)
static SCIP_RETCODE nlrowExprtreeChanged(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
SCIP_RETCODE SCIPnlrowGetPseudoFeasibility(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudofeasibility)
SCIP_RETCODE SCIPsetIncludeEventhdlr(SCIP_SET *set, SCIP_EVENTHDLR *eventhdlr)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
SCIP_RETCODE SCIPnlpiGetStatistics(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPSTATISTICS *statistics)
internal methods for managing events
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
SCIP_RETCODE SCIPnlrowPrint(SCIP_NLROW *nlrow, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
SCIP_RETCODE SCIPnlrowChgRhs(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real rhs)
internal methods for storing primal CIP solutions
#define SCIP_EVENTTYPE_OBJCHANGED
SCIP_Real * SCIPnlpGetVarsLbDualsol(SCIP_NLP *nlp)
SCIP_RETCODE SCIPexprtreeEvalInt(SCIP_EXPRTREE *tree, SCIP_Real infinity, SCIP_INTERVAL *varvals, SCIP_INTERVAL *val)
SCIP_RETCODE SCIPvarSetNLPSol(SCIP_VAR *var, SCIP_SET *set, SCIP_Real solval)
SCIP_RETCODE SCIPeventhdlrCreate(SCIP_EVENTHDLR **eventhdlr, const char *name, const char *desc, SCIP_DECL_EVENTCOPY((*eventcopy)), SCIP_DECL_EVENTFREE((*eventfree)), SCIP_DECL_EVENTINIT((*eventinit)), SCIP_DECL_EVENTEXIT((*eventexit)), SCIP_DECL_EVENTINITSOL((*eventinitsol)), SCIP_DECL_EVENTEXITSOL((*eventexitsol)), SCIP_DECL_EVENTDELETE((*eventdelete)), SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
#define SCIP_EVENTTYPE_VARFIXED
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
void SCIPexprtreePrint(SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char **varnames, const char **paramnames)
static int nlrowSearchLinearCoef(SCIP_NLROW *nlrow, SCIP_VAR *var)
SCIP_NLPI * SCIPsetFindNlpi(SCIP_SET *set, const char *name)
static SCIP_RETCODE nlpUpdateVarBounds(SCIP_NLP *nlp, SCIP_SET *set, SCIP_VAR *var, SCIP_Bool tightened)
int SCIPnlrowSearchQuadVar(SCIP_NLROW *nlrow, SCIP_VAR *var)
SCIP_Real SCIPsetFeastol(SCIP_SET *set)
static SCIP_RETCODE nlrowAddQuadElement(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_QUADELEM elem)
SCIP_RETCODE SCIPnlrowAddQuadElement(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_QUADELEM elem)
void SCIPnlrowCapture(SCIP_NLROW *nlrow)
static SCIP_RETCODE nlpSetupNlpiIndices(SCIP_NLP *nlp, SCIP_SET *set, SCIP_NLROW *nlrow, int **linidxs, SCIP_QUADELEM **quadelems, int **nlinidxs)
SCIP_Bool SCIPnlpIsDiving(SCIP_NLP *nlp)
static SCIP_RETCODE nlrowQuadElemChanged(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_QUADELEM quadelem, SCIP_NLP *nlp)
SCIP_RETCODE SCIPnlrowRelease(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set)
internal methods for clocks and timing issues
static SCIP_RETCODE nlrowChgQuadElemPos(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos, SCIP_Real coef)
SCIP_EVENTHDLR * SCIPsetFindEventhdlr(SCIP_SET *set, const char *name)
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
int SCIProwGetNNonz(SCIP_ROW *row)
static SCIP_RETCODE nlpFlushNlRowAdditions(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_RETCODE SCIPeventfilterDel(SCIP_EVENTFILTER *eventfilter, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
internal methods for NLPI solver interfaces
SCIP_RETCODE SCIPnlrowEnsureQuadVarsSize(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
SCIP_RETCODE SCIPnlpiSetStringPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, const char *sval)
SCIP_RETCODE SCIPnlpiCreateProblem(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM **problem, const char *name)
SCIP_Real * SCIPexprtreeGetParamVals(SCIP_EXPRTREE *tree)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
SCIP_RETCODE SCIPnlpiGetSolution(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_Real **primalvalues, SCIP_Real **consdualvalues, SCIP_Real **varlbdualvalues, SCIP_Real **varubdualvalues, SCIP_Real *objval)
SCIP_RETCODE SCIPnlpiDelVarSet(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int *dstats, int dstatssize)
SCIP_HASHMAP * quadvarshash
SCIP_Real SCIPvarGetBestBoundLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPnlpGetStatistics(SCIP_NLP *nlp, SCIP_NLPSTATISTICS *statistics)
data definitions for expressions and expression trees
SCIP_RETCODE SCIPvarCatchEvent(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_NLPIPROBLEM * problem
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
static SCIP_RETCODE nlpFlushVarDeletions(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_RETCODE SCIPnlpSolveDive(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_RETCODE SCIPnlpGetVarsNonlinearity(SCIP_NLP *nlp, int *nlcount)
SCIP_RETCODE SCIPnlpiAddConstraints(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, 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 **names)
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
static SCIP_RETCODE nlrowRemoveFixedVar(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var)
SCIP_Bool SCIPsetIsZero(SCIP_SET *set, SCIP_Real val)
static SCIP_RETCODE nlpCalcFracVars(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
SCIP_RETCODE SCIPnlrowEnsureQuadElementsSize(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPnlpCreate(SCIP_NLP **nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, const char *name, int nvars_estimate)
SCIP_RETCODE SCIPnlpChgVarsBoundsDive(SCIP_NLP *nlp, SCIP_SET *set, int nvars, SCIP_VAR **vars, SCIP_Real *lbs, SCIP_Real *ubs)
SCIP_RETCODE SCIPexprtreeCopy(BMS_BLKMEM *blkmem, SCIP_EXPRTREE **targettree, SCIP_EXPRTREE *sourcetree)
#define SCIPsetAllocBufferArray(set, ptr, num)
int SCIPnlrowGetNQuadVars(SCIP_NLROW *nlrow)
SCIP_Real SCIPnlrowGetRhs(SCIP_NLROW *nlrow)
datastructures for NLP management
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
SCIP_RETCODE SCIPnlpGetPseudoObjval(SCIP_NLP *nlp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudoobjval)
void SCIPexprReindexVars(SCIP_EXPR *expr, int *newindices)
void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
int SCIPnlrowGetNLinearVars(SCIP_NLROW *nlrow)
SCIP_NLPTERMSTAT SCIPnlpGetTermstat(SCIP_NLP *nlp)
#define BMSallocMemoryArray(ptr, num)
SCIP_RETCODE SCIPexprtreeSetVars(SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPnlrowChgExprtreeParams(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *paramvals)
SCIP_RETCODE SCIPnlpReset(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
static SCIP_RETCODE nlrowConstantChanged(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
SCIP_EXPRCURV SCIPnlrowGetCurvature(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPnlpiChgVarBounds(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nvars, const int *indices, const SCIP_Real *lbs, const SCIP_Real *ubs)
enum SCIP_NlpParam SCIP_NLPPARAM
SCIP_QUADELEM * quadelems
SCIP_RETCODE SCIPnlrowEnsureLinearSize(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPnlpGetIntPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, int *ival)
SCIP_Bool SCIPquadelemSortedFind(SCIP_QUADELEM *quadelems, int idx1, int idx2, int nquadelems, int *pos)
#define SCIPsetFreeBufferArray(set, ptr)
#define BMSfreeMemory(ptr)
void SCIPnlrowGetQuadData(SCIP_NLROW *nlrow, int *nquadvars, SCIP_VAR ***quadvars, int *nquadelems, SCIP_QUADELEM **quadelems)
void SCIPexprtreeSetParamVal(SCIP_EXPRTREE *tree, int paramidx, SCIP_Real paramval)
#define SCIP_EVENTTYPE_BOUNDCHANGED
int SCIPnlrowGetNLPPos(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPnlrowChgQuadElem(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_QUADELEM elem)
SCIP_Bool SCIPsetIsFeasFracIntegral(SCIP_SET *set, SCIP_Real val)
SCIP_VAR ** SCIPexprtreeGetVars(SCIP_EXPRTREE *tree)
static void nlrowSortQuadElem(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPnlrowChgLhs(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real lhs)
SCIP_Longint validfracvars
SCIP_RETCODE SCIPnlrowGetNLPFeasibility(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *feasibility)
SCIP_RETCODE SCIPnlpDelNlRow(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_NLROW *nlrow)
SCIP_Real SCIPsolGetVal(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var)
int SCIPnlrowGetNQuadElems(SCIP_NLROW *nlrow)
public methods for expressions, expression trees, expression graphs, and related stuff ...
SCIP_Longint validactivitybdsdomchg
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPexprtreePrintWithNames(SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
static SCIP_RETCODE nlrowChgLinearCoefPos(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos, SCIP_Real coef)
SCIP_RETCODE SCIPnlpiSolve(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
SCIP_RETCODE SCIPnlrowAddQuadVar(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var)
SCIP_RETCODE SCIPnlpiGetStringPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, const char **sval)
SCIP_Real * varubdualvals
static SCIP_RETCODE nlpSolve(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat)
SCIP_RETCODE SCIPnlpiAddVars(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nvars, const SCIP_Real *lbs, const SCIP_Real *ubs, const char **varnames)
SCIP_RETCODE SCIPnlpStartDive(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
static SCIP_RETCODE nlpFlushVarAdditions(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_Bool quadelemssorted
SCIP_Bool SCIPnlpHasContinuousNonlinearity(SCIP_NLP *nlp)
static SCIP_RETCODE nlrowRemoveFixedExprtreeVars(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
SCIP_Bool SCIPnlpIsDivingObjChanged(SCIP_NLP *nlp)
SCIP_Bool SCIPnlrowIsInNLP(SCIP_NLROW *nlrow)
static SCIP_RETCODE nlrowRemoveFixedQuadVars(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
static SCIP_RETCODE nlpMoveVar(SCIP_NLP *nlp, int oldpos, int newpos)
SCIP_VAR ** SCIPnlrowGetQuadVars(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPnlpAddVars(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int nvars, SCIP_VAR **vars)
static SCIP_RETCODE nlrowDelQuadElemPos(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos)
#define BMSduplicateBlockMemoryArray(mem, ptr, source, num)
SCIP_Bool SCIPintervalIsEntire(SCIP_Real infinity, SCIP_INTERVAL operand)
SCIP_RETCODE SCIPeventfilterAdd(SCIP_EVENTFILTER *eventfilter, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
#define BMSfreeMemoryArray(ptr)
internal methods for storing and manipulating the main problem
interval arithmetics for provable bounds
SCIP_RETCODE SCIPnlrowChgLinearCoef(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real coef)
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
SCIP_RETCODE SCIPnlpGetRealPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, SCIP_Real *dval)
SCIP_EVENTHDLR * eventhdlr
SCIP_RETCODE SCIPvarRelease(SCIP_VAR **var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
SCIP_Real * varlbdualvals
SCIP_RETCODE SCIPnlrowGetPseudoActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *pseudoactivity)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
SCIP_RETCODE SCIPnlrowDelLinearCoef(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var)
int SCIPnlpGetNNlRows(SCIP_NLP *nlp)
SCIP_Bool SCIPsortedvecFindPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
static SCIP_RETCODE nlpFlushObjective(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_Real SCIPnlpGetObjval(SCIP_NLP *nlp)
static void nlpMoveNlrow(SCIP_NLP *nlp, int oldpos, int newpos)
SCIP_NLROW ** SCIPnlpGetNlRows(SCIP_NLP *nlp)
SCIP_RETCODE SCIPnlrowGetSolFeasibility(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Real *feasibility)
struct SCIP_EventData SCIP_EVENTDATA
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPnlrowGetDualsol(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPnlrowDelQuadElement(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int idx1, int idx2)
internal methods for NLP management
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
SCIP_RETCODE SCIPnlpSetIntPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, int ival)
static SCIP_RETCODE nlpRowChanged(SCIP_NLP *nlp, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLROW *nlrow)
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
SCIP_Bool SCIPsetIsRelLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPnlpEnsureVarsSize(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
int SCIPexprtreeGetNVars(SCIP_EXPRTREE *tree)
SCIP_RETCODE SCIPnlpiChgConsSides(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nconss, const int *indices, const SCIP_Real *lhss, const SCIP_Real *rhss)
SCIP_QUADELEM * SCIPnlrowGetQuadElems(SCIP_NLROW *nlrow)
static SCIP_RETCODE nlpEnsureNlRowsSolverSize(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
internal methods for global SCIP settings
SCIP_RETCODE SCIPnlpiSetInitialGuess(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_Real *primalvalues, SCIP_Real *consdualvalues, SCIP_Real *varlbdualvalues, SCIP_Real *varubdualvalues)
SCIP main data structure.
SCIP_Bool SCIPsetIsFeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetMultaggrConstant(SCIP_VAR *var)
static SCIP_RETCODE nlpDelNlRowPos(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int pos)
static SCIP_RETCODE nlrowRemoveFixedLinearCoefPos(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos)
SCIP_RETCODE SCIPnlpSetInitialGuess(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_Real *initguess)
void SCIPintervalSet(SCIP_INTERVAL *resultant, SCIP_Real value)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
SCIP_RETCODE SCIPnlrowCreateFromRow(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_ROW *row)
SCIP_Bool SCIPsetIsEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPnlpChgVarObjDive(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real coef)
SCIP_RETCODE SCIPvarPrint(SCIP_VAR *var, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
SCIP_RETCODE SCIPnlrowChgConstant(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real constant)
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
SCIP_RETCODE SCIPnlpChgVarBoundsDive(SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real lb, SCIP_Real ub)
SCIP_NLPTERMSTAT termstat
SCIP_Bool SCIPsetIsFeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_RETCODE SCIPnlrowChgExprtreeParam(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int paramidx, SCIP_Real paramval)
SCIP_NLPSOLSTAT SCIPnlpiGetSolstat(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
SCIP_RETCODE SCIPnlpiSetObjective(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nlins, const int *lininds, const SCIP_Real *linvals, int nquadelems, const SCIP_QUADELEM *quadelems, const int *exprvaridxs, const SCIP_EXPRTREE *exprtree, const SCIP_Real constant)
static SCIP_RETCODE nlpAddVars(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, int nvars, SCIP_VAR **vars)
SCIP_RETCODE SCIPnlpiDelConsSet(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int *dstats, int dstatssize)
SCIP_RETCODE SCIPexprtreeRemoveFixedVars(SCIP_EXPRTREE *tree, SCIP_SET *set, SCIP_Bool *changed, int *varpos, int *newvarsstart)
static SCIP_RETCODE nlrowSideChanged(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
#define BMSfreeBlockMemory(mem, ptr)
internal methods for problem variables
SCIP_RETCODE SCIPnlpWrite(SCIP_NLP *nlp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *fname)
static SCIP_DECL_EVENTEXEC(eventExecNlp)
SCIP_RETCODE SCIPnlpiFreeProblem(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM **problem)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
public data structures and miscellaneous methods
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_RETCODE SCIPnlpEndDive(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
void SCIPvarCapture(SCIP_VAR *var)
static SCIP_RETCODE nlrowAddLinearCoef(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real coef)
#define BMSallocBlockMemoryArray(mem, ptr, num)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
static void nlrowSortLinear(SCIP_NLROW *nlrow)
SCIP_Bool SCIPnlpHasCurrentNodeNLP(SCIP_NLP *nlp)
SCIP_NLPSOLSTAT SCIPnlpGetSolstat(SCIP_NLP *nlp)
SCIP_RETCODE SCIPnlrowCreate(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvars, SCIP_VAR **quadvars, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_EXPRTREE *exprtree, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
SCIP_Real SCIPvarGetNLPSol(SCIP_VAR *var)
int SCIPvarGetBranchPriority(SCIP_VAR *var)
SCIP_RETCODE SCIPnlpiSetIntPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, int ival)
SCIP_RETCODE SCIPnlpAddNlRow(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLROW *nlrow)
static SCIP_RETCODE nlpDelVarPos(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, int pos)
SCIP_RETCODE SCIPnlpFlush(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
SCIP_NLPTERMSTAT SCIPnlpiGetTermstat(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
void SCIPsetSortNlpis(SCIP_SET *set)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
public methods for LP management
SCIP_RETCODE SCIPnlpiChgNonlinCoef(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int considx, int paramidx, SCIP_Real value)
SCIP_RETCODE SCIPexprCreate(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, SCIP_EXPROP op,...)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPexprtreeFree(SCIP_EXPRTREE **tree)
SCIP_RETCODE SCIPnlrowGetNLPActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_Real *activity)
SCIP_RETCODE SCIPnlpiChgQuadCoefs(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int idx, int nquadelems, const SCIP_QUADELEM *quadelems)
void SCIPintervalAdd(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
SCIP_RETCODE SCIPnlrowChgExprtree(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_EXPRTREE *exprtree)
SCIP_RETCODE SCIPexprtreeAddVars(SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)
#define BMScopyMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPnlrowRemoveFixedVars(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
int SCIPnlpGetNVars(SCIP_NLP *nlp)
SCIP_RETCODE SCIPnlrowGetActivityBounds(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *minactivity, SCIP_Real *maxactivity)
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)
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
SCIP_Bool SCIPsetIsFeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPnlrowGetSolActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Real *activity)
SCIP_Real SCIPsetFeasFrac(SCIP_SET *set, SCIP_Real val)
SCIP_RETCODE SCIPnlpSolve(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat)
static SCIP_RETCODE nlpFlushNlRowDeletions(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_RETCODE SCIPnlpDelVar(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_VAR *var)
SCIP_EXPRTREE * SCIPnlrowGetExprtree(SCIP_NLROW *nlrow)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
enum SCIP_ExprCurv SCIP_EXPRCURV
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPnlrowAddLinearCoef(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real val)
static SCIP_RETCODE nlrowDelLinearCoefPos(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, int pos)
SCIP_NLPIPROBLEM * SCIPnlpGetNLPIProblem(SCIP_NLP *nlp)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
static SCIP_RETCODE nlrowSetupQuadVarsHash(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPnlrowFree(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPnlpFree(SCIP_NLP **nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
#define SCIP_EVENTTYPE_FORMAT
static void nlrowMoveQuadElement(SCIP_NLROW *nlrow, int oldpos, int newpos)
SCIP_RETCODE SCIPnlrowRecalcNLPActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp)
public methods for message output
static SCIP_RETCODE nlpUpdateObjCoef(SCIP_NLP *nlp, SCIP_VAR *var)
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
internal methods for problem statistics
static SCIP_RETCODE nlpRemoveFixedVar(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_VAR *var)
static SCIP_RETCODE nlrowExprtreeParamChanged(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, int paramidx, SCIP_NLP *nlp)
void SCIPintervalMulScalar(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_Real operand2)
SCIP_Real SCIPsetDualfeastol(SCIP_SET *set)
static SCIP_RETCODE nlrowCalcActivityBounds(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat)
#define BMSallocMemory(ptr)
SCIP_RETCODE SCIPnlpAddNlRows(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, int nnlrows, SCIP_NLROW **nlrows)
SCIP_NLPI * SCIPnlpGetNLPI(SCIP_NLP *nlp)
void SCIPsortPtrReal(void **ptrarray, SCIP_Real *realarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
SCIP_RETCODE SCIPexprtreeSubstituteVars(SCIP_EXPRTREE *tree, SCIP_EXPR **substexprs)
SCIP_RETCODE SCIPnlpSetStringPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, const char *sval)
SCIP_VAR ** SCIPnlpGetVars(SCIP_NLP *nlp)
SCIP_RETCODE SCIPnlpiChgLinearCoefs(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, const int idx, int nvals, const int *varidxs, const SCIP_Real *vals)
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
int SCIPexprtreeGetNParams(SCIP_EXPRTREE *tree)
SCIP_RETCODE SCIPnlpiChgExprtree(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int idxcons, const int *exprvaridxs, const SCIP_EXPRTREE *exprtree)
SCIP_RETCODE SCIPnlpGetStringPar(SCIP_NLP *nlp, SCIP_NLPPARAM type, const char **sval)
SCIP_Real * SCIPnlrowGetLinearCoefs(SCIP_NLROW *nlrow)
static SCIP_RETCODE nlrowAddToLinearCoef(SCIP_NLROW *nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_NLP *nlp, SCIP_VAR *var, SCIP_Real coef, SCIP_Bool removefixed)
SCIP_RETCODE SCIPnlpiGetIntPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, int *ival)
const char * SCIPnlrowGetName(SCIP_NLROW *nlrow)
static SCIP_RETCODE nlpAddNlRows(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, int nnlrows, SCIP_NLROW **nlrows)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
#define BMSallocBlockMemory(mem, ptr)
int SCIPexprtreeFindVar(SCIP_EXPRTREE *tree, SCIP_VAR *var)
SCIP_VAR ** SCIPnlrowGetLinearVars(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPvarDropEvent(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
#define BMSclearMemoryArray(ptr, num)
SCIP_Real * SCIPnlpGetVarsUbDualsol(SCIP_NLP *nlp)
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
SCIP_Real SCIPnlrowGetConstant(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPnlpInclude(SCIP_SET *set, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPvarGetProbvarSum(SCIP_VAR **var, SCIP_SET *set, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_RETCODE SCIPnlpRemoveRedundantNlRows(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
SCIP_RETCODE SCIPexprCreateLinear(BMS_BLKMEM *blkmem, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real *coefs, SCIP_Real constant)
SCIP_RETCODE SCIPnlpiGetRealPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, SCIP_Real *dval)
SCIP_Real SCIPnlrowGetLhs(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPnlrowRecalcPseudoActivity(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat)
SCIP_Real primalsolobjval
SCIP_RETCODE SCIPexprtreeSetParams(SCIP_EXPRTREE *tree, int nparams, SCIP_Real *paramvals)
static void nlrowMoveLinearCoef(SCIP_NLROW *nlrow, int oldpos, int newpos)
SCIP_RETCODE SCIPnlrowIsRedundant(SCIP_NLROW *nlrow, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool *isredundant)
SCIP_RETCODE SCIPnlpAddVar(SCIP_NLP *nlp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var)
#define SCIP_EVENTTYPE_VARADDED
SCIP_Bool SCIPnlpHasSolution(SCIP_NLP *nlp)
datastructures for global SCIP settings
void SCIPnlrowSetCurvature(SCIP_NLROW *nlrow, SCIP_EXPRCURV curvature)
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
SCIP_RETCODE SCIPnlrowCreateCopy(SCIP_NLROW **nlrow, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_NLROW *sourcenlrow)
#define SCIP_EVENTTYPE_VARDELETED
SCIP_Longint validactivitynlp
SCIP_Bool SCIPsetIsFeasNegative(SCIP_SET *set, SCIP_Real val)
SCIP_RETCODE SCIPexprtreeEval(SCIP_EXPRTREE *tree, SCIP_Real *varvals, SCIP_Real *val)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_RETCODE SCIPnlpiSetRealPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, SCIP_Real dval)
void SCIPintervalQuad(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_Real sqrcoeff, SCIP_INTERVAL lincoeff, SCIP_INTERVAL xrng)