96#define CONSHDLR_NAME "linear"
97#define CONSHDLR_DESC "linear constraints of the form lhs <= a^T x <= rhs"
98#define CONSHDLR_SEPAPRIORITY +100000
99#define CONSHDLR_ENFOPRIORITY -1000000
100#define CONSHDLR_CHECKPRIORITY -1000000
101#define CONSHDLR_SEPAFREQ 0
102#define CONSHDLR_PROPFREQ 1
103#define CONSHDLR_EAGERFREQ 100
105#define CONSHDLR_MAXPREROUNDS -1
106#define CONSHDLR_DELAYSEPA FALSE
107#define CONSHDLR_DELAYPROP FALSE
108#define CONSHDLR_NEEDSCONS TRUE
110#define CONSHDLR_PRESOLTIMING (SCIP_PRESOLTIMING_FAST | SCIP_PRESOLTIMING_EXHAUSTIVE)
111#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
113#define EVENTHDLR_NAME "linear"
114#define EVENTHDLR_DESC "bound change event handler for linear constraints"
116#define CONFLICTHDLR_NAME "linear"
117#define CONFLICTHDLR_DESC "conflict handler creating linear constraints"
118#define CONFLICTHDLR_PRIORITY -1000000
120#define DEFAULT_TIGHTENBOUNDSFREQ 1
121#define DEFAULT_MAXROUNDS 5
122#define DEFAULT_MAXROUNDSROOT -1
123#define DEFAULT_MAXSEPACUTS 50
124#define DEFAULT_MAXSEPACUTSROOT 200
125#define DEFAULT_PRESOLPAIRWISE TRUE
126#define DEFAULT_PRESOLUSEHASHING TRUE
127#define DEFAULT_NMINCOMPARISONS 200000
128#define DEFAULT_MINGAINPERNMINCOMP 1e-06
130#define DEFAULT_SORTVARS TRUE
132#define DEFAULT_CHECKRELMAXABS FALSE
134#define DEFAULT_MAXAGGRNORMSCALE 0.0
136#define DEFAULT_MAXEASYACTIVITYDELTA 1e6
138#define DEFAULT_MAXCARDBOUNDDIST 0.0
140#define DEFAULT_SEPARATEALL FALSE
142#define DEFAULT_AGGREGATEVARIABLES TRUE
143#define DEFAULT_SIMPLIFYINEQUALITIES TRUE
144#define DEFAULT_DUALPRESOLVING TRUE
145#define DEFAULT_SINGLETONSTUFFING TRUE
146#define DEFAULT_SINGLEVARSTUFFING FALSE
148#define DEFAULT_DETECTCUTOFFBOUND TRUE
151#define DEFAULT_DETECTLOWERBOUND TRUE
154#define DEFAULT_DETECTPARTIALOBJECTIVE TRUE
156#define DEFAULT_RANGEDROWPROPAGATION TRUE
157#define DEFAULT_RANGEDROWARTCONS TRUE
158#define DEFAULT_RANGEDROWMAXDEPTH INT_MAX
159#define DEFAULT_RANGEDROWFREQ 1
161#define DEFAULT_MULTAGGRREMOVE FALSE
163#define DEFAULT_MAXMULTAGGRQUOT 1e+03
164#define DEFAULT_MAXDUALMULTAGGRQUOT 1e+20
165#define DEFAULT_EXTRACTCLIQUES TRUE
167#define MAXDNOM 10000LL
168#define MAXSCALEDCOEF 0
169#define MAXSCALEDCOEFINTEGER 0
172#define MAXACTVAL 1e+09
176#define MAXVALRECOMP 1e+06
177#define MINVALRECOMP 1e-05
180#define NONLINCONSUPGD_PRIORITY 1000000
198 SCIP_Real lastminactivity;
200 SCIP_Real lastmaxactivity;
206 SCIP_Real lastglbminactivity;
208 SCIP_Real lastglbmaxactivity;
210 SCIP_Real maxactdelta;
212 uint64_t possignature;
213 uint64_t negsignature;
219 int minactivityneginf;
220 int minactivityposinf;
221 int maxactivityneginf;
222 int maxactivityposinf;
223 int minactivityneghuge;
224 int minactivityposhuge;
225 int maxactivityneghuge;
226 int maxactivityposhuge;
227 int glbminactivityneginf;
228 int glbminactivityposinf;
229 int glbmaxactivityneginf;
230 int glbmaxactivityposinf;
231 int glbminactivityneghuge;
232 int glbminactivityposhuge;
233 int glbmaxactivityneghuge;
234 int glbmaxactivityposhuge;
240 unsigned int boundstightened:2;
241 unsigned int rangedrowpropagated:2;
243 unsigned int validmaxabsval:1;
244 unsigned int validminabsval:1;
245 unsigned int validactivities:1;
246 unsigned int validminact:1;
247 unsigned int validmaxact:1;
248 unsigned int validglbminact:1;
249 unsigned int validglbmaxact:1;
250 unsigned int presolved:1;
251 unsigned int removedfixings:1;
252 unsigned int validsignature:1;
253 unsigned int changed:1;
254 unsigned int normalized:1;
255 unsigned int upgradetried:1;
256 unsigned int upgraded:1;
257 unsigned int indexsorted:1;
258 unsigned int merged:1;
259 unsigned int cliquesadded:1;
260 unsigned int implsadded:1;
261 unsigned int coefsorted:1;
262 unsigned int varsdeleted:1;
263 unsigned int hascontvar:1;
264 unsigned int hasnonbinvar:1;
265 unsigned int hasnonbinvalid:1;
266 unsigned int checkabsolute:1;
278struct SCIP_ConshdlrData
282 SCIP_Real maxaggrnormscale;
284 SCIP_Real maxcardbounddist;
286 SCIP_Real mingainpernmincomp;
287 SCIP_Real maxeasyactivitydelta;
289 int linconsupgradessize;
290 int nlinconsupgrades;
291 int tightenboundsfreq;
298 SCIP_Bool presolpairwise;
299 SCIP_Bool presolusehashing;
300 SCIP_Bool separateall;
302 SCIP_Bool aggregatevariables;
303 SCIP_Bool simplifyinequalities;
304 SCIP_Bool dualpresolving;
305 SCIP_Bool singletonstuffing;
306 SCIP_Bool singlevarstuffing;
309 SCIP_Bool checkrelmaxabs;
311 SCIP_Bool detectcutoffbound;
314 SCIP_Bool detectlowerbound;
317 SCIP_Bool detectpartialobjective;
319 SCIP_Bool rangedrowpropagation;
322 SCIP_Bool rangedrowartcons;
323 int rangedrowmaxdepth;
325 SCIP_Bool multaggrremove;
327 SCIP_Real maxmultaggrquot;
328 SCIP_Real maxdualmultaggrquot;
329 SCIP_Bool extractcliques;
364 unsigned int proprule:8;
380 inferinfo.val.asint =
i;
391 return inferinfo.val.asint;
400 return (
int) inferinfo.val.asbits.proprule;
409 return (
int) inferinfo.val.asbits.pos;
425 inferinfo.val.asbits.proprule = (
unsigned int) proprule;
426 inferinfo.val.asbits.pos = (
unsigned int) pos;
456 assert(conshdlrdata->nlinconsupgrades <= conshdlrdata->linconsupgradessize);
458 if( num > conshdlrdata->linconsupgradessize )
464 conshdlrdata->linconsupgradessize = newsize;
466 assert(num <= conshdlrdata->linconsupgradessize);
481 assert(consdata->nvars <= consdata->varssize);
483 if( num > consdata->varssize )
490 if( consdata->eventdata !=
NULL )
494 consdata->varssize = newsize;
496 assert(num <= consdata->varssize);
520 (*linconsupgrade)->linconsupgd = linconsupgd;
521 (*linconsupgrade)->priority = priority;
522 (*linconsupgrade)->active =
TRUE;
554 (*conshdlrdata)->linconsupgrades =
NULL;
555 (*conshdlrdata)->linconsupgradessize = 0;
556 (*conshdlrdata)->nlinconsupgrades = 0;
557 (*conshdlrdata)->naddconss = 0;
560 (*conshdlrdata)->eventhdlr = eventhdlr;
578 for(
i = 0;
i < (*conshdlrdata)->nlinconsupgrades; ++
i )
593 const char* conshdlrname
603 for(
i = conshdlrdata->nlinconsupgrades - 1;
i >= 0; --
i )
605 if( conshdlrdata->linconsupgrades[
i]->linconsupgd == linconsupgd )
608 SCIPwarningMessage(
scip,
"Try to add already known upgrade message for constraint handler %s.\n", conshdlrname);
633 for(
i = conshdlrdata->nlinconsupgrades;
634 i > 0 && conshdlrdata->linconsupgrades[
i-1]->priority < linconsupgrade->
priority; --
i )
636 conshdlrdata->linconsupgrades[
i] = conshdlrdata->linconsupgrades[
i-1];
639 conshdlrdata->linconsupgrades[
i] = linconsupgrade;
640 conshdlrdata->nlinconsupgrades++;
741 consdata->eventdata[pos]->cons = cons;
742 consdata->eventdata[pos]->varpos = pos;
747 eventhdlr, consdata->eventdata[pos], &consdata->eventdata[pos]->filterpos) );
749 consdata->removedfixings = consdata->removedfixings &&
SCIPvarIsActive(consdata->vars[pos]);
776 assert(consdata->eventdata[pos]->cons == cons);
777 assert(consdata->eventdata[pos]->varpos == pos);
782 eventhdlr, consdata->eventdata[pos], consdata->eventdata[pos]->filterpos) );
813 for(
i = 0;
i < consdata->nvars; ++
i )
840 for(
i = consdata->nvars - 1;
i >= 0; --
i )
890 (*consdata)->varssize = 0;
891 (*consdata)->nvars =
nvars;
892 (*consdata)->hascontvar =
FALSE;
893 (*consdata)->hasnonbinvar =
FALSE;
894 (*consdata)->hasnonbinvalid =
TRUE;
895 (*consdata)->vars =
NULL;
896 (*consdata)->vals =
NULL;
904 SCIP_Real* valsbuffer;
912 for( v = 0; v <
nvars; ++v )
935 if( !(*consdata)->hascontvar )
941 (*consdata)->hasnonbinvar =
TRUE;
944 (*consdata)->hascontvar =
TRUE;
950 (*consdata)->nvars = k;
957 (*consdata)->varssize = k;
964 (*consdata)->eventdata =
NULL;
976 (*consdata)->row =
NULL;
977 (*consdata)->nlrow =
NULL;
978 (*consdata)->lhs = lhs;
979 (*consdata)->rhs = rhs;
987 (*consdata)->maxactdeltavar =
NULL;
988 (*consdata)->minactivityneginf = -1;
989 (*consdata)->minactivityposinf = -1;
990 (*consdata)->maxactivityneginf = -1;
991 (*consdata)->maxactivityposinf = -1;
992 (*consdata)->minactivityneghuge = -1;
993 (*consdata)->minactivityposhuge = -1;
994 (*consdata)->maxactivityneghuge = -1;
995 (*consdata)->maxactivityposhuge = -1;
1000 (*consdata)->glbminactivityneginf = -1;
1001 (*consdata)->glbminactivityposinf = -1;
1002 (*consdata)->glbmaxactivityneginf = -1;
1003 (*consdata)->glbmaxactivityposinf = -1;
1004 (*consdata)->glbminactivityneghuge = -1;
1005 (*consdata)->glbminactivityposhuge = -1;
1006 (*consdata)->glbmaxactivityneghuge = -1;
1007 (*consdata)->glbmaxactivityposhuge = -1;
1008 (*consdata)->possignature = 0;
1009 (*consdata)->negsignature = 0;
1010 (*consdata)->validmaxabsval =
FALSE;
1011 (*consdata)->validminabsval =
FALSE;
1012 (*consdata)->validactivities =
FALSE;
1013 (*consdata)->validminact =
FALSE;
1014 (*consdata)->validmaxact =
FALSE;
1015 (*consdata)->validglbminact =
FALSE;
1016 (*consdata)->validglbmaxact =
FALSE;
1017 (*consdata)->boundstightened = 0;
1018 (*consdata)->presolved =
FALSE;
1019 (*consdata)->removedfixings =
FALSE;
1020 (*consdata)->validsignature =
FALSE;
1021 (*consdata)->changed =
TRUE;
1022 (*consdata)->normalized =
FALSE;
1023 (*consdata)->upgradetried =
FALSE;
1024 (*consdata)->upgraded =
FALSE;
1025 (*consdata)->indexsorted = (
nvars <= 1);
1026 (*consdata)->merged = (
nvars <= 1);
1027 (*consdata)->cliquesadded =
FALSE;
1028 (*consdata)->implsadded =
FALSE;
1029 (*consdata)->coefsorted =
FALSE;
1030 (*consdata)->nbinvars = -1;
1031 (*consdata)->varsdeleted =
FALSE;
1032 (*consdata)->rangedrowpropagated = 0;
1033 (*consdata)->checkabsolute =
FALSE;
1042 for( v = 0; v < (*consdata)->nvars; v++ )
1045 if( (*consdata)->vars[v] ==
NULL )
1072 assert((*consdata)->varssize >= 0);
1075 if( (*consdata)->row !=
NULL )
1081 if( (*consdata)->nlrow !=
NULL )
1087 for( v = 0; v < (*consdata)->nvars; v++ )
1119 if( consdata->nvars == 0 )
1166 if( consdata->nvars == 0 )
1173 for( v = 0; v < consdata->nvars; ++v )
1175 if( consdata->vals !=
NULL )
1177 if( consdata->vals[v] == 1.0 )
1182 else if( consdata->vals[v] == -1.0 )
1187 else if( consdata->nvars > 0 )
1220 consdata->validactivities =
FALSE;
1221 consdata->validminact =
FALSE;
1222 consdata->validmaxact =
FALSE;
1223 consdata->validglbminact =
FALSE;
1224 consdata->validglbmaxact =
FALSE;
1225 consdata->validmaxabsval =
FALSE;
1226 consdata->validminabsval =
FALSE;
1227 consdata->hasnonbinvalid =
FALSE;
1235 consdata->maxactdeltavar =
NULL;
1236 consdata->minactivityneginf = -1;
1237 consdata->minactivityposinf = -1;
1238 consdata->maxactivityneginf = -1;
1239 consdata->maxactivityposinf = -1;
1240 consdata->minactivityneghuge = -1;
1241 consdata->minactivityposhuge = -1;
1242 consdata->maxactivityneghuge = -1;
1243 consdata->maxactivityposhuge = -1;
1248 consdata->glbminactivityneginf = -1;
1249 consdata->glbminactivityposinf = -1;
1250 consdata->glbmaxactivityneginf = -1;
1251 consdata->glbmaxactivityposinf = -1;
1252 consdata->glbminactivityneghuge = -1;
1253 consdata->glbminactivityposhuge = -1;
1254 consdata->glbmaxactivityneghuge = -1;
1255 consdata->glbmaxactivityposhuge = -1;
1266 int pseudoactivityposinf;
1267 int pseudoactivityneginf;
1268 SCIP_Real pseudoactivity;
1273 pseudoactivityposinf = 0;
1274 pseudoactivityneginf = 0;
1276 for(
i = consdata->nvars - 1;
i >= 0; --
i )
1278 val = consdata->vals[
i];
1283 pseudoactivityposinf++;
1285 pseudoactivityneginf++;
1292 pseudoactivityneginf++;
1294 pseudoactivityposinf++;
1297 pseudoactivity += val *
bound;
1301 if( pseudoactivityneginf > 0 && pseudoactivityposinf > 0 )
1303 else if( pseudoactivityneginf > 0 )
1305 else if( pseudoactivityposinf > 0 )
1308 return pseudoactivity;
1323 for(
i = consdata->nvars - 1;
i >= 0; --
i )
1332 consdata->validminact =
TRUE;
1335 consdata->lastminactivity =
QUAD_TO_DBL(consdata->minactivity);
1350 for(
i = consdata->nvars - 1;
i >= 0; --
i )
1359 consdata->validmaxact =
TRUE;
1362 consdata->lastmaxactivity =
QUAD_TO_DBL(consdata->maxactivity);
1377 for(
i = consdata->nvars - 1;
i >= 0; --
i )
1386 consdata->validglbminact =
TRUE;
1389 consdata->lastglbminactivity =
QUAD_TO_DBL(consdata->glbminactivity);
1404 for(
i = consdata->nvars - 1;
i >= 0; --
i )
1413 consdata->validglbmaxact =
TRUE;
1416 consdata->lastglbmaxactivity =
QUAD_TO_DBL(consdata->glbmaxactivity);
1429 assert(!consdata->validmaxabsval);
1432 consdata->validmaxabsval =
TRUE;
1433 consdata->maxabsval = 0.0;
1434 for(
i = 0;
i < consdata->nvars; ++
i )
1436 absval = consdata->vals[
i];
1438 if( absval > consdata->maxabsval )
1439 consdata->maxabsval = absval;
1453 assert(!consdata->validminabsval);
1456 consdata->validminabsval =
TRUE;
1458 if( consdata->nvars > 0 )
1459 consdata->minabsval =
REALABS(consdata->vals[0]);
1461 consdata->minabsval = 0.0;
1463 for(
i = 1;
i < consdata->nvars; ++
i )
1465 absval = consdata->vals[
i];
1467 if( absval < consdata->minabsval )
1468 consdata->minabsval = absval;
1480 assert(!consdata->hasnonbinvalid);
1481 consdata->hasnonbinvar =
FALSE;
1482 consdata->hascontvar =
FALSE;
1484 for( v = consdata->nvars - 1; v >= 0; --v )
1490 consdata->hasnonbinvar =
TRUE;
1494 consdata->hascontvar =
TRUE;
1499 assert(consdata->hascontvar || v < 0);
1501 consdata->hasnonbinvalid =
TRUE;
1505#ifdef CHECKMAXACTDELTA
1515 SCIP_Real maxactdelta = 0.0;
1522 for( v = consdata->nvars - 1; v >= 0; --v )
1534 delta =
REALABS(consdata->vals[v]) * domain;
1536 if( delta > maxactdelta )
1538 maxactdelta = delta;
1545#define checkMaxActivityDelta(scip, consdata)
1558 consdata->maxactdelta = 0.0;
1560 if( !consdata->hasnonbinvalid )
1564 if( !consdata->hasnonbinvar )
1566 for( v = consdata->nvars - 1; v >= 0; --v )
1570 delta =
REALABS(consdata->vals[v]);
1572 if( delta > consdata->maxactdelta )
1574 consdata->maxactdelta = delta;
1575 consdata->maxactdeltavar = consdata->vars[v];
1582 for( v = consdata->nvars - 1; v >= 0; --v )
1594 consdata->maxactdeltavar = consdata->vars[v];
1599 delta =
REALABS(consdata->vals[v]) * domain;
1601 if( delta > consdata->maxactdelta )
1603 consdata->maxactdelta = delta;
1604 consdata->maxactdeltavar = consdata->vars[v];
1621 SCIP_Bool checkreliability
1626 SCIP_Real* lastactivity;
1627 int* activityposinf;
1628 int* activityneginf;
1629 int* activityposhuge;
1630 int* activityneghuge;
1631 SCIP_Real oldcontribution;
1632 SCIP_Real newcontribution;
1634 SCIP_Bool finitenewbound;
1635 SCIP_Bool hugevalnewcont;
1640 assert(consdata->validactivities);
1645 assert(consdata->minactivityneginf >= 0);
1646 assert(consdata->minactivityposinf >= 0);
1647 assert(consdata->maxactivityneginf >= 0);
1648 assert(consdata->maxactivityposinf >= 0);
1649 assert(consdata->minactivityneghuge >= 0);
1650 assert(consdata->minactivityposhuge >= 0);
1651 assert(consdata->maxactivityneghuge >= 0);
1652 assert(consdata->maxactivityposhuge >= 0);
1657 assert(consdata->glbminactivityneginf >= 0);
1658 assert(consdata->glbminactivityposinf >= 0);
1659 assert(consdata->glbmaxactivityneginf >= 0);
1660 assert(consdata->glbmaxactivityposinf >= 0);
1661 assert(consdata->glbminactivityneghuge >= 0);
1662 assert(consdata->glbminactivityposhuge >= 0);
1663 assert(consdata->glbmaxactivityneghuge >= 0);
1664 assert(consdata->glbmaxactivityposhuge >= 0);
1682 lastactivity = &(consdata->lastglbminactivity);
1683 activityposinf = &(consdata->glbminactivityposinf);
1684 activityneginf = &(consdata->glbminactivityneginf);
1685 activityposhuge = &(consdata->glbminactivityposhuge);
1686 activityneghuge = &(consdata->glbminactivityneghuge);
1687 validact = consdata->validglbminact;
1692 lastactivity = &(consdata->lastglbmaxactivity);
1693 activityposinf = &(consdata->glbmaxactivityneginf);
1694 activityneginf = &(consdata->glbmaxactivityposinf);
1695 activityposhuge = &(consdata->glbmaxactivityposhuge);
1696 activityneghuge = &(consdata->glbmaxactivityneghuge);
1697 validact = consdata->validglbmaxact;
1705 lastactivity = &(consdata->lastglbmaxactivity);
1706 activityposinf = &(consdata->glbmaxactivityposinf);
1707 activityneginf = &(consdata->glbmaxactivityneginf);
1708 activityposhuge = &(consdata->glbmaxactivityposhuge);
1709 activityneghuge = &(consdata->glbmaxactivityneghuge);
1710 validact = consdata->validglbmaxact;
1715 lastactivity = &(consdata->lastglbminactivity);
1716 activityposinf = &(consdata->glbminactivityneginf);
1717 activityneginf = &(consdata->glbminactivityposinf);
1718 activityposhuge = &(consdata->glbminactivityposhuge);
1719 activityneghuge = &(consdata->glbminactivityneghuge);
1720 validact = consdata->validglbminact;
1738 lastactivity = &(consdata->lastminactivity);
1739 activityposinf = &(consdata->minactivityposinf);
1740 activityneginf = &(consdata->minactivityneginf);
1741 activityposhuge = &(consdata->minactivityposhuge);
1742 activityneghuge = &(consdata->minactivityneghuge);
1743 validact = consdata->validminact;
1748 lastactivity = &(consdata->lastmaxactivity);
1749 activityposinf = &(consdata->maxactivityneginf);
1750 activityneginf = &(consdata->maxactivityposinf);
1751 activityposhuge = &(consdata->maxactivityposhuge);
1752 activityneghuge = &(consdata->maxactivityneghuge);
1753 validact = consdata->validmaxact;
1761 lastactivity = &(consdata->lastmaxactivity);
1762 activityposinf = &(consdata->maxactivityposinf);
1763 activityneginf = &(consdata->maxactivityneginf);
1764 activityposhuge = &(consdata->maxactivityposhuge);
1765 activityneghuge = &(consdata->maxactivityneghuge);
1766 validact = consdata->validmaxact;
1771 lastactivity = &(consdata->lastminactivity);
1772 activityposinf = &(consdata->minactivityneginf);
1773 activityneginf = &(consdata->minactivityposinf);
1774 activityposhuge = &(consdata->minactivityposhuge);
1775 activityneghuge = &(consdata->minactivityneghuge);
1776 validact = consdata->validminact;
1781 oldcontribution = val * oldbound;
1782 newcontribution = val * newbound;
1789 if( oldbound > 0.0 )
1791 assert((*activityposinf) >= 1);
1794 if( finitenewbound || newbound < 0.0 )
1797 (*activityposinf)--;
1800 if( !finitenewbound && newbound < 0.0 )
1801 (*activityneginf)++;
1802 else if( hugevalnewcont )
1805 if( newcontribution > 0.0 )
1806 (*activityposhuge)++;
1808 (*activityneghuge)++;
1819 assert((*activityneginf) >= 1);
1822 if( finitenewbound || newbound > 0.0 )
1825 (*activityneginf)--;
1828 if( !finitenewbound && newbound > 0.0 )
1829 (*activityposinf)++;
1830 else if( hugevalnewcont )
1833 if( newcontribution > 0.0 )
1834 (*activityposhuge)++;
1836 (*activityneghuge)++;
1847 if( oldcontribution > 0.0 )
1849 assert((*activityposhuge) >= 1);
1854 (*activityposhuge)--;
1856 if( !finitenewbound )
1859 if( newbound > 0.0 )
1860 (*activityposinf)++;
1863 (*activityneginf)++;
1865 else if( hugevalnewcont )
1868 if( newcontribution > 0.0 )
1869 (*activityposhuge)++;
1872 (*activityneghuge)++;
1881 assert(oldcontribution < 0.0);
1882 assert((*activityneghuge) >= 1);
1887 (*activityneghuge)--;
1889 if( !finitenewbound )
1892 if( newbound > 0.0 )
1893 (*activityposinf)++;
1896 (*activityneginf)++;
1898 else if( hugevalnewcont )
1901 if( newcontribution > 0.0 )
1902 (*activityposhuge)++;
1905 (*activityneghuge)++;
1915 if( !finitenewbound )
1920 if( newbound > 0.0 )
1922 (*activityposinf)++;
1932 (*activityneginf)++;
1937 else if( hugevalnewcont )
1939 if( newcontribution > 0.0 )
1941 (*activityposhuge)++;
1946 (*activityneghuge)++;
1961 SCIP_Real curractivity;
1973 (*lastactivity) = curractivity;
1979 SCIPdebugMsg(
scip,
"%s activity of linear constraint unreliable after update: %16.9g\n",
1980 (global ?
"global " :
""), curractivity);
1986 consdata->validglbminact =
FALSE;
1988 consdata->validglbmaxact =
FALSE;
1993 consdata->validminact =
FALSE;
1995 consdata->validmaxact =
FALSE;
2011 SCIP_Bool checkreliability
2018 if( consdata->validactivities )
2036 SCIP_Bool checkreliability
2043 if( consdata->validactivities )
2060 SCIP_Bool checkreliability
2066 if( consdata->validactivities )
2083 SCIP_Bool checkreliability
2089 if( consdata->validactivities )
2105 SCIP_Bool checkreliability
2113 if( consdata->validmaxabsval )
2120 consdata->maxabsval =
MAX(consdata->maxabsval, absval);
2123 if( consdata->validminabsval )
2130 consdata->minabsval =
MIN(consdata->minabsval, absval);
2134 if( consdata->validactivities )
2155 SCIP_Bool checkreliability
2163 if( consdata->validmaxabsval )
2171 consdata->validmaxabsval =
FALSE;
2177 if( consdata->validminabsval )
2185 consdata->validminabsval =
FALSE;
2191 if( consdata->validactivities )
2213 SCIP_Bool checkreliability
2227 if( consdata->validmaxabsval )
2235 consdata->maxabsval = absval;
2244 consdata->validmaxabsval =
FALSE;
2251 if( consdata->validminabsval )
2259 consdata->minabsval = absval;
2268 consdata->validminabsval =
FALSE;
2284 delta =
REALABS(newval) * domain;
2286 if( delta > consdata->maxactdelta )
2288 consdata->maxactdelta = delta;
2289 consdata->maxactdeltavar =
var;
2294 if( consdata->maxactdeltavar ==
var )
2312 if( !consdata->validmaxabsval )
2314 assert(consdata->validmaxabsval);
2317 return consdata->maxabsval;
2328 if( !consdata->validminabsval )
2330 assert(consdata->validminabsval);
2333 return consdata->minabsval;
2349 assert(!consdata->validactivities);
2355 consdata->validmaxabsval =
TRUE;
2356 consdata->validminabsval =
TRUE;
2357 consdata->validactivities =
TRUE;
2358 consdata->validminact =
TRUE;
2359 consdata->validmaxact =
TRUE;
2360 consdata->validglbminact =
TRUE;
2361 consdata->validglbmaxact =
TRUE;
2362 consdata->maxabsval = 0.0;
2363 consdata->minabsval = (consdata->nvars == 0 ? 0.0 :
REALABS(consdata->vals[0]));
2366 consdata->lastminactivity = 0.0;
2367 consdata->lastmaxactivity = 0.0;
2368 consdata->minactivityneginf = 0;
2369 consdata->minactivityposinf = 0;
2370 consdata->maxactivityneginf = 0;
2371 consdata->maxactivityposinf = 0;
2372 consdata->minactivityneghuge = 0;
2373 consdata->minactivityposhuge = 0;
2374 consdata->maxactivityneghuge = 0;
2375 consdata->maxactivityposhuge = 0;
2378 consdata->lastglbminactivity = 0.0;
2379 consdata->lastglbmaxactivity = 0.0;
2380 consdata->glbminactivityneginf = 0;
2381 consdata->glbminactivityposinf = 0;
2382 consdata->glbmaxactivityneginf = 0;
2383 consdata->glbmaxactivityposinf = 0;
2384 consdata->glbminactivityneghuge = 0;
2385 consdata->glbminactivityposhuge = 0;
2386 consdata->glbmaxactivityneghuge = 0;
2387 consdata->glbmaxactivityposhuge = 0;
2389 for(
i = 0;
i < consdata->nvars; ++
i )
2392 consdata->lastminactivity =
QUAD_TO_DBL(consdata->minactivity);
2393 consdata->lastmaxactivity =
QUAD_TO_DBL(consdata->maxactivity);
2394 consdata->lastglbminactivity =
QUAD_TO_DBL(consdata->glbminactivity);
2395 consdata->lastglbmaxactivity =
QUAD_TO_DBL(consdata->glbmaxactivity);
2412 SCIP_Bool goodrelax,
2413 SCIP_Real* minactivity,
2416 SCIP_Bool* issettoinfinity
2433 *issettoinfinity =
TRUE;
2434 *istight = posinf == 0;
2437 else if( posinf > 0 )
2440 *issettoinfinity =
TRUE;
2444 else if( neghuge > 0 || ( poshuge > 0 && !goodrelax ) )
2447 *issettoinfinity =
TRUE;
2452 SCIP_Real
QUAD(tmpactivity);
2457 if( !consdata->validglbminact )
2459 assert(consdata->validglbminact);
2465 if( !consdata->validminact )
2467 assert(consdata->validminact);
2489 *issettoinfinity =
FALSE;
2507 SCIP_Bool goodrelax,
2508 SCIP_Real* maxactivity,
2511 SCIP_Bool* issettoinfinity
2528 *issettoinfinity =
TRUE;
2529 *istight = neginf == 0;
2532 else if( neginf > 0 )
2535 *issettoinfinity =
TRUE;
2539 else if( poshuge > 0 || ( neghuge > 0 && !goodrelax ) )
2542 *issettoinfinity =
TRUE;
2547 SCIP_Real
QUAD(tmpactivity);
2552 if( !consdata->validglbmaxact )
2554 assert(consdata->validglbmaxact);
2560 if( !consdata->validmaxact )
2562 assert(consdata->validmaxact);
2584 *issettoinfinity =
FALSE;
2593 SCIP_Bool goodrelax,
2595 SCIP_Real* minactivity,
2596 SCIP_Real* maxactivity,
2597 SCIP_Bool* ismintight,
2599 SCIP_Bool* ismaxtight,
2601 SCIP_Bool* isminsettoinfinity,
2602 SCIP_Bool* ismaxsettoinfinity
2613 if( !consdata->validactivities )
2616 assert(consdata->validminact);
2617 assert(consdata->validmaxact);
2621 assert(consdata->minactivityneginf >= 0);
2622 assert(consdata->minactivityposinf >= 0);
2623 assert(consdata->maxactivityneginf >= 0);
2624 assert(consdata->maxactivityposinf >= 0);
2626 getMinActivity(
scip, consdata, consdata->minactivityposinf, consdata->minactivityneginf,
2627 consdata->minactivityposhuge, consdata->minactivityneghuge, 0.0,
FALSE, goodrelax,
2628 minactivity, ismintight, isminsettoinfinity);
2630 getMaxActivity(
scip, consdata, consdata->maxactivityposinf, consdata->maxactivityneginf,
2631 consdata->maxactivityposhuge, consdata->maxactivityneghuge, 0.0,
FALSE, goodrelax,
2632 maxactivity, ismaxtight, ismaxsettoinfinity);
2641 SCIP_Real* resactivity,
2642 SCIP_Bool isminresact,
2643 SCIP_Bool useglobalbounds
2659 for( v = 0; v < consdata->nvars; ++v )
2661 var = consdata->vars[v];
2663 if(
var == cancelvar )
2666 val = consdata->vals[v];
2668 if( useglobalbounds )
2688 *resactivity += val*lb;
2694 *resactivity += val*ub;
2703 *resactivity += val*ub;
2709 *resactivity += val*lb;
2723 SCIP_Bool goodrelax,
2725 SCIP_Real* minresactivity,
2726 SCIP_Real* maxresactivity,
2727 SCIP_Bool* ismintight,
2729 SCIP_Bool* ismaxtight,
2731 SCIP_Bool* isminsettoinfinity,
2732 SCIP_Bool* ismaxsettoinfinity
2735 SCIP_Real minactbound;
2736 SCIP_Real maxactbound;
2750 if( !consdata->validactivities )
2753 assert(consdata->validminact);
2754 assert(consdata->validmaxact);
2758 assert(consdata->minactivityneginf >= 0);
2759 assert(consdata->minactivityposinf >= 0);
2760 assert(consdata->maxactivityneginf >= 0);
2761 assert(consdata->maxactivityposinf >= 0);
2762 assert(consdata->minactivityneghuge >= 0);
2763 assert(consdata->minactivityposhuge >= 0);
2764 assert(consdata->maxactivityneghuge >= 0);
2765 assert(consdata->maxactivityposhuge >= 0);
2785 assert(consdata->minactivityposinf >= 1);
2787 getMinActivity(
scip, consdata, consdata->minactivityposinf - 1, consdata->minactivityneginf,
2788 consdata->minactivityposhuge, consdata->minactivityneghuge, 0.0,
FALSE, goodrelax,
2789 minresactivity, ismintight, isminsettoinfinity);
2793 assert(consdata->minactivityneginf >= 1);
2795 getMinActivity(
scip, consdata, consdata->minactivityposinf, consdata->minactivityneginf - 1,
2796 consdata->minactivityposhuge, consdata->minactivityneghuge, 0.0,
FALSE, goodrelax,
2797 minresactivity, ismintight, isminsettoinfinity);
2801 assert(consdata->minactivityposhuge >= 1);
2803 getMinActivity(
scip, consdata, consdata->minactivityposinf, consdata->minactivityneginf,
2804 consdata->minactivityposhuge - 1, consdata->minactivityneghuge, 0.0,
FALSE, goodrelax,
2805 minresactivity, ismintight, isminsettoinfinity);
2809 assert(consdata->minactivityneghuge >= 1);
2811 getMinActivity(
scip, consdata, consdata->minactivityposinf, consdata->minactivityneginf,
2812 consdata->minactivityposhuge, consdata->minactivityneghuge - 1, 0.0,
FALSE, goodrelax,
2813 minresactivity, ismintight, isminsettoinfinity);
2817 getMinActivity(
scip, consdata, consdata->minactivityposinf, consdata->minactivityneginf,
2818 consdata->minactivityposhuge, consdata->minactivityneghuge, absval * minactbound,
FALSE, goodrelax,
2819 minresactivity, ismintight, isminsettoinfinity);
2827 assert(consdata->maxactivityneginf >= 1);
2829 getMaxActivity(
scip, consdata, consdata->maxactivityposinf, consdata->maxactivityneginf - 1,
2830 consdata->maxactivityposhuge, consdata->maxactivityneghuge, 0.0,
FALSE, goodrelax,
2831 maxresactivity, ismaxtight, ismaxsettoinfinity);
2835 assert(consdata->maxactivityposinf >= 1);
2837 getMaxActivity(
scip, consdata, consdata->maxactivityposinf - 1, consdata->maxactivityneginf,
2838 consdata->maxactivityposhuge, consdata->maxactivityneghuge, 0.0,
FALSE, goodrelax,
2839 maxresactivity, ismaxtight, ismaxsettoinfinity);
2843 assert(consdata->maxactivityposhuge >= 1);
2845 getMaxActivity(
scip, consdata, consdata->maxactivityposinf, consdata->maxactivityneginf,
2846 consdata->maxactivityposhuge - 1, consdata->maxactivityneghuge, 0.0,
FALSE, goodrelax,
2847 maxresactivity, ismaxtight, ismaxsettoinfinity);
2851 assert(consdata->maxactivityneghuge >= 1);
2853 getMaxActivity(
scip, consdata, consdata->maxactivityposinf, consdata->maxactivityneginf,
2854 consdata->maxactivityposhuge, consdata->maxactivityneghuge - 1, 0.0,
FALSE, goodrelax,
2855 maxresactivity, ismaxtight, ismaxsettoinfinity);
2859 getMaxActivity(
scip, consdata, consdata->maxactivityposinf, consdata->maxactivityneginf,
2860 consdata->maxactivityposhuge, consdata->maxactivityneghuge, absval * maxactbound,
FALSE, goodrelax,
2861 maxresactivity, ismaxtight, ismaxsettoinfinity);
2870 SCIP_Bool goodrelax,
2872 SCIP_Real* glbminactivity,
2873 SCIP_Real* glbmaxactivity,
2874 SCIP_Bool* ismintight,
2876 SCIP_Bool* ismaxtight,
2878 SCIP_Bool* isminsettoinfinity,
2879 SCIP_Bool* ismaxsettoinfinity
2885 || (glbmaxactivity !=
NULL && ismaxtight !=
NULL && ismaxsettoinfinity !=
NULL));
2887 if( !consdata->validactivities )
2890 assert(consdata->validglbminact);
2891 assert(consdata->validglbmaxact);
2895 assert(consdata->glbminactivityneginf >= 0);
2896 assert(consdata->glbminactivityposinf >= 0);
2897 assert(consdata->glbmaxactivityneginf >= 0);
2898 assert(consdata->glbmaxactivityposinf >= 0);
2899 assert(consdata->glbminactivityneghuge >= 0);
2900 assert(consdata->glbminactivityposhuge >= 0);
2901 assert(consdata->glbmaxactivityneghuge >= 0);
2902 assert(consdata->glbmaxactivityposhuge >= 0);
2904 if( glbminactivity !=
NULL )
2909 getMinActivity(
scip, consdata, consdata->glbminactivityposinf, consdata->glbminactivityneginf,
2910 consdata->glbminactivityposhuge, consdata->glbminactivityneghuge, 0.0,
TRUE, goodrelax,
2911 glbminactivity, ismintight, isminsettoinfinity);
2914 if( glbmaxactivity !=
NULL )
2919 getMaxActivity(
scip, consdata, consdata->glbmaxactivityposinf, consdata->glbmaxactivityneginf,
2920 consdata->glbmaxactivityposhuge, consdata->glbmaxactivityneghuge, 0.0,
TRUE, goodrelax,
2921 glbmaxactivity, ismaxtight, ismaxsettoinfinity);
2932 SCIP_Bool goodrelax,
2934 SCIP_Real* minresactivity,
2935 SCIP_Real* maxresactivity,
2936 SCIP_Bool* ismintight,
2938 SCIP_Bool* ismaxtight,
2940 SCIP_Bool* isminsettoinfinity,
2941 SCIP_Bool* ismaxsettoinfinity
2944 SCIP_Real minactbound;
2945 SCIP_Real maxactbound;
2952 || (maxresactivity !=
NULL && ismaxtight !=
NULL && ismaxsettoinfinity !=
NULL));
2955 if( !consdata->validactivities )
2960 assert(consdata->glbminactivityneginf >= 0);
2961 assert(consdata->glbminactivityposinf >= 0);
2962 assert(consdata->glbmaxactivityneginf >= 0);
2963 assert(consdata->glbmaxactivityposinf >= 0);
2978 if( minresactivity !=
NULL )
2988 assert(consdata->glbminactivityposinf >= 1);
2990 getMinActivity(
scip, consdata, consdata->glbminactivityposinf - 1, consdata->glbminactivityneginf,
2991 consdata->glbminactivityposhuge, consdata->glbminactivityneghuge, 0.0,
TRUE, goodrelax,
2992 minresactivity, ismintight, isminsettoinfinity);
2996 assert(consdata->glbminactivityneginf >= 1);
2998 getMinActivity(
scip, consdata, consdata->glbminactivityposinf, consdata->glbminactivityneginf - 1,
2999 consdata->glbminactivityposhuge, consdata->glbminactivityneghuge, 0.0,
TRUE, goodrelax,
3000 minresactivity, ismintight, isminsettoinfinity);
3004 assert(consdata->glbminactivityposhuge >= 1);
3006 getMinActivity(
scip, consdata, consdata->glbminactivityposinf, consdata->glbminactivityneginf,
3007 consdata->glbminactivityposhuge - 1, consdata->glbminactivityneghuge, 0.0,
TRUE, goodrelax,
3008 minresactivity, ismintight, isminsettoinfinity);
3012 assert(consdata->glbminactivityneghuge >= 1);
3014 getMinActivity(
scip, consdata, consdata->glbminactivityposinf, consdata->glbminactivityneginf,
3015 consdata->glbminactivityposhuge, consdata->glbminactivityneghuge - 1, 0.0,
TRUE, goodrelax,
3016 minresactivity, ismintight, isminsettoinfinity);
3020 getMinActivity(
scip, consdata, consdata->glbminactivityposinf, consdata->glbminactivityneginf,
3021 consdata->glbminactivityposhuge, consdata->glbminactivityneghuge, absval * minactbound,
TRUE,
3022 goodrelax, minresactivity, ismintight, isminsettoinfinity);
3026 if( maxresactivity !=
NULL )
3036 assert(consdata->glbmaxactivityneginf >= 1);
3038 getMaxActivity(
scip, consdata, consdata->glbmaxactivityposinf, consdata->glbmaxactivityneginf - 1,
3039 consdata->glbmaxactivityposhuge, consdata->glbmaxactivityneghuge, 0.0,
TRUE, goodrelax,
3040 maxresactivity, ismaxtight, ismaxsettoinfinity);
3044 assert(consdata->glbmaxactivityposinf >= 1);
3046 getMaxActivity(
scip, consdata, consdata->glbmaxactivityposinf - 1, consdata->glbmaxactivityneginf,
3047 consdata->glbmaxactivityposhuge, consdata->glbmaxactivityneghuge, 0.0,
TRUE, goodrelax,
3048 maxresactivity, ismaxtight, ismaxsettoinfinity);
3052 assert(consdata->glbmaxactivityposhuge >= 1);
3054 getMaxActivity(
scip, consdata, consdata->glbmaxactivityposinf, consdata->glbmaxactivityneginf,
3055 consdata->glbmaxactivityposhuge - 1, consdata->glbmaxactivityneghuge, 0.0,
TRUE, goodrelax,
3056 maxresactivity, ismaxtight, ismaxsettoinfinity);
3060 assert(consdata->glbmaxactivityneghuge >= 1);
3062 getMaxActivity(
scip, consdata, consdata->glbmaxactivityposinf, consdata->glbmaxactivityneginf,
3063 consdata->glbmaxactivityposhuge, consdata->glbmaxactivityneghuge - 1, 0.0,
TRUE, goodrelax,
3064 maxresactivity, ismaxtight, ismaxsettoinfinity);
3068 getMaxActivity(
scip, consdata, consdata->glbmaxactivityposinf, consdata->glbmaxactivityneginf,
3069 consdata->glbmaxactivityposhuge, consdata->glbmaxactivityneghuge, absval * maxactbound,
TRUE,
3070 goodrelax, maxresactivity, ismaxtight, ismaxsettoinfinity);
3102 for( v = 0; v < consdata->nvars; ++v )
3106 if( consdata->vals[v] < 0 )
3116 activity += consdata->vals[v] * solval;
3118 assert(nneginf >= 0 && nposinf >= 0);
3120 SCIPdebugMsg(
scip,
"activity of linear constraint: %.15g, %d positive infinity values, %d negative infinity values \n", activity, nposinf, nneginf);
3123 if( nposinf > 0 && nneginf > 0 )
3124 activity = (consdata->rhs + consdata->lhs) / 2;
3125 else if( nposinf > 0 )
3127 else if( nneginf > 0 )
3130 SCIPdebugMsg(
scip,
"corrected activity of linear constraint: %.15g\n", activity);
3135 else if( activity < 0 )
3161 return MIN(consdata->rhs - activity, activity - consdata->lhs);
3171 uint64_t varsignature;
3177 assert(consdata->validsignature);
3182 val = consdata->vals[pos];
3183 if( (val > 0.0 && ub > 0.0) || (val < 0.0 && lb < 0.0) )
3184 consdata->possignature |= varsignature;
3185 if( (val > 0.0 && lb < 0.0) || (val < 0.0 && ub > 0.0) )
3186 consdata->negsignature |= varsignature;
3197 if( !consdata->validsignature )
3201 consdata->validsignature =
TRUE;
3202 consdata->possignature = 0;
3203 consdata->negsignature = 0;
3204 for(
i = 0;
i < consdata->nvars; ++
i )
3221 var1 = consdata->vars[ind1];
3222 var2 = consdata->vars[ind2];
3239 if( vartype1 < vartype2 )
3241 else if( vartype1 > vartype2 )
3260 var1 = consdata->vars[ind1];
3261 var2 = consdata->vars[ind2];
3271 SCIP_Real abscoef1 =
REALABS(consdata->vals[ind1]);
3272 SCIP_Real abscoef2 =
REALABS(consdata->vals[ind2]);
3274 if(
EPSGT(abscoef1, abscoef2, 1e-9) )
3276 else if(
EPSGT(abscoef2, abscoef1, 1e-9) )
3286 if( vartype1 < vartype2 )
3290 else if( vartype1 > vartype2 )
3307 if(
EPSGT(abscont1, abscont2, 1e-9) )
3309 else if(
EPSGT(abscont2, abscont1, 1e-9) )
3338 for( v = 0; v <
nvars; ++v )
3342 varv = consdata->vars[v];
3343 valv = consdata->vals[v];
3344 if( consdata->eventdata !=
NULL )
3345 eventdatav = consdata->eventdata[v];
3351 consdata->vars[
i] = consdata->vars[perm[
i]];
3352 consdata->vals[
i] = consdata->vals[perm[
i]];
3353 if( consdata->eventdata !=
NULL )
3355 consdata->eventdata[
i] = consdata->eventdata[perm[
i]];
3356 consdata->eventdata[
i]->varpos =
i;
3362 while( perm[
i] != v );
3363 consdata->vars[
i] = varv;
3364 consdata->vals[
i] = valv;
3365 if( consdata->eventdata !=
NULL )
3367 consdata->eventdata[
i] = eventdatav;
3368 consdata->eventdata[
i]->varpos =
i;
3375 for( v = 0; v <
nvars; ++v )
3378 assert(consdata->eventdata ==
NULL || consdata->eventdata[v]->varpos == v);
3405 if( consdata->nvars <= 1 )
3407 consdata->indexsorted =
TRUE;
3408 consdata->coefsorted =
TRUE;
3409 consdata->nbinvars = (consdata->nvars == 1 ? (int)
SCIPvarIsBinary(consdata->vars[0]) : 0);
3422 SCIPsort(perm, consdataCompVar, (
void*)consdata, consdata->nvars);
3424 SCIPsort(perm, consdataCompVarProp, (
void*)consdata, consdata->nvars);
3433 consdata->indexsorted =
FALSE;
3434 consdata->coefsorted =
TRUE;
3437 consdata->nbinvars = 0;
3438 for( v = 0; v < consdata->nvars; ++v )
3441 ++consdata->nbinvars;
3448 consdata->indexsorted =
TRUE;
3449 consdata->coefsorted =
FALSE;
3484 assert(consdata->nvars == 0 || (consdata->vars !=
NULL && consdata->vals !=
NULL));
3495 consdata->rhs = lhs;
3513 vars = consdata->vars;
3514 vals = consdata->vals;
3516 for( v = 0; v < consdata->nvars; ++v )
3538 vars = consdata->vars;
3539 vals = consdata->vals;
3541 for( v = 0; v < consdata->nvars; ++v )
3561 consdata->boundstightened = 0;
3562 consdata->presolved =
FALSE;
3563 consdata->cliquesadded =
FALSE;
3564 consdata->implsadded =
FALSE;
3574 consdata->lhs = lhs;
3575 consdata->changed =
TRUE;
3576 consdata->normalized =
FALSE;
3577 consdata->upgradetried =
FALSE;
3578 consdata->rangedrowpropagated = 0;
3581 if( consdata->row !=
NULL )
3612 assert(consdata->nvars == 0 || (consdata->vars !=
NULL && consdata->vals !=
NULL));
3623 consdata->lhs = rhs;
3643 vars = consdata->vars;
3644 vals = consdata->vals;
3646 for( v = 0; v < consdata->nvars; ++v )
3668 vars = consdata->vars;
3669 vals = consdata->vals;
3671 for( v = 0; v < consdata->nvars; ++v )
3691 consdata->boundstightened = 0;
3692 consdata->presolved =
FALSE;
3693 consdata->cliquesadded =
FALSE;
3694 consdata->implsadded =
FALSE;
3704 consdata->rhs = rhs;
3705 consdata->changed =
TRUE;
3706 consdata->normalized =
FALSE;
3707 consdata->upgradetried =
FALSE;
3708 consdata->rangedrowpropagated = 0;
3711 if( consdata->row !=
NULL )
3729 SCIP_Bool transformed;
3757 consdata->vars[consdata->nvars] =
var;
3758 consdata->vals[consdata->nvars] = val;
3767 if( consdata->eventdata !=
NULL )
3779 consdata->eventdata[consdata->nvars-1] =
NULL;
3800 consdata->maxactdeltavar =
var;
3804 SCIP_Real domain = ub - lb;
3805 SCIP_Real delta =
REALABS(val) * domain;
3807 if( delta > consdata->maxactdelta )
3809 consdata->maxactdelta = delta;
3810 consdata->maxactdeltavar =
var;
3825 consdata->boundstightened = 0;
3826 consdata->presolved =
FALSE;
3829 if( consdata->validsignature )
3832 consdata->changed =
TRUE;
3833 consdata->normalized =
FALSE;
3834 consdata->upgradetried =
FALSE;
3835 consdata->cliquesadded =
FALSE;
3836 consdata->implsadded =
FALSE;
3837 consdata->rangedrowpropagated = 0;
3839 if( consdata->nvars == 1 )
3841 consdata->indexsorted =
TRUE;
3842 consdata->coefsorted =
TRUE;
3843 consdata->merged =
TRUE;
3847 consdata->merged =
FALSE;
3851 consdata->indexsorted = consdata->indexsorted && (consdataCompVar((
void*)consdata, consdata->nvars-2, consdata->nvars-1) <= 0);
3852 consdata->coefsorted =
FALSE;
3856 consdata->indexsorted =
FALSE;
3857 consdata->coefsorted = consdata->coefsorted && (consdataCompVarProp((
void*)consdata, consdata->nvars-2, consdata->nvars-1) <= 0);
3862 if( consdata->hasnonbinvalid && !consdata->hascontvar )
3868 consdata->hasnonbinvar =
TRUE;
3871 consdata->hascontvar =
TRUE;
3876 if( consdata->row !=
NULL )
3903 var = consdata->vars[pos];
3904 val = consdata->vals[pos];
3923 if( consdata->eventdata !=
NULL )
3931 if( pos != consdata->nvars - 1 )
3933 consdata->vars[pos] = consdata->vars[consdata->nvars-1];
3934 consdata->vals[pos] = consdata->vals[consdata->nvars-1];
3936 if( consdata->eventdata !=
NULL )
3938 consdata->eventdata[pos] = consdata->eventdata[consdata->nvars-1];
3940 consdata->eventdata[pos]->varpos = pos;
3943 consdata->indexsorted = consdata->indexsorted && (pos + 2 >= consdata->nvars);
3944 consdata->coefsorted = consdata->coefsorted && (pos + 2 >= consdata->nvars);
3951 if( consdata->nvars <= 1 )
3963 if( consdata->maxactdeltavar ==
var )
3966 consdata->maxactdeltavar =
NULL;
3977 consdata->boundstightened = 0;
3978 consdata->presolved =
FALSE;
3979 consdata->validsignature =
FALSE;
3980 consdata->changed =
TRUE;
3981 consdata->normalized =
FALSE;
3982 consdata->upgradetried =
FALSE;
3983 consdata->cliquesadded =
FALSE;
3984 consdata->implsadded =
FALSE;
3985 consdata->rangedrowpropagated = 0;
3990 consdata->hasnonbinvalid =
FALSE;
3994 if( consdata->row !=
NULL )
4029 var = consdata->vars[pos];
4030 val = consdata->vals[pos];
4039 if( locked && newval * val < 0.0 )
4051 consdata->vals[pos] = newval;
4053 if( consdata->coefsorted )
4056 consdata->coefsorted = (consdataCompVarProp((
void*)consdata, pos - 1, pos) <= 0);
4057 if( consdata->coefsorted && pos < consdata->
nvars - 1 )
4058 consdata->coefsorted = (consdataCompVarProp((
void*)consdata, pos, pos + 1) <= 0);
4071 consdata->boundstightened = 0;
4072 consdata->presolved =
FALSE;
4073 consdata->validsignature = consdata->validsignature && (newval * val > 0.0);
4074 consdata->changed =
TRUE;
4075 consdata->normalized =
FALSE;
4076 consdata->upgradetried =
FALSE;
4077 consdata->cliquesadded =
FALSE;
4078 consdata->implsadded =
FALSE;
4079 consdata->rangedrowpropagated = 0;
4094 SCIP_Real absscalar;
4108 SCIPwarningMessage(
scip,
"skipped scaling for linear constraint <%s> to avoid numerical troubles (scalar: %.15g)\n",
4115 for(
i = consdata->nvars - 1;
i >= 0; --
i )
4117 newval = scalar * consdata->vals[
i];
4127 SCIPwarningMessage(
scip,
"coefficient %.15g of variable <%s> in linear constraint <%s> scaled to zero (scalar: %.15g)\n",
4132 consdata->vals[
i] = newval;
4140 lhs = consdata->lhs;
4141 consdata->lhs = -consdata->rhs;
4142 consdata->rhs = -lhs;
4147 newval = absscalar * consdata->lhs;
4155 consdata->lhs = newval;
4159 newval = absscalar * consdata->rhs;
4167 consdata->rhs = newval;
4171 consdata->cliquesadded =
FALSE;
4172 consdata->implsadded =
FALSE;
4197 for(
i = 0;
i < nconss;
i++ )
4202 if( consdata->varsdeleted )
4205 for( v = consdata->nvars - 1; v >= 0; --v )
4212 consdata->varsdeleted =
FALSE;
4241 SCIP_Bool* infeasible
4247 SCIP_Longint nominator;
4248 SCIP_Longint denominator;
4250 SCIP_Longint maxmult;
4253 SCIP_Real maxabsval;
4254 SCIP_Real minabsval;
4256 SCIP_Bool onlyintegral;
4267 *infeasible =
FALSE;
4278 if( consdata->normalized )
4282 vals = consdata->vals;
4283 nvars = consdata->nvars;
4288 consdata->normalized =
TRUE;
4314 scalar = 2.0 / (minabsval + maxabsval);
4321 SCIPdebugMsg(
scip,
"divide linear constraint with %g, because all coefficients are in absolute value the same\n", maxabsval);
4326 vals = consdata->vals;
4327 nvars = consdata->nvars;
4336 consdata->normalized =
TRUE;
4352 if( !consdata->hasnonbinvalid )
4359 if( !consdata->hascontvar )
4405 if( nposcoeffs > nnegcoeffs )
4407 else if( nposcoeffs < nnegcoeffs )
4417 assert(mult == +1 || mult == -1);
4436 for(
i = 0;
i <
nvars && success && scm <= maxmult; ++
i )
4441 success =
SCIPrealToRational(vals[
i], -epsilon, epsilon , maxmult, &nominator, &denominator);
4451 onlyintegral =
TRUE;
4458 onlyintegral =
FALSE;
4464 success = success && (scm <= maxmult || (scm == 1 && onlyintegral));
4465 if( success && scm != 1 )
4472 if( consdata->validmaxabsval )
4474 consdata->maxabsval *=
REALABS((SCIP_Real)scm);
4477 consdata->validmaxabsval =
FALSE;
4483 if( consdata->validminabsval )
4485 consdata->minabsval *=
REALABS((SCIP_Real)scm);
4488 consdata->validminabsval =
FALSE;
4495 vals = consdata->vals;
4496 nvars = consdata->nvars;
4503 if( success &&
nvars >= 1 )
4518 if( !consdata->hascontvar && onlyintegral )
4536 if( consdata->validmaxabsval )
4538 consdata->maxabsval /=
REALABS((SCIP_Real)gcd);
4540 if( consdata->validminabsval )
4542 consdata->minabsval /=
REALABS((SCIP_Real)gcd);
4548 consdata->normalized =
TRUE;
4574 if( consdata->merged )
4584 v = consdata->nvars-1;
4587 var = consdata->vars[v];
4588 if( consdata->vars[v-1] ==
var )
4590 valsum = consdata->vals[v];
4595 valsum += consdata->vals[v];
4597 while( v >= 1 && consdata->vars[v-1] ==
var );
4608 if( consdata->maxactdeltavar ==
var )
4611 consdata->maxactdeltavar =
NULL;
4622 consdata->merged =
TRUE;
4632 SCIP_Bool* infeasible
4641 SCIP_Real* aggrscalars;
4643 SCIP_Real aggrconst;
4651 if( infeasible !=
NULL )
4652 *infeasible =
FALSE;
4657 if( consdata->eventdata ==
NULL )
4673 if( !consdata->removedfixings )
4675 SCIP_Real lhssubtrahend;
4676 SCIP_Real rhssubtrahend;
4683 lhssubtrahend = 0.0;
4684 rhssubtrahend = 0.0;
4690 while( v < consdata->
nvars )
4692 var = consdata->vars[v];
4693 val = consdata->vals[v];
4715 if( ( val > 0.0 ) != ( fixedval > 0.0 ) )
4719 if( infeasible !=
NULL )
4731 lhssubtrahend += val * fixedval;
4738 if( ( val > 0.0 ) == ( fixedval > 0.0 ) )
4742 if( infeasible !=
NULL )
4754 rhssubtrahend += val * fixedval;
4777 lhssubtrahend += activeconstant;
4779 rhssubtrahend += activeconstant;
4790 for(
i = 0;
i < naggrvars; ++
i )
4797 lhssubtrahend += val * aggrconst;
4799 rhssubtrahend += val * aggrconst;
4809 lhssubtrahend += val * aggrconst;
4811 rhssubtrahend += val * aggrconst;
4832 if( infeasible !=
NULL )
4846 else if(
SCIPisEQ(
scip, lhssubtrahend, consdata->lhs) )
4864 if( infeasible !=
NULL )
4878 else if(
SCIPisEQ(
scip, rhssubtrahend, consdata->rhs) )
4887 consdata->removedfixings =
TRUE;
4900 assert(consdata->removedfixings);
4904 for( v = 0; v < consdata->nvars; ++v )
4923 SCIP_Bool reasonisrhs
4939 vars = consdata->vars;
4940 vals = consdata->vals;
4941 nvars = consdata->nvars;
4947 assert((infervar ==
NULL) == (inferpos == -1));
4948 assert(inferpos == -1 ||
vars[inferpos] == infervar);
4959 SCIP_Real minresactivity;
4960 SCIP_Real maxresactivity;
4961 SCIP_Bool ismintight;
4962 SCIP_Bool ismaxtight;
4963 SCIP_Bool isminsettoinfinity;
4964 SCIP_Bool ismaxsettoinfinity;
4970 if( infervar !=
NULL )
4975 &ismintight,
NULL, &isminsettoinfinity,
NULL);
4978 NULL, &ismaxtight,
NULL, &ismaxsettoinfinity);
4984 &ismintight,
NULL, &isminsettoinfinity,
NULL);
4987 NULL, &ismaxtight,
NULL, &ismaxsettoinfinity);
4991 if( (reasonisrhs && !isminsettoinfinity && ismintight) || (!reasonisrhs && !ismaxsettoinfinity && ismaxtight) )
4994 SCIP_Bool resactisinf;
4996 resactisinf =
FALSE;
5001 if( infervar !=
NULL )
5013 rescap = consdata->rhs - minresactivity;
5023 rescap = consdata->lhs - maxresactivity;
5026 if( reasonisrhs == (vals[inferpos] > 0.0) )
5032 rescap = (reasonisrhs ? consdata->rhs - minresactivity : consdata->lhs - maxresactivity);
5051 if( reasonisrhs == (vals[
i] > 0.0) )
5079 if( reasonisrhs == (vals[
i] > 0.0) )
5117 vars = consdata->vars;
5118 nvars = consdata->nvars;
5121 assert((infervar ==
NULL) == (inferpos == -1));
5123 assert(inferpos == -1 ||
vars[inferpos] == infervar);
5126 for( v =
nvars - 1; v >= 0; --v )
5131 if(
vars[v] == infervar )
5177 for( v =
nvars - 1; v >= 0; --v )
5239 vars = consdata->vars;
5240 nvars = consdata->nvars;
5242 vals = consdata->vals;
5249 if( inferpos >=
nvars ||
vars[inferpos] != infervar )
5253 for( inferpos = 0; inferpos <
nvars &&
vars[inferpos] != infervar; ++inferpos )
5295 SCIPerrorMessage(
"invalid inference information %d in linear constraint <%s> at position %d for %s bound of variable <%s>\n",
5311 SCIP_Bool reasonisrhs
5343 infcountmin = consdata->minactivityneginf
5344 + consdata->minactivityposinf
5345 + consdata->minactivityneghuge
5346 + consdata->minactivityposhuge;
5347 infcountmax = consdata->maxactivityneginf
5348 + consdata->maxactivityposinf
5349 + consdata->maxactivityneghuge
5350 + consdata->maxactivityposhuge;
5352 if( infcountmin > 1 && infcountmax > 1 )
5375 SCIP_Bool infeasible;
5376 SCIP_Bool tightened;
5383 var = consdata->vars[pos];
5393 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, old bds=[%.15g,%.15g], val=%.15g, activity=[%.15g,%.15g], sides=[%.15g,%.15g] -> newub=%.15g\n",
5395 QUAD_TO_DBL(consdata->minactivity),
QUAD_TO_DBL(consdata->maxactivity), consdata->lhs, consdata->rhs, newub);
5404 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
5412 else if( tightened )
5415 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, new bds=[%.15g,%.15g]\n",
5422 consdata->upgradetried =
FALSE;
5445 SCIP_Bool infeasible;
5446 SCIP_Bool tightened;
5453 var = consdata->vars[pos];
5463 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, old bds=[%.15g,%.15g], val=%.15g, activity=[%.15g,%.15g], sides=[%.15g,%.15g] -> newlb=%.15g\n",
5465 QUAD_TO_DBL(consdata->minactivity),
QUAD_TO_DBL(consdata->maxactivity), consdata->lhs, consdata->rhs, newlb);
5474 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
5482 else if( tightened )
5485 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, new bds=[%.15g,%.15g]\n",
5492 consdata->upgradetried =
FALSE;
5532 var = consdata->vars[pos];
5539 val = consdata->vals[pos];
5540 lhs = consdata->lhs;
5541 rhs = consdata->rhs;
5551 if( !consdata->validactivities )
5553 assert(consdata->validactivities);
5554 if( !consdata->validminact )
5556 assert(consdata->validminact);
5567 assert(consdata->validminact);
5572 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, minactivity=%.15g > rhs=%.15g\n",
5587 alpha = val * (ub - lb);
5595 newub = lb + (slack / val);
5601 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
5619 if( !consdata->validmaxact )
5623 assert(consdata->validmaxact);
5628 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, maxactivity=%.15g < lhs=%.15g\n",
5643 alpha = val * (ub - lb);
5651 newlb = ub - (slack / val);
5657 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
5674 assert(consdata->validminact);
5679 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, minactivity=%.15g > rhs=%.15g\n",
5694 alpha = val * (lb - ub);
5702 newlb = ub + slack / val;
5708 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
5725 if( !consdata->validmaxact )
5729 assert(consdata->validmaxact);
5734 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, maxactivity=%.15g < lhs=%.15g\n",
5749 alpha = val * (lb - ub);
5757 newub = lb - (slack / val);
5763 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
5848 SCIP_Real* infcheckvals;
5849 SCIP_Real minactinfvars;
5850 SCIP_Real maxactinfvars;
5857 SCIP_Real absminbincoef;
5859 SCIP_Longint gcdtmp;
5860 SCIP_Bool minactinfvarsinvalid;
5861 SCIP_Bool maxactinfvarsinvalid;
5862 SCIP_Bool possiblegcd;
5864 SCIP_Bool addartconss;
5887 if( consdata->rangedrowpropagated == 2 )
5891 if( consdata->nvars < 3 )
5908 consdata->rangedrowpropagated = 2;
5915 if( consdata->rangedrowpropagated > 0 )
5918 consdata->rangedrowpropagated = 1;
5923 for( v = consdata->nvars - 1; v >= 0; --v )
5941 lhs = consdata->lhs - fixedact;
5942 rhs = consdata->rhs - fixedact;
5943 nunfixedvars = consdata->nvars - nfixedconsvars;
5988 absval =
REALABS(consdata->vals[v]);
5990 if( absminbincoef > absval )
5991 absminbincoef = absval;
5995 possiblegcd =
FALSE;
5996 infcheckvars[ninfcheckvars] = consdata->vars[v];
5997 infcheckvals[ninfcheckvars] = consdata->vals[v];
6013 if( v == consdata->nvars )
6017 if( ncontvars + 2 > nunfixedvars )
6030 for( ; v < consdata->nvars; ++v )
6039 absval =
REALABS(consdata->vals[v]);
6041 if( absminbincoef > absval )
6042 absminbincoef = absval;
6052 possiblegcd =
FALSE;
6053 infcheckvars[ninfcheckvars] = consdata->vars[v];
6054 infcheckvals[ninfcheckvars] = consdata->vals[v];
6070 infcheckvars[ninfcheckvars] = consdata->vars[v];
6071 infcheckvals[ninfcheckvars] = consdata->vals[v];
6086 if( ninfcheckvars == 0 )
6091 minactinfvarsinvalid =
FALSE;
6092 maxactinfvarsinvalid =
FALSE;
6093 maxactinfvars = 0.0;
6094 minactinfvars = 0.0;
6097 for( v = ninfcheckvars - 1; v >= 0; --v )
6104 if( infcheckvals[v] < 0.0 )
6105 maxactinfvarsinvalid =
TRUE;
6107 minactinfvarsinvalid =
TRUE;
6111 if( infcheckvals[v] < 0.0 )
6112 maxactinfvars += infcheckvals[v] * lb;
6114 minactinfvars += infcheckvals[v] * lb;
6119 if( infcheckvals[v] > 0.0 )
6120 maxactinfvarsinvalid =
TRUE;
6122 minactinfvarsinvalid =
TRUE;
6126 if( infcheckvals[v] > 0.0 )
6127 maxactinfvars += infcheckvals[v] * ub;
6129 minactinfvars += infcheckvals[v] * ub;
6134 minactinfvarsinvalid =
TRUE;
6136 maxactinfvarsinvalid =
TRUE;
6138 if( minactinfvarsinvalid || maxactinfvarsinvalid )
6141 assert(!minactinfvarsinvalid && !maxactinfvarsinvalid);
6143 SCIPdebugMsg(
scip,
"minactinfvarsinvalid = %u, minactinfvars = %g, maxactinfvarsinvalid = %u, maxactinfvars = %g, gcd = %lld, ninfcheckvars = %d, ncontvars = %d\n",
6144 minactinfvarsinvalid, minactinfvars, maxactinfvarsinvalid, maxactinfvars, gcd, ninfcheckvars, ncontvars);
6169 else if( ncontvars == 0 )
6171 SCIP_Longint gcdinfvars = -1;
6176 v = ninfcheckvars - 1;
6180 for( ; v >= 0 && gcdinfvars >= 2; --v )
6188 SCIPdebugMsg(
scip,
"gcdinfvars =%lld, possiblegcd = %u\n", gcdinfvars, possiblegcd);
6191 if( gcdinfvars >= 1 )
6204 value2 = value + gcd * (
SCIPceil(
scip, (lhs - value) / gcd));
6225 value += gcdinfvars;
6227 assert(nsols < 2 || minvalue <= maxvalue);
6233 SCIP_Real secondsolval = maxvalue;
6240 value2 = value + gcd * (
SCIPfloor(
scip, (rhs - value) / gcd));
6251 assert(maxvalue > minvalue);
6254 value -= gcdinfvars;
6256 assert(maxvalue > secondsolval);
6259 SCIPdebugMsg(
scip,
"here nsols %s %d, minsolvalue = %g, maxsolvalue = %g, ninfcheckvars = %d, nunfixedvars = %d\n",
6260 nsols > 2 ?
">=" :
"=", nsols, minvalue, maxvalue, ninfcheckvars, nunfixedvars);
6265 SCIPdebugMsg(
scip,
"gcdinfvars = %lld, gcd = %lld, correctedlhs = %g, correctedrhs = %g\n",
6266 gcdinfvars, gcd, lhs, rhs);
6277 else if( nsols == 1 )
6279 assert(minvalue == maxvalue);
6282 if( ninfcheckvars == 1 )
6288 SCIPdebugMsg(
scip,
"fixing single variable <%s> with bounds [%.15g,%.15g] to %.15g\n",
6309 if( ninfcheckvars == nunfixedvars - 1 )
6312 SCIP_Bool foundvar =
FALSE;
6316 assert(ninfcheckvars > 0);
6319 for( v = 0; v < consdata->nvars - 1; ++v )
6323 if(
w >= ninfcheckvars || consdata->vars[v] != infcheckvars[
w] )
6329 assert((nfixedconsvars == 0) ? (consdata->nvars - v - 1 == ninfcheckvars -
w) :
TRUE);
6331 for( ; v2 < consdata->nvars && w2 < ninfcheckvars; ++v2 )
6336 assert(consdata->vars[v2] == infcheckvars[w2]);
6339 assert(w2 == ninfcheckvars);
6345 if( consdata->vals[v] < 0 )
6354 SCIPdebugMsg(
scip,
"fixing variable <%s> with bounds [%.15g,%.15g] to %.15g\n",
6367 consdata->vars[v],
bound) );
6383 assert(v == consdata->nvars - 1);
6386 if( consdata->vals[v] < 0 )
6395 SCIPdebugMsg(
scip,
"fixing variable <%s> with bounds [%.15g,%.15g] to %.15g\n",
6408 consdata->vars[v],
bound) );
6423 ++conshdlrdata->naddconss;
6428 maxvalue, maxvalue,
TRUE,
TRUE,
TRUE,
FALSE,
TRUE,
TRUE,
FALSE,
FALSE,
TRUE,
FALSE) );
6445 if( ninfcheckvars == 1 )
6447 SCIP_Bool tightened;
6453 if( infcheckvals[0] < 0 )
6455 newlb = maxvalue/infcheckvals[0];
6456 newub = minvalue/infcheckvals[0];
6460 newlb = minvalue/infcheckvals[0];
6461 newub = maxvalue/infcheckvals[0];
6468 SCIPdebugMsg(
scip,
"tightening lower bound of variable <%s> from %g to %g\n",
6489 SCIPdebugMsg(
scip,
"tightening upper bound of variable <%s> from %g to %g\n",
6508 else if( ninfcheckvars == nunfixedvars - 1 )
6510 SCIP_Bool foundvar =
FALSE;
6511 SCIP_Bool tightened;
6516 assert(ninfcheckvars > 0);
6517 assert(minvalue < maxvalue);
6520 for( v = 0; v < consdata->nvars - 1; ++v )
6524 if(
w >= ninfcheckvars || consdata->vars[v] != infcheckvars[
w] )
6530 assert((nfixedconsvars == 0) ? (consdata->nvars - v - 1 == ninfcheckvars -
w) :
TRUE);
6532 for( ; v2 < consdata->nvars && w2 < ninfcheckvars; ++v2 )
6537 assert(consdata->vars[v2] == infcheckvars[w2]);
6540 assert(w2 == ninfcheckvars);
6546 if( consdata->vals[v] < 0 )
6548 newlb =
SCIPfloor(
scip, (rhs - minvalue) / consdata->vals[v]);
6549 newub =
SCIPfloor(
scip, (lhs - maxvalue) / consdata->vals[v]);
6553 newlb =
SCIPceil(
scip, (lhs - maxvalue) / consdata->vals[v]);
6554 newub =
SCIPceil(
scip, (rhs - minvalue) / consdata->vals[v]);
6561 SCIPdebugMsg(
scip,
"tightening lower bound of variable <%s> from %g to %g\n",
6573 consdata->vars[v], newlb) );
6583 SCIPdebugMsg(
scip,
"tightening upper bound of variable <%s> from %g to %g\n",
6595 consdata->vars[v], newub) );
6612 assert(v == consdata->nvars - 1);
6615 if( consdata->vals[v] < 0 )
6617 newlb =
SCIPfloor(
scip, (rhs - minvalue) / consdata->vals[v]);
6618 newub =
SCIPfloor(
scip, (lhs - maxvalue) / consdata->vals[v]);
6622 newlb =
SCIPceil(
scip, (lhs - maxvalue) / consdata->vals[v]);
6623 newub =
SCIPceil(
scip, (rhs - minvalue) / consdata->vals[v]);
6630 SCIPdebugMsg(
scip,
"tightening lower bound of variable <%s> from %g to %g\n",
6651 SCIPdebugMsg(
scip,
"tightening upper bound of variable <%s> from %g to %g\n",
6680 assert(maxvalue > minvalue);
6696 ++conshdlrdata->naddconss;
6715 else if( addartconss && ncontvars < ninfcheckvars )
6717 SCIP_Real maxact = 0.0;
6718 SCIP_Real minact = 0.0;
6722 for( v = 0; v < consdata->nvars; ++v )
6734 if( consdata->vals[v] > 0.0 )
6735 maxact += consdata->vals[v];
6737 minact += consdata->vals[v];
6745 if( consdata->vals[v] > 0.0 )
6790 newlhs = lhs - maxact;
6791 newrhs = rhs - minact;
6796 ++conshdlrdata->naddconss;
6834 SCIP_Real minresactivity;
6835 SCIP_Real maxresactivity;
6838 SCIP_Bool infeasible;
6839 SCIP_Bool tightened;
6840 SCIP_Bool ismintight;
6841 SCIP_Bool ismaxtight;
6842 SCIP_Bool isminsettoinfinity;
6843 SCIP_Bool ismaxsettoinfinity;
6860 var = consdata->vars[pos];
6866 val = consdata->vals[pos];
6867 lhs = consdata->lhs;
6868 rhs = consdata->rhs;
6870 &ismintight, &ismaxtight, &isminsettoinfinity, &ismaxsettoinfinity);
6887 newub = (rhs - minresactivity)/val;
6892 SCIP_Bool activityunreliable;
6896 if( activityunreliable )
6899 newub = (rhs - minresactivity)/val;
6905 if( !activityunreliable )
6908 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, old bds=[%.15g,%.15g], val=%.15g, resactivity=[%.15g,%.15g], sides=[%.15g,%.15g] -> newub=%.15g\n",
6911 &infeasible, &tightened) );
6914 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
6929 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, new bds=[%.15g,%.15g]\n",
6940 newlb = (lhs - maxresactivity)/val;
6948 newlb = (lhs - maxresactivity)/val;
6957 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, old bds=[%.15g,%.15g], val=%.15g, resactivity=[%.15g,%.15g], sides=[%.15g,%.15g] -> newlb=%.15g\n",
6960 &infeasible, &tightened) );
6963 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
6977 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, new bds=[%.15g,%.15g]\n",
6990 newlb = (rhs - minresactivity)/val;
6994 SCIP_Bool activityunreliable;
6997 if( activityunreliable )
7000 newlb = (rhs - minresactivity)/val;
7007 if( !activityunreliable )
7010 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, old bds=[%.15g,%.15g], val=%.15g, resactivity=[%.15g,%.15g], sides=[%.15g,%.15g] -> newlb=%.15g\n",
7013 &infeasible, &tightened) );
7016 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
7030 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, new bds=[%.15g,%.15g]\n",
7041 newub = (lhs - maxresactivity)/val;
7049 newub = (lhs - maxresactivity)/val;
7058 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, old bds=[%.15g,%.15g], val=%.15g, resactivity=[%.15g,%.15g], sides=[%.15g,%.15g], newub=%.15g\n",
7061 &infeasible, &tightened) );
7064 SCIPdebugMsg(
scip,
"linear constraint <%s>: cutoff <%s>, new bds=[%.15g,%.15g]\n",
7078 SCIPdebugMsg(
scip,
"linear constraint <%s>: tighten <%s>, new bds=[%.15g,%.15g]\n",
7088#define MAXTIGHTENROUNDS 10
7095 SCIP_Real maxeasyactivitydelta,
7102 unsigned int tightenmode;
7108 int oldnchgbdstotal;
7140 nvars = consdata->nvars;
7150 if( !force && (consdata->boundstightened >= tightenmode) )
7157 assert(consdata->coefsorted);
7176 SCIP_Real minactivity;
7177 SCIP_Real maxactivity;
7178 SCIP_Bool ismintight;
7179 SCIP_Bool ismaxtight;
7180 SCIP_Bool isminsettoinfinity;
7181 SCIP_Bool ismaxsettoinfinity;
7185 &isminsettoinfinity, &ismaxsettoinfinity);
7198 easycase =
SCIPisLT(
scip, consdata->maxactdelta, maxeasyactivitydelta);
7205 oldnchgbdstotal = *nchgbds;
7208 for( nrounds = 0; (force || consdata->boundstightened < tightenmode) && nrounds <
MAXTIGHTENROUNDS; ++nrounds )
7217 assert(consdata->coefsorted);
7221 consdata->boundstightened = (
unsigned int)tightenmode;
7227 while( v <
nvars && v != lastchange && !(*
cutoff) )
7229 oldnchgbds = *nchgbds;
7241 if( *nchgbds > oldnchgbds )
7246 else if( consdata->coefsorted && v < consdata->
nbinvars - 1
7248 v = consdata->nbinvars;
7255 *nchgbds - oldnchgbdstotal, nrounds);
7256 oldnchgbdstotal += oldnchgbds;
7261 if( force &&
SCIPisEQ(
scip, consdata->lhs, consdata->rhs) )
7274 SCIP_Bool checklprows,
7275 SCIP_Bool checkrelmaxabs,
7299 if( consdata->row !=
NULL )
7311 SCIPdebugMsg(
scip,
" consdata activity=%.15g (lhs=%.15g, rhs=%.15g, row=%p, checklprows=%u, rowinlp=%u, sol=%p, hascurrentnodelp=%u)\n",
7312 activity, consdata->lhs, consdata->rhs, (
void*)consdata->row, checklprows,
7317 lhsviol = consdata->lhs - activity;
7318 rhsviol = activity - consdata->rhs;
7322 if( (lhsviol > 0) && (lhsviol > rhsviol) )
7327 else if( rhsviol > 0 )
7352 if( !checkrelmaxabs )
7376 for( v = 0; v < consdata->nvars; ++v )
7378 if( consdata->vals !=
NULL )
7380 coef = consdata->vals[v];
7386 absval =
REALABS( coef * solval );
7387 maxabs =
MAX( maxabs, absval );
7394 if( (consdata->lhs - activity) <= (1e-15 * maxabs) )
7396 SCIPdebugMsg(
scip,
" lhs violated due to random noise: violation=%16.9g, maxabs=%16.9g\n",
7397 consdata->lhs - activity, maxabs);
7411 SCIPdebugMsg(
scip,
" lhs violated absolutely (violation=%16.9g), but feasible when using relative tolerance w.r.t. maximum absolute value (%16.9g)\n",
7412 consdata->lhs - activity, maxabs);
7448 if( (activity - consdata->rhs) <= (1e-15 * maxabs) )
7450 SCIPdebugMsg(
scip,
" rhs violated due to random noise: violation=%16.9g, maxabs=%16.9g\n",
7451 activity - consdata->rhs, maxabs);
7465 SCIPdebugMsg(
scip,
" rhs violated absolutely (violation=%16.9g), but feasible when using relative tolerance w.r.t. maximum absolute value (%16.9g)\n",
7466 activity - consdata->rhs, maxabs);
7500 else if( consdata->checkabsolute &&
7568 if( consdata->row ==
NULL )
7585 if( consdata->nvars == 0 )
7607 assert( pr == 0 || cr == 0 );
7633 if( consdata->nlrow ==
NULL )
7635 assert(consdata->lhs <= consdata->rhs);
7658 SCIP_Bool separatecards,
7659 SCIP_Bool separateall,
7692 if( !separateall &&
sol ==
NULL )
7705 consdata->vals, +1.0, consdata->rhs,
sol,
cutoff, ncuts) );
7713 consdata->vals, -1.0, -consdata->lhs,
sol,
cutoff, ncuts) );
7723 consdata->vals, +1.0, consdata->rhs,
sol,
cutoff, ncuts) );
7728 consdata->vals, -1.0, -consdata->lhs,
sol,
cutoff, ncuts) );
7733 if( *ncuts > oldncuts )
7746 SCIP_Bool tightenbounds,
7747 SCIP_Bool rangedrowpropagation,
7748 SCIP_Real maxeasyactivitydelta,
7755 SCIP_Real minactivity;
7756 SCIP_Real maxactivity;
7757 SCIP_Bool isminacttight;
7758 SCIP_Bool ismaxacttight;
7759 SCIP_Bool isminsettoinfinity;
7760 SCIP_Bool ismaxsettoinfinity;
7772 if( consdata->eventdata ==
NULL )
7804 oldnchgbds = *nchgbds;
7808 if( *nchgbds > oldnchgbds )
7815 if( rangedrowpropagation && tightenbounds && !(*
cutoff) )
7835 if( nfixedvars > 0 )
7836 *nchgbds += 2*nfixedvars;
7843 &isminsettoinfinity, &ismaxsettoinfinity);
7847 SCIPdebugMsg(
scip,
"linear constraint <%s> is infeasible (rhs): activitybounds=[%.15g,%.15g], sides=[%.15g,%.15g]\n",
7848 SCIPconsGetName(cons), minactivity, maxactivity, consdata->lhs, consdata->rhs);
7858 SCIPdebugMsg(
scip,
"linear constraint <%s> is infeasible (lhs): activitybounds=[%.15g,%.15g], sides=[%.15g,%.15g]\n",
7859 SCIPconsGetName(cons), minactivity, maxactivity, consdata->lhs, consdata->rhs);
7869 SCIPdebugMsg(
scip,
"linear constraint <%s> is redundant: activitybounds=[%.15g,%.15g], sides=[%.15g,%.15g]\n",
7870 SCIPconsGetName(cons), minactivity, maxactivity, consdata->lhs, consdata->rhs);
7873 if( consdata->nvars > 0 )
7904 SCIP_Bool infeasible;
7915 for( v = 0; v < consdata->nvars; ++v )
7918 var = consdata->vars[v];
7930 SCIPdebugMsg(
scip,
"converting variable <%s> with fixed bounds [%.15g,%.15g] into fixed variable fixed at %.15g\n",
7954 assert(consdata->removedfixings);
7959#define MAX_CLIQUE_NONZEROS_PER_CONS 1000000
8029 SCIP_Real maxeasyactivitydelta,
8039 SCIP_Bool lhsclique;
8040 SCIP_Bool rhsclique;
8041 SCIP_Bool finitelhs;
8042 SCIP_Bool finiterhs;
8043 SCIP_Bool finiteminact;
8044 SCIP_Bool finitemaxact;
8045 SCIP_Bool finitenegminact;
8046 SCIP_Bool finitenegmaxact;
8047 SCIP_Bool finiteposminact;
8048 SCIP_Bool finiteposmaxact;
8049 SCIP_Bool infeasible;
8051 int cliquenonzerosadded;
8068 if( consdata->nvars < 2 )
8077 if( !consdata->implsadded )
8095 nvars = consdata->nvars;
8096 vars = consdata->vars;
8097 vals = consdata->vals;
8100 if( !consdata->validactivities )
8102 assert(consdata->validactivities);
8106 finitenegminact = (consdata->glbminactivityneginf == 0 && consdata->glbminactivityneghuge == 0);
8107 finitenegmaxact = (consdata->glbmaxactivityneginf == 0 && consdata->maxactivityneghuge == 0);
8108 finiteposminact = (consdata->glbminactivityposinf == 0 && consdata->glbminactivityposhuge == 0);
8109 finiteposmaxact = (consdata->glbmaxactivityposinf == 0 && consdata->glbmaxactivityposhuge == 0);
8110 finiteminact = (finitenegminact && finiteposminact);
8111 finitemaxact = (finitenegmaxact && finiteposmaxact);
8113 if( (finiterhs || finitelhs) && (finitenegminact || finiteposminact || finitenegmaxact || finiteposmaxact) )
8115 SCIP_Real maxabscontrib = -1.0;
8116 SCIP_Bool posval =
FALSE;
8117 SCIP_Bool allbinary =
TRUE;
8118 int oldnchgbds = *nchgbds;
8124 if( (finitenegminact || finiteposminact) && !consdata->validglbminact )
8127 assert(consdata->validglbminact);
8130 if( (finitenegmaxact || finiteposmaxact) && !consdata->validglbmaxact )
8133 assert(consdata->validglbmaxact);
8135 assert(consdata->validglbminact || consdata->validglbmaxact);
8140 for( v =
nvars - 1; v >= 0; --v )
8148 if( value > maxabscontrib )
8150 maxabscontrib = value;
8161 if( value > maxabscontrib )
8163 maxabscontrib = value;
8174 if( !
SCIPisEQ(
scip, maxabscontrib, 1.0) && !allbinary )
8180 if( finiterhs && finiteminact &&
SCIPisEQ(
scip,
QUAD_TO_DBL(consdata->glbminactivity), consdata->rhs - maxabscontrib) )
8182 for( v =
nvars - 1; v >= 0; --v )
8194 *nchgbds += nbdchgs;
8201 *nchgbds += nbdchgs;
8221 if( finitelhs && finitemaxact &&
SCIPisEQ(
scip,
QUAD_TO_DBL(consdata->glbmaxactivity), consdata->lhs - maxabscontrib) )
8223 for( v =
nvars - 1; v >= 0; --v )
8235 *nchgbds += nbdchgs;
8242 *nchgbds += nbdchgs;
8261 SCIPdebugMsg(
scip,
"extracted %d implications from constraint %s which led to %d bound changes, %scutoff detetcted\n", nimpls,
SCIPconsGetName(cons), *nchgbds - oldnchgbds, *
cutoff ?
"" :
"no ");
8267 if( *nchgbds - oldnchgbds > 0 )
8288 consdata->implsadded =
TRUE;
8292 if( consdata->cliquesadded )
8295 consdata->cliquesadded =
TRUE;
8296 cliquenonzerosadded = 0;
8302 nvars = consdata->nvars;
8303 vars = consdata->vars;
8304 vals = consdata->vals;
8309 if( !consdata->validactivities )
8311 assert(consdata->validactivities);
8315 finitenegminact = (consdata->glbminactivityneginf == 0 && consdata->glbminactivityneghuge == 0);
8316 finitenegmaxact = (consdata->glbmaxactivityneginf == 0 && consdata->maxactivityneghuge == 0);
8317 finiteposminact = (consdata->glbminactivityposinf == 0 && consdata->glbminactivityposhuge == 0);
8318 finiteposmaxact = (consdata->glbmaxactivityposinf == 0 && consdata->glbmaxactivityposhuge == 0);
8319 finiteminact = (finitenegminact && finiteposminact);
8320 finitemaxact = (finitenegmaxact && finiteposmaxact);
8325 if( (finiterhs || finitelhs) && (finitenegminact || finiteposminact || finitenegmaxact || finiteposmaxact) )
8328 SCIP_Real* binvarvals;
8329 int nposbinvars = 0;
8330 int nnegbinvars = 0;
8331 int allonebinary = 0;
8346 binvars[nposbinvars + nnegbinvars] =
vars[
i];
8347 binvarvals[nposbinvars + nnegbinvars] = vals[
i];
8365 if( allonebinary <
nvars && (nposbinvars >= 2 || nnegbinvars >= 2) )
8367 SCIP_Real threshold;
8368 int oldnchgbds = *nchgbds;
8374 if( (finitenegminact || finiteposminact) && !consdata->validglbminact )
8377 assert(consdata->validglbminact);
8380 if( (finitenegmaxact || finiteposmaxact) && !consdata->validglbmaxact )
8383 assert(consdata->validglbmaxact);
8385 assert(consdata->validglbminact || consdata->validglbmaxact);
8391 if( finiterhs && finitenegminact && nposbinvars >= 2 )
8394 threshold = consdata->rhs -
QUAD_TO_DBL(consdata->glbminactivity);
8397#ifdef SCIP_DISABLED_CODE
8406 while( j < nposbinvars )
8420 *nchgbds += nbdchgs;
8422 cliquenonzerosadded += j;
8427 if( !stopped && !(*
cutoff) && j < nposbinvars )
8430 int lastfit = j - 2;
8437 while( lastfit >= 0 && j < nposbinvars )
8442 clqvars[lastfit + 1] = binvars[j];
8453 *nchgbds += nbdchgs;
8455 cliquenonzerosadded += (lastfit + 2);
8474 if( !stopped && !*
cutoff && *nchgbds - oldnchgbds > 0 )
8495 if( !consdata->validactivities )
8497 assert(consdata->validactivities);
8499 nvars = consdata->nvars;
8500 vars = consdata->vars;
8501 vals = consdata->vals;
8516 binvars[nposbinvars + nnegbinvars] =
vars[
i];
8517 binvarvals[nposbinvars + nnegbinvars] = vals[
i];
8535 oldnchgbds = *nchgbds;
8539 if( !stopped && !(*
cutoff) && finitelhs && finiteposmaxact && nnegbinvars >= 2 )
8542 threshold = consdata->lhs -
QUAD_TO_DBL(consdata->glbmaxactivity);
8544 i = nposbinvars + nnegbinvars - 1;
8555 while( j >= nposbinvars )
8570 *nchgbds += nbdchgs;
8572 cliquenonzerosadded += (
i - j);
8577 if( !stopped && !(*
cutoff) && jstart >= nposbinvars )
8580 int lastfit = jstart + 1;
8588 while( lastfit <= i && j >= nposbinvars )
8593 assert(lastfit - jstart - 2 >= 0 && lastfit - jstart - 2 <
i);
8594 clqvars[lastfit - jstart - 2] = binvars[j];
8606 *nchgbds += nbdchgs;
8608 cliquenonzerosadded += (
i - lastfit + 2);
8627 if( !stopped && !*
cutoff && *nchgbds - oldnchgbds > 0 )
8648 if( !consdata->validactivities )
8650 assert(consdata->validactivities);
8652 nvars = consdata->nvars;
8653 vars = consdata->vars;
8654 vals = consdata->vals;
8669 binvars[nposbinvars + nnegbinvars] =
vars[
i];
8670 binvarvals[nposbinvars + nnegbinvars] = vals[
i];
8688 oldnchgbds = *nchgbds;
8692 if( !(*
cutoff) && finiterhs && finiteminact && nnegbinvars >= 2 )
8701 threshold = consdata->rhs -
QUAD_TO_DBL(consdata->glbminactivity);
8703 i = nposbinvars + nnegbinvars - 1;
8715 while( j >= nposbinvars )
8730 *nchgbds += nbdchgs;
8732 cliquenonzerosadded += (
i - j);
8737 if( !stopped && !(*
cutoff) && jstart >= nposbinvars )
8740 int lastfit = j + 1;
8748 while( lastfit <= i && j >= nposbinvars )
8753 assert(lastfit - jstart - 2 >= 0 && lastfit - jstart - 2 <
i);
8754 clqvars[lastfit - jstart - 2] = binvars[j];
8766 *nchgbds += nbdchgs;
8768 cliquenonzerosadded += (
i - lastfit + 2);
8789 if( !stopped && !*
cutoff && *nchgbds - oldnchgbds > 0 )
8810 if( !consdata->validactivities )
8812 assert(consdata->validactivities);
8814 nvars = consdata->nvars;
8815 vars = consdata->vars;
8816 vals = consdata->vals;
8831 binvars[nposbinvars + nnegbinvars] =
vars[
i];
8832 binvarvals[nposbinvars + nnegbinvars] = vals[
i];
8852 if( !stopped && !(*
cutoff) && finitelhs && finitemaxact && nposbinvars >= 2 )
8861 threshold = consdata->lhs -
QUAD_TO_DBL(consdata->glbmaxactivity);
8874 while( j < nposbinvars )
8888 *nchgbds += nbdchgs;
8890 cliquenonzerosadded += j;
8895 if( !stopped && !(*
cutoff) && j < nposbinvars )
8898 int lastfit = j - 2;
8905 while( lastfit >= 0 && j < nposbinvars )
8910 clqvars[lastfit + 1] = binvars[j];
8921 *nchgbds += nbdchgs;
8923 cliquenonzerosadded += lastfit + 2;
8967 lhsclique =
SCIPisEQ(
scip, consdata->lhs, (SCIP_Real)nposcoefs - 1.0);
8968 rhsclique =
SCIPisEQ(
scip, consdata->rhs, 1.0 - (SCIP_Real)nnegcoefs);
8970 if( lhsclique || rhsclique )
8975 SCIPdebugMsg(
scip,
"linear constraint <%s>: adding clique with %d vars (%d pos, %d neg)\n",
8980 values[
i] = (rhsclique == (vals[
i] > 0.0));
8987 *nchgbds += nbdchgs;
9000 SCIP_Bool* infeasible
9019 *infeasible =
FALSE;
9029 for(
i = 0;
i < consdata->nvars && integral; ++
i )
9050 SCIPdebugMsg(
scip,
"rounding sides=[%.15g,%.15g] of linear constraint <%s> with integral coefficients and variables only "
9051 "is infeasible\n", consdata->lhs, consdata->rhs,
SCIPconsGetName(cons));
9057 SCIPdebugMsg(
scip,
"linear constraint <%s>: make sides integral: sides=[%.15g,%.15g]\n",
9065 if( !consdata->upgraded )
9073 if( !consdata->upgraded )
9076 SCIPdebugMsg(
scip,
"linear constraint <%s>: new integral sides: sides=[%.15g,%.15g]\n",
9127 SCIP_Real minactivity;
9129 SCIP_Real maxactivity;
9131 SCIP_Bool isminacttight;
9132 SCIP_Bool ismaxacttight;
9133 SCIP_Bool isminsettoinfinity;
9134 SCIP_Bool ismaxsettoinfinity;
9135 SCIP_Real minleftactivity;
9136 SCIP_Real maxleftactivity;
9159 if( (consdata->validmaxabsval && consdata->maxabsval >
MAXVALRECOMP)
9160 || (consdata->validminabsval && consdata->minabsval <
MINVALRECOMP) )
9168 &isminsettoinfinity, &ismaxsettoinfinity);
9170 minleftactivity = 0.0;
9171 maxleftactivity = 0.0;
9177 var = consdata->vars[
i];
9182 val = consdata->vals[
i];
9198 lval = consdata->lhs - minactivity;
9199 rval = maxactivity - consdata->rhs;
9202 if( consdata->nvars == 2 )
9205 otherval = consdata->vals[1-
i];
9209 lval = consdata->lhs - val*lb;
9215 rval = val*ub - consdata->rhs;
9220 newval =
MAX(lval, rval);
9224 newlhs = consdata->lhs - val * lb;
9225 newlhs += newval * lb;
9226 newrhs = consdata->rhs - val * ub;
9227 newrhs += newval * ub;
9231 SCIPdebugMsg(
scip,
"linear constraint <%s>: change coefficient %+.15g<%s> to %+.15g<%s>, act=[%.15g,%.15g], side=[%.15g,%.15g]\n",
9233 minactivity, maxactivity, consdata->lhs, consdata->rhs);
9249 &isminsettoinfinity, &ismaxsettoinfinity);
9279 minleftactivity += val * lb;
9289 maxleftactivity += val * ub;
9305 lval = minactivity - consdata->lhs;
9306 rval = consdata->rhs - maxactivity;
9309 if( consdata->nvars == 2 )
9312 otherval = consdata->vals[1-
i];
9316 lval = val*ub - consdata->lhs;
9322 rval = consdata->rhs - val*lb;
9327 newval =
MIN(lval, rval);
9331 newlhs = consdata->lhs - val * ub;
9332 newlhs += newval * ub;
9333 newrhs = consdata->rhs - val * lb;
9334 newrhs += newval * lb;
9338 SCIPdebugMsg(
scip,
"linear constraint <%s>: change coefficient %+.15g<%s> to %+.15g<%s>, act=[%.15g,%.15g], side=[%.15g,%.15g]\n",
9340 minactivity, maxactivity, consdata->lhs, consdata->rhs);
9356 &isminsettoinfinity, &ismaxsettoinfinity);
9386 minleftactivity += val * ub;
9396 maxleftactivity += val * lb;
9404 minleftactivity, consdata->rhs);
9406 maxleftactivity, consdata->lhs);
9433 aggrlhs = consdata->lhs - minactivity + minleftactivity;
9434 aggrrhs = consdata->rhs - maxactivity + maxleftactivity;
9445 SCIP_Real minleftactivitypart;
9446 SCIP_Real maxleftactivitypart;
9454 var = consdata->vars[
i];
9455 minleftactivitypart = 0.0;
9456 maxleftactivitypart = 0.0;
9461 val = consdata->vals[
i];
9471 SCIPdebugMsg(
scip,
"minactivity = %g\tval = %g\tlhs = %g\n", minactivity, val, consdata->lhs);
9472 SCIPdebugMsg(
scip,
"maxactivity = %g\tval = %g\trhs = %g\n", maxactivity, val, consdata->rhs);
9473 SCIPdebugMsg(
scip,
"linear constraint <%s>: remove variable <%s> with coefficient <%g> from constraint since it is redundant\n",
9476 minleftactivitypart = val * lb;
9477 maxleftactivitypart = val * ub;
9484 &isminsettoinfinity, &ismaxsettoinfinity);
9499 SCIPdebugMsg(
scip,
"linear constraint <%s>: remove variable <%s> with coefficient <%g> from constraint since it is redundant\n",
9502 minleftactivitypart = val * ub;
9503 maxleftactivitypart = val * lb;
9510 &isminsettoinfinity, &ismaxsettoinfinity);
9526 newlhs = consdata->lhs - minleftactivitypart;
9527 newrhs = consdata->rhs - maxleftactivitypart;
9564 SCIP_Bool infeasible;
9575 assert(consdata->nvars == 1);
9579 var = consdata->vars[0];
9580 val = consdata->vals[0];
9600 if( !consdata->upgraded )
9617 SCIP_Bool infeasible;
9618 SCIP_Bool redundant;
9619 SCIP_Bool aggregated;
9629 assert(consdata->nvars == 2);
9632 SCIPdebugMsg(
scip,
"linear constraint <%s>: aggregate %.15g<%s> + %.15g<%s> == %.15g\n",
9634 consdata->vals[1],
SCIPvarGetName(consdata->vars[1]), consdata->rhs);
9638 consdata->rhs, &infeasible, &redundant, &aggregated) );
9657 if( !consdata->upgraded )
9670 SCIP_Real slackcoef,
9675 SCIP_Real slackvarlb;
9676 SCIP_Real slackvarub;
9687 if( slackcoef > 0.0 )
9692 *newrhs = consdata->rhs - slackcoef * slackvarlb;
9696 *newlhs = consdata->lhs - slackcoef * slackvarub;
9703 *newlhs = consdata->rhs - slackcoef * slackvarlb;
9707 *newrhs = consdata->lhs - slackcoef * slackvarub;
9736 SCIP_Real bestslackdomrng;
9737 SCIP_Real minabsval;
9738 SCIP_Real maxabsval;
9739 SCIP_Bool bestremovescons;
9740 SCIP_Bool coefszeroone;
9741 SCIP_Bool coefsintegral;
9742 SCIP_Bool varsintegral;
9743 SCIP_Bool infeasible;
9752 int maxnlocksremove;
9769 assert(consdata->nvars > 2);
9779 lhs = consdata->lhs;
9780 rhs = consdata->rhs;
9782 if( consdata->nvars == 3 )
9787 maxnlocksremove = 3;
9789 else if( consdata->nvars == 4 )
9794 maxnlocksremove = 2;
9799 maxnlocksremove = 1;
9818 vars = consdata->vars;
9819 vals = consdata->vals;
9822 bestnlocks = INT_MAX;
9823 bestremovescons =
FALSE;
9824 bestslackdomrng = 0.0;
9825 coefszeroone =
TRUE;
9826 coefsintegral =
TRUE;
9827 varsintegral =
TRUE;
9835 for( v = 0; v < consdata->nvars; ++v )
9859 if( absval < minabsval )
9861 if( absval > maxabsval )
9865 if( maxabsval / minabsval > conshdlrdata->maxmultaggrquot )
9869 coefszeroone = coefszeroone &&
SCIPisEQ(
scip, absval, 1.0);
9897 if( nlocks > maxnlocksremove )
9901 if( (iscont || (coefsintegral && varsintegral &&
SCIPisEQ(
scip, absval, 1.0))) &&
9906 SCIP_Real slackdomrng;
9915 slackdomrng = (varub - varlb)*absval;
9919 better = (slacktype > bestslacktype) || (bestslackpos == -1);
9920 if( !better && slacktype == bestslacktype )
9922 better = (nlocks < bestnlocks);
9923 if( nlocks == bestnlocks && !bestremovescons )
9926 equal = !better &&
SCIPisGE(
scip, slackdomrng, bestslackdomrng);
9930 if( better || equal )
9932 SCIP_Real minresactivity;
9933 SCIP_Real maxresactivity;
9936 SCIP_Bool removescons;
9937 SCIP_Bool ismintight;
9938 SCIP_Bool ismaxtight;
9939 SCIP_Bool isminsettoinfinity;
9940 SCIP_Bool ismaxsettoinfinity;
9944 &ismintight, &ismaxtight, &isminsettoinfinity, &ismaxsettoinfinity);
9949 if( !ismintight || !ismaxtight )
9969 if( conshdlrdata->multaggrremove && !removescons )
9973 if( bestremovescons && !removescons )
9979 if( !removescons && nlocks > maxnlocksstay )
9982 better = better || (!bestremovescons && removescons);
9986 bestslacktype = slacktype;
9987 bestnlocks = nlocks;
9988 bestslackdomrng = slackdomrng;
9989 bestremovescons = removescons;
10009 for( v = 0; v < consdata->nvars; ++v )
10011 if( v != bestslackpos )
10043 assert(!samevar || (supinf > 0 && infinf > 0));
10047 if( (samevar && (supinf > 1 || infinf > 1)) || (!samevar && supinf > 0 && infinf > 0) )
10049 SCIPdebugMsg(
scip,
"do not perform multi-aggregation: infimum and supremum are both infinite\n");
10058 if( bestslackpos >= 0
10060 || (coefsintegral && varsintegral && nimplvars == 0)) )
10064 SCIP_Real slackcoef;
10065 SCIP_Real aggrconst;
10068 SCIP_Bool aggregated;
10082 slackvar =
vars[bestslackpos];
10083 slackcoef = vals[bestslackpos];
10085 aggrconst = consdata->rhs/slackcoef;
10098 for( v = 0; v < consdata->nvars; ++v )
10100 scalars[v] = -consdata->vals[v]/slackcoef;
10103 SCIPdebugMsgPrint(
scip,
" %+.15g, bounds of <%s>: [%.15g,%.15g], nlocks=%d, maxnlocks=%d, removescons=%u\n",
10105 bestnlocks, bestremovescons ? maxnlocksremove : maxnlocksstay, bestremovescons);
10109 &infeasible, &aggregated) );
10126 if( bestremovescons )
10131 if( !consdata->upgraded )
10135 else if( ncontvars == 1 )
10139 assert(0 <= contvarpos && contvarpos < consdata->
nvars);
10149 SCIPdebugMsg(
scip,
"linear constraint <%s>: converting continuous variable <%s> to implicit integer variable\n",
10167 SCIP_Bool redundant;
10168 SCIP_Bool aggregated;
10170 absval =
REALABS(vals[contvarpos]);
10181#ifdef WITH_DEBUG_SOLUTION
10182 if( SCIPdebugIsMainscip(
scip) )
10191 SCIPdebugMsg(
scip,
"linear constraint <%s>: aggregating continuous variable <%s> to newly created implicit integer variable <%s>, aggregation factor = %g\n",
10199 SCIPdebugMsg(
scip,
"infeasible aggregation of variable <%s> to implicit variable <%s>, domain is empty\n",
10221 consdata->boundstightened = 0;
10222 consdata->rangedrowpropagated = 0;
10223 consdata->presolved =
FALSE;
10226 else if( ncontvars == 0 && nimplvars == 0 &&
nintvars == 1 && !coefszeroone )
10234 assert(0 <= intvarpos && intvarpos < consdata->
nvars);
10243 SCIPdebugMsg(
scip,
"linear constraint <%s>: converting integer variable <%s> to implicit integer variable\n",
10277 vars = consdata->vars;
10278 nvars = consdata->nvars;
10282 for( v = 0; v <
nvars; ++v )
10306 val = consdata->vals[v];
10313 (*scale) = val / -
objval;
10325 (*scale) = val /
objval;
10348 SCIP_Bool applicable;
10361 nvars = consdata->nvars;
10370 (
nvars == nobjvars && (!conshdlrdata->detectcutoffbound || !conshdlrdata->detectlowerbound)) )
10373 offset = consdata->rhs;
10383 vars = consdata->vars;
10388 SCIPdebugMsg(
scip,
"linear equality constraint <%s> == %g (offset %g) is a subset of the objective function\n",
10396 for( v = 0; v <
nvars; ++v )
10413 SCIP_Real primalbound
10416 SCIP_Real cutoffbound;
10465 SCIP_Bool applicable;
10480 nvars = consdata->nvars;
10495 if( nobjvars == 0 )
10510 if( conshdlrdata->detectcutoffbound && rhsfinite )
10512 SCIP_Real primalbound;
10514 primalbound = (consdata->rhs - offset) / scale;
10516 SCIPdebugMsg(
scip,
"constraint <%s> is parallel to objective function and provides a cutoff bound <%g>\n",
10522 if( conshdlrdata->detectlowerbound && lhsfinite )
10524 SCIP_Real lowerbound;
10526 lowerbound = (consdata->lhs - offset) / scale;
10528 SCIPdebugMsg(
scip,
"constraint <%s> is parallel to objective function and provides a lower bound <%g>\n",
10534 if( (conshdlrdata->detectcutoffbound && (conshdlrdata->detectlowerbound || !lhsfinite)) ||
10535 (conshdlrdata->detectlowerbound && !rhsfinite) )
10544 if( conshdlrdata->detectlowerbound && rhsfinite )
10546 SCIP_Real lowerbound;
10548 lowerbound = (consdata->rhs - offset) / scale;
10550 SCIPdebugMsg(
scip,
"constraint <%s> is parallel to objective function and provides a lower bound <%g>\n",
10556 if( conshdlrdata->detectcutoffbound && lhsfinite )
10558 SCIP_Real primalbound;
10560 primalbound = (consdata->lhs - offset) / scale;
10562 SCIPdebugMsg(
scip,
"constraint <%s> is parallel to objective function and provides a cutoff bound <%g>\n",
10568 if( (conshdlrdata->detectcutoffbound && (conshdlrdata->detectlowerbound || !rhsfinite)) ||
10569 (conshdlrdata->detectlowerbound && !lhsfinite) )
10605 assert(consdata->removedfixings);
10612 if( consdata->nvars == 1 )
10617 else if( consdata->nvars == 2 )
10651 for( v = 0; v < consdata->nvars; ++v )
10668 SCIP_Real minresactivity,
10669 SCIP_Real maxresactivity,
10681 *minval = -maxresactivity;
10683 *minval = (side - maxresactivity)/val;
10686 *maxval = -minresactivity;
10688 *maxval = (side - minresactivity)/val;
10693 *minval = minresactivity;
10695 *minval = (side - minresactivity)/val;
10698 *maxval = maxresactivity;
10700 *maxval = (side - maxresactivity)/val;
10720 SCIP_Bool lhsexists;
10721 SCIP_Bool rhsexists;
10722 SCIP_Bool bestisint;
10723 SCIP_Bool bestislhs;
10724 SCIP_Real minabsval;
10725 SCIP_Real maxabsval;
10768 if( consdata->nvars <= 2 )
10769 maxotherlocks = INT_MAX;
10770 else if( consdata->nvars == 3 )
10772 else if( consdata->nvars == 4 )
10778 if( lhsexists && rhsexists && maxotherlocks < INT_MAX )
10783 for(
i = 0;
i < consdata->nvars && bestisint; ++
i )
10795 val = consdata->vals[
i];
10799 if( absval < minabsval )
10800 minabsval = absval;
10801 if( absval > maxabsval )
10802 maxabsval = absval;
10805 if( maxabsval / minabsval > conshdlrdata->maxdualmultaggrquot )
10808 var = consdata->vars[
i];
10812 if( bestpos >= 0 && isint )
10824 val = consdata->vals[
i];
10861 if( agglhs || aggrhs )
10863 SCIP_Real minresactivity;
10864 SCIP_Real maxresactivity;
10867 SCIP_Bool ismintight;
10868 SCIP_Bool ismaxtight;
10869 SCIP_Bool isminsettoinfinity;
10870 SCIP_Bool ismaxsettoinfinity;
10874 &ismintight, &ismaxtight, &isminsettoinfinity, &ismaxsettoinfinity);
10881 assert((ismintight || isminsettoinfinity) && (ismaxtight || ismaxsettoinfinity));
10892 SCIP_Real oldmaxresactivity;
10893 SCIP_Real oldminresactivity;
10894 SCIP_Bool recalculated;
10896 recalculated =
FALSE;
10897 oldmaxresactivity = maxresactivity;
10898 oldminresactivity = minresactivity;
10904 recalculated = !
SCIPisEQ(
scip, oldminresactivity, minresactivity);
10905 isminsettoinfinity =
TRUE;
10912 recalculated = recalculated || !
SCIPisEQ(
scip, oldmaxresactivity, maxresactivity);
10913 ismaxsettoinfinity =
TRUE;
10952 SCIP_Real oldmaxresactivity;
10953 SCIP_Real oldminresactivity;
10954 SCIP_Bool recalculated;
10956 recalculated =
FALSE;
10957 oldmaxresactivity = maxresactivity;
10958 oldminresactivity = minresactivity;
10964 recalculated = !
SCIPisEQ(
scip, oldminresactivity, minresactivity);
10971 recalculated = recalculated || !
SCIPisEQ(
scip, oldmaxresactivity, maxresactivity);
11002 SCIP_Real* aggrcoefs;
11003 SCIP_Real aggrconst;
11009 SCIP_Bool infeasible;
11010 SCIP_Bool aggregated;
11019 assert(!bestislhs || lhsexists);
11020 assert(bestislhs || rhsexists);
11022 bestvar = consdata->vars[bestpos];
11023 bestval = consdata->vals[bestpos];
11040 for( j = 0; j < consdata->nvars; ++j )
11044 SCIP_Real absaggrcoef;
11046 aggrvars[naggrs] = consdata->vars[j];
11047 aggrcoefs[naggrs] = -consdata->vals[j]/consdata->vals[bestpos];
11050 absaggrcoef =
REALABS(aggrcoefs[naggrs]);
11053 if( absaggrcoef < epsilon )
11055 SCIPdebugMsg(
scip,
"do not perform multi-aggregation: too large aggregation coefficients\n");
11068 aggrcoefs[naggrs] =
SCIPfloor(
scip, aggrcoefs[naggrs]+0.5);
11103 assert(!samevar || (supinf > 0 && infinf > 0));
11105 aggrconst = (bestislhs ? consdata->lhs/bestval : consdata->rhs/bestval);
11108 assert(naggrs == consdata->nvars-1);
11117 aggregated =
FALSE;
11118 infeasible =
FALSE;
11121 if( (samevar && supinf == 1 && infinf == 1) || (!samevar && (supinf == 0 || infinf == 0)) )
11133 SCIP_Bool infeasiblevartypechg;
11135 for( j = 0; j < naggrs; ++j)
11143 assert(!infeasiblevartypechg);
11152 SCIPdebugMsg(
scip,
"do not perform multi-aggregation: infimum and supremum are both infinite\n");
11171 if( !consdata->upgraded )
11186#define CONTWEIGHT 8
11254 SCIP_Bool infeasible;
11256 SCIP_Bool aggregated;
11257 SCIP_Bool redundant;
11265 lhs = consdata->lhs;
11266 vars = consdata->vars;
11267 vals = consdata->vals;
11268 nvars = consdata->nvars;
11277 for( v = 0; v <
nvars && noddvars < 3; ++v )
11292 if( noddvars == 0 )
11304 if( noddvars == 1 )
11308 SCIPdebugMsg(
scip,
"linear constraint <%s>: try fixing variable <%s> to <%g>\n",
11328 else if( noddvars == 2 )
11337 SCIPdebugMsg(
scip,
"linear constraint <%s>: try aggregation of variables <%s> and <%s>\n",
11341 lhsodd ? 1.0 : 0.0, &infeasible, &redundant, &aggregated) );
11382 while( success && consdata->nvars >= 1 );
11411 if( vartype2 != vartype1 )
11421 value =
REALABS(consdata->vals[ind2]) -
REALABS(consdata->vals[ind1]);
11424 return (value > 0 ? +1 : (value < 0 ? -1 : 0));
11444 SCIP_Real secondminval;
11461 nvars = consdata->nvars;
11467 lhs = consdata->lhs;
11468 rhs = consdata->rhs;
11477 vals = consdata->vals;
11478 vars = consdata->vars;
11486 for( v =
nvars - 1; v >= 0; --v )
11492 secondminval = minval;
11495 else if( secondminval > vals[v] || secondminval ==
SCIP_INVALID )
11496 secondminval = vals[v];
11510 for( v =
nvars - 1; v >= 0; --v )
11514 (*nchgcoefs) +=
nvars;
11550 SCIP_Bool* infeasible
11557 SCIP_Real minactsub;
11558 SCIP_Real maxactsub;
11559 SCIP_Real siderest;
11570 SCIP_Longint restcoef;
11571 SCIP_Longint oldgcd;
11574 SCIP_Bool isminsettoinfinity;
11575 SCIP_Bool ismaxsettoinfinity;
11576 SCIP_Bool ismintight;
11577 SCIP_Bool ismaxtight;
11578 SCIP_Bool allcoefintegral;
11597 *infeasible =
FALSE;
11609 nvars = consdata->nvars;
11633 consdata->normalized =
FALSE;
11641 if( !consdata->normalized )
11644 lhs = consdata->lhs;
11645 rhs = consdata->rhs;
11659 SCIPdebug( oldnchgcoefs = *nchgcoefs; )
11660 SCIPdebug( oldnchgsides = *nchgsides; )
11663 if( haslhs && hasrhs )
11669 assert(haslhs != hasrhs);
11685 consdata->indexsorted =
FALSE;
11686 consdata->coefsorted =
FALSE;
11688 vars = consdata->vars;
11689 vals = consdata->vals;
11712 &ismintight, &ismaxtight, &isminsettoinfinity, &ismaxsettoinfinity);
11715 if( isminsettoinfinity || ismaxsettoinfinity )
11720 assert(maxact > minact);
11726 side = haslhs ? lhs : rhs;
11727 minactsub = minact;
11728 maxactsub = maxact;
11797 for(
w = 0;
w < v; ++
w )
11805 maxactsub -= ub * vals[
w];
11806 minactsub -= lb * vals[
w];
11807 assert(maxactsub > minactsub);
11822 SCIP_Bool redundant =
FALSE;
11823 SCIP_Bool numericsok;
11824 SCIP_Bool rredundant;
11825 SCIP_Bool lredundant;
11838 maxactsub -= ub * vals[0];
11839 minactsub -= lb * vals[0];
11843 maxactsub -= lb * vals[0];
11844 minactsub -= ub * vals[0];
11846 assert(maxactsub > minactsub);
11851 allcoefintegral =
TRUE;
11854 for( ; v <
nvars - 1; ++v )
11861 allcoefintegral =
FALSE;
11880 maxactsub -= ub * vals[v];
11881 minactsub -= lb * vals[v];
11885 maxactsub -= lb * vals[v];
11886 minactsub -= ub * vals[v];
11903 rredundant = hasrhs && maxactsub <= siderest &&
SCIPisFeasGT(
scip, minactsub, siderest - gcd);
11904 lredundant = haslhs &&
SCIPisFeasLT(
scip, maxactsub, siderest) && minactsub >= siderest - gcd;
11907 if( offsetv == -1 && (rredundant || lredundant) )
11933 SCIPdebugMsg(
scip,
"stopped at pos %d (of %d), subactivities [%g, %g], redundant = %u, hasrhs = %u, siderest = %g, gcd = %" SCIP_LONGINT_FORMAT ", offset position for 'side' coefficients = %d\n",
11934 v,
nvars, minactsub, maxactsub, redundant, hasrhs, siderest, gcd, offsetv);
11941 rredundant = hasrhs && maxactsub <= siderest &&
SCIPisFeasGT(
scip, minactsub, siderest - gcd);
11942 lredundant = haslhs &&
SCIPisFeasLT(
scip, maxactsub, siderest) && minactsub >= siderest - gcd;
11945 if( v <
nvars && numericsok && (redundant || (offsetv == -1 && (rredundant || lredundant))) )
11951 SCIP_Real tmpminactsub = 0.0;
11952 SCIP_Real tmpmaxactsub = 0.0;
11966 tmpmaxactsub += ub * vals[
w];
11967 tmpminactsub += lb * vals[
w];
11971 tmpmaxactsub += lb * vals[
w];
11972 tmpminactsub += ub * vals[
w];
11974 assert(tmpmaxactsub >= tmpminactsub);
11994 (haslhs && tmpmaxactsub < siderest &&
SCIPisFeasGE(
scip, tmpminactsub, siderest - gcd)));
11997 SCIPdebugMsg(
scip,
"removing %d last variables from constraint <%s>, because they never change anything on the feasibility of this constraint\n",
12005 (*nchgcoefs) += (
nvars - v);
12013 assert(vals == consdata->vals);
12028 rhs = consdata->rhs;
12035 lhs = consdata->lhs;
12046 nvars = consdata->nvars;
12049 allcoefintegral =
TRUE;
12053 for(
w = offsetv + 1;
w <
nvars; ++
w )
12062 if( offsetv >= 0 && gcd == 1 )
12072 for( v =
nvars - 1; v > offsetv; --v )
12080 allcoefintegral =
FALSE;
12106 if( candpos == -1 )
12116 assert(v > offsetv || candpos > offsetv);
12122 candpos =
nvars - 1;
12125 if( gcd > 1 && allcoefintegral && !redundant )
12128 allcoefintegral =
FALSE;
12132 if( offsetv >= 0 && gcd > 1 && allcoefintegral )
12139 SCIP_Bool notchangable =
FALSE;
12143 for(
w = offsetv + 1;
w <
nvars; ++
w )
12161 restcoef = ((
SCIP_Longint)(vals[candpos] + feastol)) % gcd;
12168 if( restcoef > rest )
12169 newcoef = vals[candpos] - restcoef + gcd;
12171 newcoef = vals[candpos] - restcoef;
12176 if( rest == 0 || restcoef < rest )
12177 newcoef = vals[candpos] - restcoef;
12179 newcoef = vals[candpos] - restcoef + gcd;
12189 notchangable =
TRUE;
12230 for(
w = offsetv;
w >= 0; --
w )
12236 (*nchgcoefs) += (offsetv + 1);
12239 if( !notchangable )
12243 assert(vals == consdata->vals);
12249 nvars = consdata->nvars;
12254 lhs = consdata->lhs;
12255 rhs = consdata->rhs;
12269 allcoefintegral =
TRUE;
12271 for( v =
nvars - 1; v >= 0; --v )
12276 allcoefintegral =
FALSE;
12288 SCIP_Real
frac = 0.0;
12289 SCIP_Bool found =
FALSE;
12293 if( allcoefintegral )
12304 for( v =
nvars - 1; v >= 0; --v )
12340 SCIPdebugMsg(
scip,
"rounding all non-integral coefficients and the right hand side down\n");
12345 for( v =
nvars - 1; v >= 0; --v )
12382 if( allcoefintegral )
12397 for( v =
nvars - 1; v >= 0; --v )
12445 SCIPdebugMsg(
scip,
"rounding all non-integral coefficients and the left hand side down\n");
12450 for( v =
nvars - 1; v >= 0; --v )
12488 assert(vals == consdata->vals);
12493 rhs = consdata->rhs;
12494 lhs = consdata->lhs;
12501 nvars = consdata->nvars;
12505 allcoefintegral =
TRUE;
12508 for( v =
nvars - 1; v >= 0; --v )
12515 if( !allcoefintegral )
12535 SCIPdebug( oldnchgcoefs = *nchgcoefs; )
12536 SCIPdebug( oldnchgsides = *nchgsides; )
12551 for( v =
nvars - 1; v >= 0; --v )
12558 if( foundbin == -1 )
12586 foundbin =
nvars - 1;
12589 if( gcd == 1 || foundbin == -1)
12592 assert((onlybin && gcd == -1) || (!onlybin && gcd > 1));
12600 for( v = foundbin; v >= 0; --v )
12629 if( candpos == -1 )
12637 if( onlybin && v == foundbin - 1 )
12638 candpos2 = foundbin;
12643 if( onlybin && candpos == v + 1 && candpos2 == v + 2 )
12648 candpos = candpos2;
12691 if( vals[candpos] < 0 )
12693 restcoef = ((
SCIP_Longint)(vals[candpos] - feastol)) % gcd;
12698 restcoef = ((
SCIP_Longint)(vals[candpos] + feastol)) % gcd;
12712 if( restcoef > rest )
12713 newcoef = vals[candpos] - restcoef + gcd;
12715 newcoef = vals[candpos] - restcoef;
12727 if( rest == 0 || restcoef < rest )
12728 newcoef = vals[candpos] - restcoef;
12730 newcoef = vals[candpos] - restcoef + gcd;
12734 SCIPdebugMsg(
scip,
"gcd = %" SCIP_LONGINT_FORMAT ", rest = %" SCIP_LONGINT_FORMAT ", restcoef = %" SCIP_LONGINT_FORMAT "; changing coef of variable <%s> to %g and %s by %" SCIP_LONGINT_FORMAT "\n", gcd, rest, restcoef,
SCIPvarGetName(
vars[candpos]), newcoef, hasrhs ?
"reduced rhs" :
"increased lhs", hasrhs ? rest : (rest > 0 ? gcd - rest : 0));
12751 assert(vals == consdata->vals);
12758 rhs = consdata->rhs;
12759 lhs = consdata->lhs;
12763 nvars = consdata->nvars;
12765 SCIPdebugMsg(
scip,
"we did %d coefficient changes and %d side changes on constraint %s when applying one round of the gcd algorithm\n", *nchgcoefs - oldnchgcoefs, *nchgsides - oldnchgsides,
SCIPconsGetName(cons));
12767 while(
nvars >= 2 );
12787 int* diffidx0minus1,
12788 int* diffidx1minus0,
12790 int commonidxweight,
12791 int diffidx0minus1weight,
12792 int diffidx1minus0weight,
12793 SCIP_Real maxaggrnormscale,
12795 SCIP_Bool* aggregated,
12796 SCIP_Bool* infeasible
12803 SCIP_Real aggrcoef;
12804 SCIP_Real scalarsum;
12805 SCIP_Real bestscalarsum;
12806 SCIP_Bool betterscalarsum;
12807 SCIP_Bool commonvarlindependent;
12823 assert(nvarscommon >= 1);
12824 assert(commonidxweight >= nvarscommon);
12831 *infeasible =
FALSE;
12838 assert(consdata0->nvars >= 1);
12840 assert(diffidx0minus1weight >= consdata0->nvars - nvarscommon);
12845 assert(consdata1->nvars >= 1);
12847 assert(diffidx1minus0weight >= consdata1->nvars - nvarscommon);
12849 *aggregated =
FALSE;
12855 bestvarweight = commonidxweight + diffidx0minus1weight;
12856 bestnvars = consdata0->nvars;
12858 bestscalarsum = 0.0;
12859 commonvarlindependent =
TRUE;
12860 for( v = 0; v < nvarscommon; ++v )
12862 assert(consdata0->vars[commonidx0[v]] == consdata1->vars[commonidx1[v]]);
12863 a = consdata1->vals[commonidx1[v]];
12864 b = -consdata0->vals[commonidx0[v]];
12870 varweight = diffidx0minus1weight + diffidx1minus0weight;
12871 nvars = consdata0->nvars + consdata1->nvars - 2*nvarscommon;
12873 betterscalarsum = (scalarsum < bestscalarsum);
12874 for(
i = 0;
i < nvarscommon
12875 && (varweight < bestvarweight || (varweight == bestvarweight && betterscalarsum)); ++
i )
12877 aggrcoef =
a * consdata0->vals[commonidx0[
i]] +
b * consdata1->vals[commonidx1[
i]];
12884 if( varweight < bestvarweight || (varweight == bestvarweight && betterscalarsum) )
12887 bestvarweight = varweight;
12889 bestscalarsum = scalarsum;
12896 if( commonvarlindependent && v > 0 )
12898 consdata1->vals[commonidx1[v]] * consdata0->vals[commonidx0[0]],
12899 consdata1->vals[commonidx1[0]] * consdata0->vals[commonidx0[v]]);
12908 SCIP_Real* newvals;
12916 if( consdata1->vals[commonidx1[bestv]] > 0.0 )
12918 a = consdata1->vals[commonidx1[bestv]];
12919 b = -consdata0->vals[commonidx0[bestv]];
12923 a = -consdata1->vals[commonidx1[bestv]];
12924 b = consdata0->vals[commonidx0[bestv]];
12933 assert(commonvarlindependent);
12934 if( consdata1->vals[commonidx1[0]] > 0.0 )
12936 a = consdata1->vals[commonidx1[0]];
12937 b = -consdata0->vals[commonidx0[0]];
12941 a = -consdata1->vals[commonidx1[0]];
12942 b = consdata0->vals[commonidx0[0]];
12963 SCIPdebug( bestvarweight = diffidx0minus1weight + diffidx1minus0weight; )
12964 bestnvars = consdata0->nvars + consdata1->nvars - 2*nvarscommon;
12967 SCIPdebugMsg(
scip,
"aggregate linear constraints <%s> := %.15g*<%s> + %.15g*<%s> -> nvars: %d -> %d, weight: %d -> %d\n",
12969 consdata0->nvars, bestnvars, commonidxweight + diffidx0minus1weight, bestvarweight);
12979 if( !commonvarlindependent )
12981 for(
i = 0;
i < nvarscommon; ++
i )
12983 assert(0 <= commonidx0[
i] && commonidx0[
i] < consdata0->nvars);
12984 assert(0 <= commonidx1[
i] && commonidx1[
i] < consdata1->nvars);
12986 aggrcoef =
a * consdata0->vals[commonidx0[
i]] +
b * consdata1->vals[commonidx1[
i]];
12989 assert(newnvars < bestnvars);
12990 newvars[newnvars] = consdata0->vars[commonidx0[
i]];
12991 newvals[newnvars] = aggrcoef;
13000 for(
i = 0;
i < nvarscommon; ++
i )
13002 assert(0 <= commonidx0[
i] && commonidx0[
i] < consdata0->nvars);
13003 assert(0 <= commonidx1[
i] && commonidx1[
i] < consdata1->nvars);
13005 aggrcoef =
a * consdata0->vals[commonidx0[
i]] +
b * consdata1->vals[commonidx1[
i]];
13012 for(
i = 0;
i < consdata0->nvars - nvarscommon; ++
i )
13014 assert(0 <= diffidx0minus1[
i] && diffidx0minus1[
i] < consdata0->nvars);
13016 aggrcoef =
a * consdata0->vals[diffidx0minus1[
i]];
13018 assert(newnvars < bestnvars);
13019 newvars[newnvars] = consdata0->vars[diffidx0minus1[
i]];
13020 newvals[newnvars] = aggrcoef;
13025 for(
i = 0;
i < consdata1->nvars - nvarscommon; ++
i )
13027 assert(0 <= diffidx1minus0[
i] && diffidx1minus0[
i] < consdata1->nvars);
13029 aggrcoef =
b * consdata1->vals[diffidx1minus0[
i]];
13031 assert(newnvars < bestnvars);
13032 newvars[newnvars] = consdata1->vars[diffidx1minus0[
i]];
13033 newvals[newnvars] = aggrcoef;
13036 assert(newnvars == bestnvars);
13044 newlhs =
a * consdata0->lhs +
b * consdata1->lhs;
13048 newrhs =
a * consdata0->rhs +
b * consdata1->rhs;
13061 newconsdata->upgraded = consdata0->upgraded;
13077 if( !consdata0->upgraded )
13078 (*nchgcoefs) += consdata0->nvars + consdata1->nvars - nvarscommon;
13079 *aggregated =
TRUE;
13115 SCIP_Real cons1scale;
13116 SCIP_Real cons2scale;
13123 assert(consdata1->indexsorted);
13124 assert(consdata2->indexsorted);
13134 if( consdata1->nvars != consdata2->nvars )
13138 for(
i = 0;
i < consdata1->nvars; ++
i )
13140 if( consdata1->vars[
i] != consdata2->vars[
i] )
13150 cons1scale =
COPYSIGN(1.0/consdata1->maxabsval, consdata1->vals[0]);
13151 cons2scale =
COPYSIGN(1.0/consdata2->maxabsval, consdata2->vals[0]);
13154 for(
i = 0;
i < consdata1->nvars; ++
i )
13159 val1 = consdata1->vals[
i] * cons1scale;
13160 val2 = consdata2->vals[
i] * cons2scale;
13188 assert(consdata->nvars > 0);
13190 assert(consdata->indexsorted);
13195 scale =
COPYSIGN(1.0/consdata->maxabsval, consdata->vals[0]);
13218 return (((
unsigned int)consdata->upgraded)<<31) + (
unsigned int)
SCIPconsGetPos(cons);
13232 int* nparallelconss
13236 unsigned int querykey;
13238 *nparallelconss = 0;
13245 if( conskey < querykey )
13247 parallelconss[(*nparallelconss)++] = *querycons;
13248 *querycons = parallelcons;
13249 querykey = conskey;
13253 parallelconss[(*nparallelconss)++] = parallelcons;
13264 if( *querycons == parallelcons )
13300 int nparallelconss;
13313 hashtablesize = nconss;
13315 hashGetKeyLinearcons, hashKeyEqLinearcons, hashKeyValLinearcons, (
void*)
scip) );
13320 for(
c = 0;
c < nconss; ++
c )
13342 assert(consdata0->indexsorted);
13351 if( nparallelconss != 0 )
13361 lhs = consdata0->lhs;
13362 rhs = consdata0->rhs;
13364 for(
i = 0;
i < nparallelconss; ++
i )
13370 consdel = parallelconss[
i];
13384 assert(consdata0->nvars >= 1 && consdata0->nvars == consdatadel->nvars);
13386 assert(consdatadel->indexsorted);
13387 assert(consdata0->vars[0] == consdatadel->vars[0]);
13389 scale = consdata0->vals[0] / consdatadel->vals[0];
13398 SCIP_Real scale0 = 1.0 / consdata0->maxabsval;
13399 SCIP_Real scaledel =
COPYSIGN(1.0 / consdatadel->maxabsval, scale);
13401 for( k = 0; k < consdata0->nvars; ++k )
13403 assert(
SCIPisEQ(
scip, scale0 * consdata0->vals[k], scaledel * consdatadel->vals[k]));
13411 SCIPdebugMsg(
scip,
"aggregate linear constraints <%s> and <%s> with equal coefficients into single ranged row\n",
13417 lhs =
MAX(scale * consdatadel->lhs, lhs);
13420 rhs =
MIN(scale * consdatadel->rhs, rhs);
13425 SCIPdebugMsg(
scip,
"aggregate linear constraints <%s> and <%s> with negated coefficients into single ranged row\n",
13431 lhs =
MAX(scale * consdatadel->rhs, lhs);
13434 rhs =
MIN(scale * consdatadel->lhs, rhs);
13441 assert( ! consdata0->upgraded || consdatadel->upgraded );
13443 if( !consdatadel->upgraded )
13457 rhs = (lhs + rhs)/2;
13466 if( consdata0->changed &&
SCIPconsGetPos(cons0) < *firstchange )
13472#ifdef SCIP_MORE_DEBUG
13494 SCIP_Real maxaggrnormscale,
13505 int* diffidx0minus1;
13506 int* diffidx1minus0;
13507 uint64_t possignature0;
13508 uint64_t negsignature0;
13509 SCIP_Bool cons0changed;
13510 SCIP_Bool cons0isequality;
13511 int diffidx1minus0size;
13513 SCIP_Real cons0lhs;
13514 SCIP_Real cons0rhs;
13515 SCIP_Bool cons0upgraded;
13519 assert(firstchange <= chkind);
13526 cons0 = conss[chkind];
13533 assert(consdata0->nvars >= 1);
13534 cons0isequality =
SCIPisEQ(
scip, consdata0->lhs, consdata0->rhs);
13541 possignature0 = consdata0->possignature;
13542 negsignature0 = consdata0->negsignature;
13549 diffidx1minus0size = consdata0->nvars;
13551 cons0lhs = consdata0->lhs;
13552 cons0rhs = consdata0->rhs;
13553 cons0upgraded = consdata0->upgraded;
13556 cons0changed = consdata0->changed;
13557 consdata0->changed =
FALSE;
13558 for(
c = (cons0changed ? 0 : firstchange);
c < chkind && !(*cutoff) && conss[chkind] !=
NULL; ++
c )
13562 uint64_t possignature1;
13563 uint64_t negsignature1;
13564 SCIP_Bool cons0dominateslhs;
13565 SCIP_Bool cons1dominateslhs;
13566 SCIP_Bool cons0dominatesrhs;
13567 SCIP_Bool cons1dominatesrhs;
13568 SCIP_Bool cons1isequality;
13569 SCIP_Bool coefsequal;
13570 SCIP_Bool coefsnegated;
13571 SCIP_Bool tryaggregation;
13575 int commonidxweight;
13576 int diffidx0minus1weight;
13577 int diffidx1minus0weight;
13581 assert(cons0lhs == consdata0->lhs);
13582 assert(cons0rhs == consdata0->rhs);
13583 assert(cons0upgraded == consdata0->upgraded);
13588 if( cons1 ==
NULL )
13602 if( !cons0changed && !consdata1->changed )
13607 if( cons0upgraded && consdata1->upgraded )
13610 assert(consdata1->nvars >= 1);
13617 possignature1 = consdata1->possignature;
13618 negsignature1 = consdata1->negsignature;
13621 coefsequal = (possignature0 == possignature1) && (negsignature0 == negsignature1);
13622 coefsnegated = (possignature0 == negsignature1) && (negsignature0 == possignature1);
13623 cons0dominateslhs =
SCIPisGE(
scip, cons0lhs, consdata1->lhs)
13624 && ((possignature0 | possignature1) == possignature1)
13625 && ((negsignature0 | negsignature1) == negsignature0);
13626 cons1dominateslhs =
SCIPisGE(
scip, consdata1->lhs, cons0lhs)
13627 && ((possignature0 | possignature1) == possignature0)
13628 && ((negsignature0 | negsignature1) == negsignature1);
13629 cons0dominatesrhs =
SCIPisLE(
scip, cons0rhs, consdata1->rhs)
13630 && ((possignature0 | possignature1) == possignature0)
13631 && ((negsignature0 | negsignature1) == negsignature1);
13632 cons1dominatesrhs =
SCIPisLE(
scip, consdata1->rhs, cons0rhs)
13633 && ((possignature0 | possignature1) == possignature1)
13634 && ((negsignature0 | negsignature1) == negsignature0);
13635 cons1isequality =
SCIPisEQ(
scip, consdata1->lhs, consdata1->rhs);
13636 tryaggregation = (cons0isequality || cons1isequality) && (maxaggrnormscale > 0.0);
13637 if( !cons0dominateslhs && !cons1dominateslhs && !cons0dominatesrhs && !cons1dominatesrhs
13638 && !coefsequal && !coefsnegated && !tryaggregation )
13642 if( tryaggregation && consdata1->nvars > diffidx1minus0size )
13645 diffidx1minus0size = consdata1->nvars;
13671 commonidxweight = 0;
13673 diffidx0minus1weight = 0;
13675 diffidx1minus0weight = 0;
13678 while( (v0 < consdata0->
nvars || v1 < consdata1->
nvars)
13679 && (cons0dominateslhs || cons1dominateslhs || cons0dominatesrhs || cons1dominatesrhs
13680 || coefsequal || coefsnegated || tryaggregation) )
13688 if( v0 < consdata0->
nvars && v1 < consdata1->
nvars )
13689 varcmp =
SCIPvarCompare(consdata0->vars[v0], consdata1->vars[v1]);
13690 else if( v0 < consdata0->
nvars )
13699 var = consdata0->vars[v0];
13700 val0 = consdata0->vals[v0];
13702 if( tryaggregation )
13704 diffidx0minus1[nvars0minus1] = v0;
13709 coefsequal =
FALSE;
13710 coefsnegated =
FALSE;
13715 var = consdata1->vars[v1];
13717 val1 = consdata1->vals[v1];
13718 if( tryaggregation )
13720 diffidx1minus0[nvars1minus0] = v1;
13725 coefsequal =
FALSE;
13726 coefsnegated =
FALSE;
13731 assert(consdata0->vars[v0] == consdata1->vars[v1]);
13732 var = consdata0->vars[v0];
13733 val0 = consdata0->vals[v0];
13734 val1 = consdata1->vals[v1];
13735 if( tryaggregation )
13737 commonidx0[nvarscommon] = v0;
13738 commonidx1[nvarscommon] = v1;
13744 coefsequal = coefsequal && (
SCIPisEQ(
scip, val0, val1));
13745 coefsnegated = coefsnegated && (
SCIPisEQ(
scip, val0, -val1));
13762 cons0dominatesrhs =
FALSE;
13763 cons1dominateslhs =
FALSE;
13767 cons0dominateslhs =
FALSE;
13768 cons1dominatesrhs =
FALSE;
13775 cons0dominateslhs =
FALSE;
13776 cons1dominatesrhs =
FALSE;
13780 cons0dominatesrhs =
FALSE;
13781 cons1dominateslhs =
FALSE;
13787 if( coefsequal || coefsnegated )
13802 SCIPdebugMsg(
scip,
"aggregate linear constraints <%s> and <%s> with %s coefficients into single ranged row\n",
13810 lhs =
MAX(consdata0->lhs, consdata1->lhs);
13811 rhs =
MIN(consdata0->rhs, consdata1->rhs);
13816 lhs =
MAX(consdata0->lhs, -consdata1->rhs);
13817 rhs =
MIN(consdata0->rhs, -consdata1->lhs);
13828 if( consdata0->upgraded )
13830 assert(!consdata1->upgraded);
13833 consdatastay = consdata1;
13837 consdatadel = consdata0;
13838 consinddel = chkind;
13844 consdatastay = consdata0;
13848 consdatadel = consdata1;
13855 if( !consdata0->upgraded )
13857 assert(consstay == cons0);
13858 cons0lhs = consdata0->lhs;
13859 cons0rhs = consdata0->rhs;
13865 assert( !consdatastay->upgraded );
13868 conss[consinddel] =
NULL;
13869 if( !consdatadel->upgraded )
13877 if( cons1dominateslhs && (!cons0isequality || cons1dominatesrhs ||
SCIPisInfinity(
scip, consdata0->rhs) ) )
13880 SCIPdebugMsg(
scip,
"left hand side of linear constraint <%s> is dominated by <%s>:\n",
13897 cons0lhs = consdata0->lhs;
13898 cons0isequality =
FALSE;
13899 if( !consdata0->upgraded )
13908 else if( cons0dominateslhs && (!cons1isequality || cons0dominatesrhs ||
SCIPisInfinity(
scip, consdata1->rhs)) )
13911 SCIPdebugMsg(
scip,
"left hand side of linear constraint <%s> is dominated by <%s>:\n",
13928 cons1isequality =
FALSE;
13929 if( !consdata1->upgraded )
13938 if( cons1dominatesrhs && (!cons0isequality || cons1dominateslhs ||
SCIPisInfinity(
scip, -consdata0->lhs)) )
13941 SCIPdebugMsg(
scip,
"right hand side of linear constraint <%s> is dominated by <%s>:\n",
13958 cons0rhs = consdata0->rhs;
13959 cons0isequality =
FALSE;
13960 if( !consdata0->upgraded )
13969 else if( cons0dominatesrhs && (!cons1isequality || cons0dominateslhs ||
SCIPisInfinity(
scip, -consdata1->lhs)) )
13972 SCIPdebugMsg(
scip,
"right hand side of linear constraint <%s> is dominated by <%s>:\n",
13989 cons1isequality =
FALSE;
13990 if( !consdata1->upgraded )
14006 conss[chkind] =
NULL;
14007 if( !consdata0->upgraded )
14022 if( !consdata1->upgraded )
14035 if( tryaggregation )
14037 SCIP_Bool aggregated;
14039 assert(consdata0->nvars == nvarscommon + nvars0minus1);
14040 assert(consdata1->nvars == nvarscommon + nvars1minus0);
14042 aggregated =
FALSE;
14043 if( cons1isequality && !consdata0->upgraded && commonidxweight > diffidx1minus0weight )
14047 nvarscommon, commonidxweight, diffidx0minus1weight, diffidx1minus0weight, maxaggrnormscale,
14048 nchgcoefs, &aggregated,
cutoff) );
14058 conss[chkind] =
NULL;
14061 if( !aggregated && cons0isequality && !consdata1->upgraded && commonidxweight > diffidx0minus1weight )
14065 nvarscommon, commonidxweight, diffidx1minus0weight, diffidx0minus1weight, maxaggrnormscale,
14066 nchgcoefs, &aggregated,
cutoff) );
14096 SCIP_Bool singletonstuffing,
14097 SCIP_Bool singlevarstuffing,
14107 SCIP_Bool* swapped;
14113 SCIP_Real minactivity;
14114 SCIP_Real maxactivity;
14115 SCIP_Real maxcondactivity;
14116 SCIP_Real mincondactivity;
14121 SCIP_Bool isminacttight;
14122 SCIP_Bool ismaxacttight;
14123 SCIP_Bool isminsettoinfinity;
14124 SCIP_Bool ismaxsettoinfinity;
14125 SCIP_Bool tryfixing;
14141 if( singlevarstuffing )
14144 &isminsettoinfinity, &ismaxsettoinfinity);
14150 isminsettoinfinity =
FALSE;
14151 ismaxsettoinfinity =
FALSE;
14159 rhs = -consdata->lhs;
14161 maxactivity = -minactivity;
14162 ismaxsettoinfinity = isminsettoinfinity;
14167 rhs = consdata->rhs;
14171 nvars = consdata->nvars;
14172 vars = consdata->vars;
14173 vals = consdata->vals;
14176 if( singletonstuffing )
14178 for( v = 0; v <
nvars; ++v )
14194 assert(singletonstuffing);
14202 mincondactivity = 0.0;
14203 maxcondactivity = 0.0;
14205 for( v = 0; v <
nvars; ++v )
14211 val = factor * vals[v];
14228 maxcondactivity += val * lb;
14229 mincondactivity += val * lb;
14230 swapped[v] =
FALSE;
14231 ratios[nsingletons] =
obj / val;
14232 varpos[nsingletons] = v;
14247 maxcondactivity += val * ub;
14248 mincondactivity += val * ub;
14250 ratios[nsingletons] =
obj / val;
14251 varpos[nsingletons] = v;
14268 maxcondactivity += val * lb;
14269 mincondactivity += val * lb;
14286 maxcondactivity += val * ub;
14287 mincondactivity += val * ub;
14303 maxcondactivity += val * ub;
14304 mincondactivity += val * lb;
14308 maxcondactivity += val * lb;
14309 mincondactivity += val * ub;
14313 if( tryfixing && nsingletons > 0 && (
SCIPisGT(
scip, rhs, maxcondactivity) ||
SCIPisLE(
scip, rhs, mincondactivity)) )
14316 SCIP_Bool tightened;
14318 int oldnfixedvars = *nfixedvars;
14319 int oldnchgbds = *nchgbds;
14325 for( v = 0; v < nsingletons; ++v )
14329 val = factor * vals[idx];
14334 assert((val < 0) == swapped[idx]);
14349 delta = -(lb - ub) * val;
14351 delta = (ub - lb) * val;
14401 maxcondactivity += delta;
14402 mincondactivity += delta;
14406 if( *nfixedvars - oldnfixedvars > 0 || *nchgbds - oldnchgbds > 0 )
14408 SCIPdebugMsg(
scip,
"### stuffing fixed %d variables and changed %d bounds\n", *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds);
14447 if( singlevarstuffing && !ismaxsettoinfinity )
14452 int bestindex = -1;
14453 int bestuplocks = 0;
14454 int bestdownlocks = 1;
14457 SCIPdebug(
int oldnfixedvars = *nfixedvars; )
14458 SCIPdebug(
int oldnchgbds = *nchgbds; )
14461 for( v = 0; v <
nvars; ++v )
14465 val = factor * vals[v];
14493 if( ratio > bestratio || ((ratio == bestratio) && downlocks == 0 && (bestdownlocks > 0
14498 if( bestindex != -1 )
14501 if( bestuplocks > 1 )
14508 secondbestratio = bestratio;
14511 bestdownlocks = downlocks;
14512 bestuplocks = uplocks;
14519 if( bestdownlocks > 0 && bestuplocks > 1 )
14534 if( ratio > secondbestratio )
14536 secondbestratio = ratio;
14542 if( bestindex != -1 && bestdownlocks == 0 )
14544 SCIP_Bool tightened =
FALSE;
14545 SCIP_Real bounddelta;
14549 val = factor * vals[bestindex];
14561 SCIP_Real bestvarfloor =
SCIPfloor(
scip, (maxactivity - rhs)/-val);
14562 SCIP_Real activitydelta = (maxactivity - rhs) - (bestvarfloor * -val);
14567 bounddelta =
SCIPceil(
scip, (maxactivity - rhs)/-val);
14571 bounddelta = (maxactivity - rhs)/-val;
14573 tryfixing = tryfixing &&
SCIPisLE(
scip, bounddelta, ub - lb);
14598 SCIP_Real bestvarfloor =
SCIPfloor(
scip, (maxactivity - rhs)/val);
14599 SCIP_Real activitydelta = (maxactivity - rhs) - (bestvarfloor * val);
14608 bounddelta = (maxactivity - rhs)/val;
14610 tryfixing = tryfixing &&
SCIPisLE(
scip, bounddelta, ub - lb);
14639 for( v = 0; v <
nvars; ++v )
14647 SCIPdebugMsg(
scip,
"<= %g\n", factor > 0 ? consdata->rhs : -consdata->lhs);
14649 for( v = 0; v <
nvars; ++v )
14651 if( v == bestindex )
14654 if( factor * vals[v] < 0 )
14674 SCIPdebug(
SCIPdebugMsg(
scip,
"### new stuffing fixed %d vars, tightened %d bounds\n", *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds); )
14696 SCIP_Bool* isimplint;
14757 for( v = 0; v <
nvars; ++v )
14769 for( v = 0; v < ncontvars; v++ )
14796 for(
c = 0;
c < nconss; ++
c )
14804 SCIP_Bool lhsexists;
14805 SCIP_Bool rhsexists;
14806 SCIP_Bool hasimpliedpotential;
14807 SCIP_Bool integralcoefs;
14823 for(
i = 0;
i < consdata->nvars; ++
i )
14827 var = consdata->vars[
i];
14832 assert(0 <= contv && contv < ncontvars);
14833 isimplint[contv] =
FALSE;
14846 hasimpliedpotential =
FALSE;
14849 for(
i = 0;
i < consdata->nvars; ++
i )
14853 SCIP_Real minresactivity;
14854 SCIP_Real maxresactivity;
14855 SCIP_Real newredlb;
14856 SCIP_Real newredub;
14857 SCIP_Bool ismintight;
14858 SCIP_Bool ismaxtight;
14859 SCIP_Bool isminsettoinfinity;
14860 SCIP_Bool ismaxsettoinfinity;
14863 var = consdata->vars[
i];
14864 val = consdata->vals[
i];
14878 isminsettoinfinity =
TRUE;
14879 ismaxsettoinfinity =
TRUE;
14885 &ismintight, &ismaxtight, &isminsettoinfinity, &ismaxsettoinfinity);
14891 assert((ismintight || isminsettoinfinity) && (ismaxtight || ismaxsettoinfinity));
14906 newredlb = redlb[arrayindex];
14907 newredub = redub[arrayindex];
14913 nlocksdown[arrayindex] += nlockspos;
14914 newredlb = (isminsettoinfinity ?
SCIPinfinity(
scip) : (consdata->lhs - minresactivity)/val);
14919 nlocksup[arrayindex] += nlockspos;
14920 newredub = (ismaxsettoinfinity ? -
SCIPinfinity(
scip) : (consdata->rhs - maxresactivity)/val);
14928 nlocksup[arrayindex] += nlockspos;
14929 newredub = (isminsettoinfinity ? -
SCIPinfinity(
scip) : (consdata->lhs - minresactivity)/val);
14934 nlocksdown[arrayindex] += nlockspos;
14935 newredlb = (ismaxsettoinfinity ?
SCIPinfinity(
scip) : (consdata->rhs - maxresactivity)/val);
14949 redlb[arrayindex] =
MAX(redlb[arrayindex], newredlb);
14950 redub[arrayindex] =
MIN(redub[arrayindex], newredub);
14957 assert(nconscontvars < ncontvars);
14959 conscontvars[nconscontvars] =
var;
14963 assert(0 <= contv && contv < ncontvars);
14964 hasimpliedpotential = hasimpliedpotential || isimplint[contv];
14969 if( hasimpliedpotential )
14971 if( nconscontvars > 1 || !integralcoefs )
14976 for(
i = 0;
i < nconscontvars;
i++ )
14980 assert(0 <= contv && contv < ncontvars);
14981 isimplint[contv] =
FALSE;
14995 assert(nconscontvars == 1);
14996 assert(0 <= contvarpos && contvarpos < consdata->
nvars);
14997 var = consdata->vars[contvarpos];
14998 val = consdata->vals[contvarpos];
15000 assert(0 <= contv && contv < ncontvars);
15001 assert(isimplint[contv]);
15005 isimplint[contv] =
FALSE;
15011 if(
obj * val >= 0.0 && lhsexists )
15016 if(
obj * val <= 0.0 && rhsexists )
15028 for( v = 0; v <
nvars; ++v )
15032 SCIP_Bool infeasible;
15033 SCIP_Bool tightened;
15058 SCIPdebugMsg(
scip,
"variable <%s> only locked down in linear constraints: dual presolve <%s>[%.15g,%.15g] <= %.15g\n",
15065 redub[v] =
MIN(redub[v], ub);
15087 SCIPdebugMsg(
scip,
"variable <%s> only locked up in linear constraints: dual presolve <%s>[%.15g,%.15g] >= %.15g\n",
15094 redlb[v] =
MAX(redlb[v], lb);
15105 SCIP_Bool infeasible;
15131 SCIPdebugMsg(
scip,
"dual presolve: converting continuous variable <%s>[%g,%g] to implicit integer\n",
15162 SCIP_Bool checkrelmaxabs;
15163 SCIP_Bool violated;
15175 checkrelmaxabs = conshdlrdata->checkrelmaxabs;
15177 SCIPdebugMsg(
scip,
"Enforcement method of linear constraints for %s solution\n",
sol ==
NULL ?
"LP" :
"relaxation");
15185 for(
c = 0;
c < nusefulconss; ++
c )
15234 SCIP_Real constant = 0.0;
15251 nlocvars = consdata->nvars;
15256 for(
i = 0;
i < nlocvars; ++
i )
15258 vars[
i] = consdata->vars[
i];
15259 vals[
i] = consdata->vals[
i];
15263 lhs = consdata->lhs - constant;
15264 rhs = consdata->rhs - constant;
15274 for(
i = 0;
i < nlocvars; ++
i )
15282 cons, lhs, rhs, success) );
15347 conshdlrdata->naddconss = 0;
15350 for(
c = 0;
c < nconss; ++
c )
15375 for(
c = nconss - 1;
c >= 0; --
c )
15382 if( consdata->eventdata !=
NULL )
15456 for(
c = 0;
c < nconss;
c++ )
15475 rhs = consdata->rhs;
15476 lhs = consdata->lhs;
15480 for(
i = 0;
i < consdata->nvars;
i++ )
15486 if( consdata->nvars == 0 )
15506 if( consdata->nvars == 1 )
15516 if( consdata->nvars == 2 &&
SCIPisEQ(
scip, lhs, rhs) )
15526 if( consdata->nvars == 2 )
15531 if(
SCIPisEQ(
scip, consdata->vals[0], -consdata->vals[1])
15553 SCIP_Bool unmatched;
15559 scale =
REALABS(consdata->vals[0]);
15562 for(
i = 0;
i < consdata->nvars && !unmatched;
i++ )
15569 if( consdata->vals[
i] < 0.0 )
15577 b = rhs/scale + nnegbinvars;
15598 b = rhs/scale + nnegbinvars;
15623 b = lhs/scale + nnegbinvars;
15649 SCIP_Bool unmatched;
15653 for(
i = 0;
i < consdata->nvars && !unmatched;
i++ )
15661 b -= consdata->vals[
i];
15681 for(
i = 0;
i < consdata->nvars && !matched;
i++ )
15686 SCIPdebugMsg(
scip,
"classified as %s: ", matched ?
"BINPACKING" :
"KNAPSACK");
15702 SCIP_Bool unmatched;
15709 for(
i = 0;
i < consdata->nvars && !unmatched;
i++ )
15733 SCIP_Bool unmatched;
15736 for(
i = 0;
i < consdata->nvars && !unmatched;
i++ )
15769#ifdef SCIP_STATISTIC
15780#ifdef SCIP_STATISTIC
15788 for(
c = 0;
c < nconss; ++
c )
15798 if( consdata->upgraded )
15805 if(
SCIPisLT(
scip, consdata->maxactdelta, conshdlrdata->maxeasyactivitydelta) )
15810 SCIPstatisticMessage(
"below threshold: %d / %d ratio= %g\n", ngoodconss, nallconss, (100.0 * ngoodconss / nallconss));
15814 for(
c = 0;
c < nconss; ++
c )
15824 if( consdata->upgraded )
15849 for(
c = 0;
c < nconss; ++
c )
15867 for(
c = 0;
c < nconss; ++
c )
15874 if( consdata->row !=
NULL )
15879 if( consdata->nlrow !=
NULL )
15895 if( ncutsadded > 0 )
15898 "(restart) converted %d cuts from the global cut pool into linear constraints\n", ncutsadded);
15949 if( consdata->eventdata !=
NULL )
15977 if( (*consdata)->eventdata !=
NULL )
16017 SCIP_CALL(
consdataCreate(
scip, &targetdata, sourcedata->nvars, sourcedata->vars, sourcedata->vals, sourcedata->lhs, sourcedata->rhs) );
16024 for(n = targetdata->nvars - 1; n >= 0; --n )
16049 *infeasible =
FALSE;
16051 for(
c = 0;
c < nconss && !(*infeasible); ++
c )
16066 SCIP_Real loclowerbound;
16067 SCIP_Real glblowerbound;
16068 SCIP_Real cutoffbound;
16069 SCIP_Real maxbound;
16070 SCIP_Bool separatecards;
16093 if( (
depth == 0 && conshdlrdata->maxroundsroot >= 0 && nrounds >= conshdlrdata->maxroundsroot)
16094 || (
depth > 0 && conshdlrdata->maxrounds >= 0 && nrounds >= conshdlrdata->maxrounds) )
16098 maxsepacuts = (
depth == 0 ? conshdlrdata->maxsepacutsroot : conshdlrdata->maxsepacuts);
16104 maxbound = glblowerbound + conshdlrdata->maxcardbounddist * (cutoffbound - glblowerbound);
16105 separatecards =
SCIPisLE(
scip, loclowerbound, maxbound);
16113 for(
c = 0;
c < nusefulconss && ncuts < maxsepacuts && !
cutoff; ++
c )
16122 else if( ncuts > 0 )
16159 if( (
depth == 0 && conshdlrdata->maxroundsroot >= 0 && nrounds >= conshdlrdata->maxroundsroot)
16160 || (
depth > 0 && conshdlrdata->maxrounds >= 0 && nrounds >= conshdlrdata->maxrounds) )
16164 maxsepacuts = (
depth == 0 ? conshdlrdata->maxsepacutsroot : conshdlrdata->maxsepacuts);
16171 for(
c = 0;
c < nusefulconss && ncuts < maxsepacuts && !
cutoff; ++
c )
16180 else if( ncuts > 0 )
16213 SCIP_Bool checkrelmaxabs;
16214 SCIP_Bool violated;
16225 checkrelmaxabs = conshdlrdata->checkrelmaxabs;
16230 if( objinfeasible )
16232 SCIPdebugMsg(
scip,
"-> pseudo solution is objective infeasible, return.\n");
16240 for(
c = 0;
c < nconss && !violated; ++
c )
16261 SCIP_Bool checkrelmaxabs;
16274 checkrelmaxabs = conshdlrdata->checkrelmaxabs;
16281 SCIP_Bool violated =
FALSE;
16291 SCIP_Real activity;
16320 SCIP_Bool rangedrowpropagation =
FALSE;
16321 SCIP_Bool tightenbounds;
16339 tightenbounds =
TRUE;
16344 int tightenboundsfreq;
16349 tightenboundsfreq = propfreq * conshdlrdata->tightenboundsfreq;
16350 tightenbounds = (conshdlrdata->tightenboundsfreq >= 0)
16351 && ((tightenboundsfreq == 0 &&
depth == 0) || (tightenboundsfreq >= 1 && (
depth % tightenboundsfreq == 0)));
16354 rangedrowpropagation = conshdlrdata->rangedrowpropagation;
16356 rangedrowpropagation = rangedrowpropagation && (
depth <= conshdlrdata->rangedrowmaxdepth);
16357 rangedrowfreq = propfreq * conshdlrdata->rangedrowfreq;
16358 rangedrowpropagation = rangedrowpropagation && (conshdlrdata->rangedrowfreq >= 0)
16359 && ((rangedrowfreq == 0 &&
depth == 0) || (rangedrowfreq >= 1 && (
depth % rangedrowfreq == 0)));
16366 for(
i = 0;
i < nmarkedconss && !
cutoff;
i++ )
16370 conshdlrdata->maxeasyactivitydelta, conshdlrdata->sortvars, &
cutoff, &nchgbds) );
16376 else if( nchgbds > 0 )
16385#define MAXCONSPRESOLROUNDS 10
16393 SCIP_Real minactivity;
16394 SCIP_Real maxactivity;
16395 SCIP_Bool isminacttight;
16396 SCIP_Bool ismaxacttight;
16397 SCIP_Bool isminsettoinfinity;
16398 SCIP_Bool ismaxsettoinfinity;
16408 int firstupgradetry;
16420 oldnfixedvars = *nfixedvars;
16421 oldnaggrvars = *naggrvars;
16422 oldnchgbds = *nchgbds;
16423 oldndelconss = *ndelconss;
16424 oldnupgdconss = *nupgdconss;
16425 oldnchgcoefs = *nchgcoefs;
16426 oldnchgsides = *nchgsides;
16433 firstchange = INT_MAX;
16434 firstupgradetry = INT_MAX;
16438 SCIP_Bool infeasible;
16440 infeasible =
FALSE;
16450 consdata->lhs = consdata->rhs;
16454 if( consdata->eventdata ==
NULL )
16477 assert(consdata->removedfixings);
16484 if( firstchange == INT_MAX && consdata->changed )
16488 if( firstupgradetry == INT_MAX && !consdata->upgradetried )
16489 firstupgradetry =
c;
16492 if( consdata->presolved )
16510 consdata->presolved =
TRUE;
16527 SCIPdebugMsg(
scip,
" -> infeasibility detected during tightening sides\n");
16535 SCIPdebugMsg(
scip,
"linear constraint <%s> is infeasible: sides=[%.15g,%.15g]\n",
16553 &isminsettoinfinity, &ismaxsettoinfinity);
16556 SCIPdebugMsg(
scip,
"linear constraint <%s> is infeasible: activitybounds=[%.15g,%.15g], sides=[%.15g,%.15g]\n",
16557 SCIPconsGetName(cons), minactivity, maxactivity, consdata->lhs, consdata->rhs);
16563 SCIPdebugMsg(
scip,
"linear constraint <%s> is redundant: activitybounds=[%.15g,%.15g], sides=[%.15g,%.15g]\n",
16564 SCIPconsGetName(cons), minactivity, maxactivity, consdata->lhs, consdata->rhs);
16568 if( !consdata->upgraded )
16574 SCIPdebugMsg(
scip,
"linear constraint <%s> left hand side is redundant: activitybounds=[%.15g,%.15g], sides=[%.15g,%.15g]\n",
16575 SCIPconsGetName(cons), minactivity, maxactivity, consdata->lhs, consdata->rhs);
16577 if( !consdata->upgraded )
16582 SCIPdebugMsg(
scip,
"linear constraint <%s> right hand side is redundant: activitybounds=[%.15g,%.15g], sides=[%.15g,%.15g]\n",
16583 SCIPconsGetName(cons), minactivity, maxactivity, consdata->lhs, consdata->rhs);
16585 if( !consdata->upgraded )
16590 if( consdata->nvars == 0 )
16594 SCIPdebugMsg(
scip,
"empty linear constraint <%s> is infeasible: sides=[%.15g,%.15g]\n",
16600 SCIPdebugMsg(
scip,
"empty linear constraint <%s> is redundant: sides=[%.15g,%.15g]\n",
16605 if( !consdata->upgraded )
16615 if( conshdlrdata->simplifyinequalities )
16624 if( conshdlrdata->aggregatevariables )
16635 if( conshdlrdata->rangedrowpropagation )
16637 int lastnfixedvars;
16639 lastnfixedvars = *nfixedvars;
16644 if( lastnfixedvars < *nfixedvars )
16655 nfixedvars, nchgbds, &
cutoff) );
16662 SCIPdebugMsg(
scip,
"empty linear constraint <%s> is infeasible: sides=[%.15g,%.15g]\n",
16668 SCIPdebugMsg(
scip,
"empty linear constraint <%s> is redundant: sides=[%.15g,%.15g]\n",
16673 if( !consdata->upgraded )
16698 if( firstchange == INT_MAX && consdata->changed )
16702 if( firstupgradetry == INT_MAX && !consdata->upgradetried )
16703 firstupgradetry =
c;
16711 conshdlrdata->singlevarstuffing, &
cutoff, nfixedvars, nchgbds) );
16714 if( consdata->nvars == 0 )
16718 SCIPdebugMsg(
scip,
"empty linear constraint <%s> is infeasible: sides=[%.15g,%.15g]\n",
16724 SCIPdebugMsg(
scip,
"empty linear constraint <%s> is redundant: sides=[%.15g,%.15g]\n",
16729 if( !consdata->upgraded )
16742 assert(firstchange >= 0);
16744 if( firstchange < nconss && conshdlrdata->presolusehashing )
16748 ndelconss, nchgsides) );
16751 if( firstchange < nconss && conshdlrdata->presolpairwise )
16755 int firstchangenew;
16756 SCIP_Longint npaircomparisons;
16758 npaircomparisons = 0;
16759 oldndelconss = *ndelconss;
16760 oldnchgsides = *nchgsides;
16761 oldnchgcoefs = *nchgcoefs;
16767 firstchangenew = -1;
16768 for(
c = 0;
c < nconss; ++
c )
16771 if(
c == firstchange )
16772 firstchangenew = nusefulconss;
16778 usefulconss[nusefulconss] = conss[
c];
16781 firstchange = firstchangenew;
16782 assert(firstchangenew >= 0 && firstchangenew <= nusefulconss);
16787 if( usefulconss[
c] ==
NULL )
16794 &
cutoff, ndelconss, nchgsides, nchgcoefs) );
16796 if( npaircomparisons > conshdlrdata->nmincomparisons )
16798 assert(npaircomparisons > 0);
16799 if( ((*ndelconss - oldndelconss) + (*nchgsides - oldnchgsides)/2.0 + (*nchgcoefs - oldnchgcoefs)/10.0) / ((SCIP_Real) npaircomparisons) < conshdlrdata->mingainpernmincomp )
16801 oldndelconss = *ndelconss;
16802 oldnchgsides = *nchgsides;
16803 oldnchgcoefs = *nchgcoefs;
16804 npaircomparisons = 0;
16815 if( !
cutoff && firstupgradetry < nconss
16816 && *nfixedvars == oldnfixedvars && *naggrvars == oldnaggrvars && *nchgbds == oldnchgbds && *ndelconss == oldndelconss
16817 && *nupgdconss == oldnupgdconss && *nchgcoefs == oldnchgcoefs && *nchgsides == oldnchgsides
16844 if( consdata->upgradetried )
16847 if( !consdata->presolved )
16850 consdata->upgradetried =
TRUE;
16856 if( upgdcons !=
NULL )
16866 assert(!consdata->upgraded);
16867 consdata->upgraded =
TRUE;
16873 || !conshdlrdata->presolpairwise
16874 || (conshdlrdata->maxaggrnormscale == 0.0) )
16886 else if( *nfixedvars > oldnfixedvars || *naggrvars > oldnaggrvars || *nchgbds > oldnchgbds || *ndelconss > oldndelconss
16887 || *nupgdconss > oldnupgdconss || *nchgcoefs > oldnchgcoefs || *nchgsides > oldnchgsides )
16928 for(
i = 0;
i < consdata->nvars; ++
i )
16992 SCIP_Real* sourcecoefs;
16993 const char* consname;
17012 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode, global,
valid) );
17027 char** firstoperator,
17028 char** secondoperator,
17038 *firstoperator =
NULL;
17039 *secondoperator =
NULL;
17045 while( *curr && *success )
17047 SCIP_Bool found =
FALSE;
17058 if( curr[1] ==
'=' )
17067 if( strncmp(curr,
"[free]", 6) == 0 )
17082 if( *firstoperator ==
NULL )
17084 *firstoperator = curr;
17088 if( *secondoperator !=
NULL )
17093 else if( strncmp(*firstoperator,
"<=", 2) != 0 )
17095 SCIPerrorMessage(
"Two operators in line that is not a ranged row: %s", str);
17098 else if( strncmp(curr,
"<=", 2) != 0 )
17100 SCIPerrorMessage(
"Bad second operator, expected ranged row specification: %s", str);
17104 *secondoperator = curr;
17114 if( *firstoperator ==
NULL )
17136 SCIP_Bool operatorsuccess;
17151 (*success) =
FALSE;
17166 if( ! operatorsuccess )
17169 varstrptr = (
char *)str;
17170 lhsstrptr = rhsstrptr =
NULL;
17177 assert(firstop[1] ==
'=');
17179 if( secondop !=
NULL )
17181 assert(secondop[0] ==
'<' && secondop[1] ==
'=');
17182 lhsstrptr = (
char *)str;
17183 varstrptr = firstop + 2;
17184 rhsstrptr = secondop + 2;
17190 varstrptr = (
char *)str;
17191 rhsstrptr = firstop + 2;
17195 assert(firstop[1] ==
'=');
17198 lhsstrptr = firstop + 2;
17201 assert(firstop[1] ==
'=');
17204 rhsstrptr = firstop + 2;
17205 lhsstrptr = firstop + 2;
17208 assert(strncmp(firstop,
"[free]", 6) == 0);
17214 SCIPerrorMessage(
"Parsing has wrong operator character '%c', should be one of <=>[", *firstop);
17219 if( lhsstrptr !=
NULL )
17223 SCIPerrorMessage(
"error parsing left hand side number from <%s>\n", lhsstrptr);
17228 if( rhsstrptr == lhsstrptr )
17233 if( rhsstrptr !=
NULL && rhsstrptr != lhsstrptr )
17237 SCIPerrorMessage(
"error parsing right hand side number from <%s>\n", lhsstrptr);
17252 if( *success && requsize > coefssize )
17255 coefssize = requsize;
17260 assert(!*success || requsize <= coefssize);
17270 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
17289 if( varssize < consdata->
nvars )
17290 (*success) =
FALSE;
17312 (*nvars) = consdata->nvars;
17356 cons = eventdata->cons;
17370 SCIP_Real oldbound;
17371 SCIP_Real newbound;
17375 varpos = eventdata->varpos;
17381 val = consdata->vals[varpos];
17400 consdata->presolved =
FALSE;
17401 consdata->rangedrowpropagated = 0;
17409 if( consdata->maxactdeltavar ==
var )
17412 consdata->maxactdeltavar =
NULL;
17416 if( consdata->boundstightened > 0)
17418 switch( eventtype )
17422 consdata->boundstightened = 0;
17426 consdata->boundstightened = 0;
17448 delta =
REALABS(val) * domain;
17450 if( delta > consdata->maxactdelta )
17452 consdata->maxactdelta = delta;
17453 consdata->maxactdeltavar =
var;
17460 consdata->presolved =
FALSE;
17461 consdata->removedfixings =
FALSE;
17462 consdata->rangedrowpropagated = 0;
17465 if( consdata->maxactdeltavar ==
var )
17468 consdata->maxactdeltavar =
NULL;
17476 consdata->presolved =
FALSE;
17480 SCIP_Real oldbound;
17481 SCIP_Real newbound;
17485 varpos = eventdata->varpos;
17491 val = consdata->vals[varpos];
17493 consdata->rangedrowpropagated = 0;
17508 consdata->indexsorted =
FALSE;
17510 consdata->coefsorted =
FALSE;
17526 consdata->varsdeleted =
TRUE;
17549 assert(bdchginfos !=
NULL || nbdchginfos == 0);
17565 for(
i = 0;
i < nbdchginfos; ++
i )
17586 if(
i == nbdchginfos )
17599 if( upgdcons !=
NULL )
17635 assert(upgdconsssize > 0);
17673 consdata->checkabsolute =
TRUE;
17701 eventExecLinear,
NULL) );
17705 conflictExecLinear,
NULL) );
17713 consEnfolpLinear, consEnfopsLinear, consCheckLinear, consLockLinear,
17755 "multiplier on propagation frequency, how often the bounds are tightened (-1: never, 0: only at root)",
17759 "maximal number of separation rounds per node (-1: unlimited)",
17763 "maximal number of separation rounds per node in the root node (-1: unlimited)",
17767 "maximal number of cuts separated per separation round",
17771 "maximal number of cuts separated per separation round in the root node",
17775 "should pairwise constraint comparison be performed in presolving?",
17779 "should hash table be used for detecting redundant constraints in advance",
17783 "number for minimal pairwise presolve comparisons",
17787 "minimal gain per minimal pairwise presolve comparisons to repeat pairwise comparison round",
17791 "maximal allowed relative gain in maximum norm for constraint aggregation (0.0: disable constraint aggregation)",
17795 "maximum activity delta to run easy propagation on linear constraint (faster, but numerically less stable)",
17799 "maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for separating knapsack cardinality cuts",
17803 "should all constraints be subject to cardinality cut generation instead of only the ones with non-zero dual value?",
17807 "should presolving search for aggregations in equations",
17811 "should presolving try to simplify inequalities",
17815 "should dual presolving steps be performed?",
17819 "should stuffing of singleton continuous variables be performed?",
17823 "should single variable stuffing be performed, which tries to fulfill constraints using the cheapest variable?",
17826 "constraints/" CONSHDLR_NAME "/sortvars",
"apply binaries sorting in decr. order of coeff abs value?",
17830 "should the violation for a constraint with side 0.0 be checked relative to 1.0 (FALSE) or to the maximum absolute value in the activity (TRUE)?",
17834 "should presolving try to detect constraints parallel to the objective function defining an upper bound and prevent these constraints from entering the LP?",
17838 "should presolving try to detect constraints parallel to the objective function defining a lower bound and prevent these constraints from entering the LP?",
17842 "should presolving try to detect subsets of constraints parallel to the objective function?",
17846 "should presolving and propagation try to improve bounds, detect infeasibility, and extract sub-constraints from ranged rows and equations?",
17850 "should presolving and propagation extract sub-constraints from ranged rows and equations?",
17854 "maximum depth to apply ranged row propagation",
17858 "frequency for applying ranged row propagation",
17862 "should multi-aggregations only be performed if the constraint can be removed afterwards?",
17866 "maximum coefficient dynamism (ie. maxabsval / minabsval) for primal multiaggregation",
17870 "maximum coefficient dynamism (ie. maxabsval / minabsval) for dual multiaggregation",
17874 "should Cliques be extracted?",
17885 const char* conshdlrname
17900 if( conshdlr ==
NULL )
17944 SCIP_Bool separate,
17954 SCIP_Bool modifiable,
17960 SCIP_Bool removable,
17962 SCIP_Bool stickingatnode
17976 if( conshdlr ==
NULL )
17982 for( j = 0; j <
nvars; ++j )
17998 SCIP_Real* consvals;
17999 SCIP_Real constant = 0.0;
18011 if( requiredsize > nconsvars )
18017 assert(requiredsize <= nconsvars);
18023 if( constant < 0.0 )
18030 SCIPerrorMessage(
"try to generate inconsistent constraint <%s>, active variables leads to a infinite constant constradict the infinite left hand side of the constraint\n", name);
18040 SCIPerrorMessage(
"try to generate inconsistent constraint <%s>, active variables leads to a infinite constant constradict the infinite right hand side of the constraint\n", name);
18056 SCIPerrorMessage(
"try to generate inconsistent constraint <%s>, active variables leads to a infinite constant constradict the infinite left hand side of the constraint\n", name);
18066 SCIPerrorMessage(
"try to generate inconsistent constraint <%s>, active variables leads to a infinite constant constradict the infinite right hand side of the constraint\n", name);
18110 if( check || enforce )
18113 for(n = consdata->nvars - 1; n >= 0; --n )
18119 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial, separate, enforce, check,
propagate,
18120 local, modifiable, dynamic, removable, stickingatnode) );
18160 SCIP_Real* sourcecoefs,
18168 SCIP_Bool separate,
18173 SCIP_Bool modifiable,
18175 SCIP_Bool removable,
18176 SCIP_Bool stickingatnode,
18185 SCIP_Real constant;
18201 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
18209 if( sourcecoefs !=
NULL )
18216 for( v = 0; v <
nvars; ++v )
18229 if( requiredsize >
nvars )
18240 for( v = 0; v <
nvars; ++v )
18250 for( v = 0; v <
nvars && success; ++v )
18272 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
18309 SCIP_Real* consvals;
18310 SCIP_Real constant = 0.0;
18327 if( requiredsize > nconsvars )
18333 assert(requiredsize <= nconsvars);
18339 lhs = consdata->lhs;
18340 rhs = consdata->rhs;
18346 if( constant < 0.0 )
18419 for( v = nconsvars - 1; v >= 0; --v )
18470 SCIPerrorMessage(
"method may only be called during problem creation stage for original constraints and variables\n");
18477 vars = consdata->vars;
18550 return consdata->lhs;
18574 return consdata->rhs;
18637 return consdata->nvars;
18661 return consdata->vars;
18685 return consdata->vals;
18714 if( consdata->row !=
NULL )
18742 if( consdata->row !=
NULL )
18770 if( consdata->row !=
NULL )
18798 if( consdata->row !=
NULL )
18827 return consdata->row;
18844 SCIP_Real poscoeffsum;
18845 SCIP_Real negcoeffsum;
18846 SCIP_Bool infeasible;
18847 SCIP_Bool integral;
18896 if( consdata->upgraded )
18900 if( consdata->row !=
NULL )
18904 SCIPerrorMessage(
"cannot upgrade linear constraint that is already stored as row in the LP\n");
18956 for(
i = 0;
i < consdata->nvars; ++
i )
18958 var = consdata->vars[
i];
18959 val = consdata->vals[
i];
19027 poscoeffsum += val;
19029 negcoeffsum += val;
19036 SCIPdebugMsg(
scip,
"upgrading linear constraint <%s> (%d upgrade methods):\n",
19038 SCIPdebugMsg(
scip,
" +bin=%d -bin=%d +int=%d -int=%d +impl=%d -impl=%d +cont=%d -cont=%d +1=%d -1=%d +I=%d -I=%d +F=%d -F=%d possum=%.15g negsum=%.15g integral=%u\n",
19039 nposbin, nnegbin, nposint, nnegint, nposimpl, nnegimpl, nposcont, nnegcont,
19040 ncoeffspone, ncoeffsnone, ncoeffspint, ncoeffsnint, ncoeffspfrac, ncoeffsnfrac,
19041 poscoeffsum, negcoeffsum, integral);
19044 for(
i = 0;
i < conshdlrdata->nlinconsupgrades && *upgdcons ==
NULL; ++
i )
19046 if( conshdlrdata->linconsupgrades[
i]->active )
19048 SCIP_CALL( conshdlrdata->linconsupgrades[
i]->linconsupgd(
scip, cons, consdata->nvars,
19049 consdata->vars, consdata->vals, consdata->lhs, consdata->rhs,
19050 nposbin, nnegbin, nposint, nnegint, nposimpl, nnegimpl, nposimplbin, nnegimplbin, nposcont, nnegcont,
19051 ncoeffspone, ncoeffsnone, ncoeffspint, ncoeffsnint, ncoeffspfrac, ncoeffsnfrac,
19052 poscoeffsum, negcoeffsum, integral,
19058 if( *upgdcons !=
NULL )
19072 SCIP_Bool onlychecked,
19073 SCIP_Bool* infeasible
19082 if( conshdlr ==
NULL )
19086 *infeasible =
FALSE;
19091 for(
i = 0;
i < nconss; ++
i )
struct InferInfo INFERINFO
Constraint handler for knapsack constraints of the form , x binary and .
#define MAX_CLIQUE_NONZEROS_PER_CONS
static SCIP_RETCODE addCoef(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
#define DEFAULT_AGGREGATEVARIABLES
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file)
#define DEFAULT_NMINCOMPARISONS
#define DEFAULT_MULTAGGRREMOVE
#define DEFAULT_DUALPRESOLVING
#define DEFAULT_EXTRACTCLIQUES
static void permSortConsdata(SCIP_CONSDATA *consdata, int *perm, int nvars)
#define CONSHDLR_NEEDSCONS
static void consdataRecomputeMaxActivityDelta(SCIP *scip, SCIP_CONSDATA *consdata)
#define CONSHDLR_SEPAFREQ
static SCIP_RETCODE checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checklprows, SCIP_Bool checkrelmaxabs, SCIP_Bool *violated)
static SCIP_RETCODE addRelaxation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff)
#define CONFLICTHDLR_PRIORITY
static void consdataGetReliableResidualActivity(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *cancelvar, SCIP_Real *resactivity, SCIP_Bool isminresact, SCIP_Bool useglobalbounds)
static SCIP_Bool checkEqualObjective(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Real *scale, SCIP_Real *offset)
#define CONFLICTHDLR_NAME
static SCIP_RETCODE conshdlrdataIncludeUpgrade(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_LINCONSUPGRADE *linconsupgrade)
static SCIP_RETCODE extractCliques(SCIP *scip, SCIP_CONS *cons, SCIP_Real maxeasyactivitydelta, SCIP_Bool sortvars, int *nfixedvars, int *nchgbds, SCIP_Bool *cutoff)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE createRow(SCIP *scip, SCIP_CONS *cons)
static int getVarWeight(SCIP_VAR *var)
static SCIP_RETCODE convertBinaryEquality(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *naggrvars, int *ndelconss)
static void consdataRecomputeMinactivity(SCIP *scip, SCIP_CONSDATA *consdata)
static SCIP_RETCODE addConflictFixedVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, SCIP_BDCHGIDX *bdchgidx, int inferpos)
#define DEFAULT_DETECTCUTOFFBOUND
static SCIP_RETCODE tightenVarLb(SCIP *scip, SCIP_CONS *cons, int pos, PROPRULE proprule, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool force)
#define CONSHDLR_PROP_TIMING
static SCIP_Real consdataComputePseudoActivity(SCIP *scip, SCIP_CONSDATA *consdata)
static SCIP_RETCODE conshdlrdataEnsureLinconsupgradesSize(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int num)
static SCIP_RETCODE retrieveParallelConstraints(SCIP_HASHTABLE *hashtable, SCIP_CONS **querycons, SCIP_CONS **parallelconss, int *nparallelconss)
#define CONFLICTHDLR_DESC
static void conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static void calculateMinvalAndMaxval(SCIP *scip, SCIP_Real side, SCIP_Real val, SCIP_Real minresactivity, SCIP_Real maxresactivity, SCIP_Real *minval, SCIP_Real *maxval)
static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
static void consdataRecomputeGlbMinactivity(SCIP *scip, SCIP_CONSDATA *consdata)
static void consdataUpdateActivitiesUb(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real oldub, SCIP_Real newub, SCIP_Real val, SCIP_Bool checkreliability)
static SCIP_RETCODE tightenSides(SCIP *scip, SCIP_CONS *cons, int *nchgsides, SCIP_Bool *infeasible)
static void consdataUpdateActivitiesGlbLb(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Real oldlb, SCIP_Real newlb, SCIP_Real val, SCIP_Bool checkreliability)
static void consdataUpdateActivitiesLb(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real oldlb, SCIP_Real newlb, SCIP_Real val, SCIP_Bool checkreliability)
#define CONSHDLR_MAXPREROUNDS
static SCIP_Bool conshdlrdataHasUpgrade(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DECL_LINCONSUPGD((*linconsupgd)), const char *conshdlrname)
static SCIP_RETCODE chgCoefPos(SCIP *scip, SCIP_CONS *cons, int pos, SCIP_Real newval)
static void consdataRecomputeMaxactivity(SCIP *scip, SCIP_CONSDATA *consdata)
static SCIP_RETCODE linconsupgradeCreate(SCIP *scip, SCIP_LINCONSUPGRADE **linconsupgrade, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority)
#define DEFAULT_PRESOLPAIRWISE
#define DEFAULT_MAXAGGRNORMSCALE
static SCIP_RETCODE performVarDeletions(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
#define checkMaxActivityDelta(scip, consdata)
#define CONSHDLR_SEPAPRIORITY
static SCIP_Bool isFiniteNonnegativeIntegral(SCIP *scip, SCIP_Real x)
#define DEFAULT_SINGLETONSTUFFING
#define DEFAULT_MAXROUNDSROOT
static void consdataUpdateSignatures(SCIP_CONSDATA *consdata, int pos)
#define DEFAULT_MAXCARDBOUNDDIST
#define DEFAULT_MAXEASYACTIVITYDELTA
static SCIP_RETCODE scaleCons(SCIP *scip, SCIP_CONS *cons, SCIP_Real scalar)
static int inferInfoGetPos(INFERINFO inferinfo)
static SCIP_RETCODE detectRedundantConstraints(SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, SCIP_Bool *cutoff, int *ndelconss, int *nchgsides)
#define DEFAULT_CHECKRELMAXABS
#define DEFAULT_MAXDUALMULTAGGRQUOT
static void linconsupgradeFree(SCIP *scip, SCIP_LINCONSUPGRADE **linconsupgrade)
static SCIP_RETCODE aggregateConstraints(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, int *commonidx0, int *commonidx1, int *diffidx0minus1, int *diffidx1minus0, int nvarscommon, int commonidxweight, int diffidx0minus1weight, int diffidx1minus0weight, SCIP_Real maxaggrnormscale, int *nchgcoefs, SCIP_Bool *aggregated, SCIP_Bool *infeasible)
static SCIP_RETCODE analyzeConflict(SCIP *scip, SCIP_CONS *cons, SCIP_Bool reasonisrhs)
static SCIP_RETCODE rangedRowPropagation(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *nchgbds, int *naddconss)
static INFERINFO intToInferInfo(int i)
static SCIP_RETCODE mergeMultiples(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_SOL *sol, SCIP_Bool separatecards, SCIP_Bool separateall, int *ncuts, SCIP_Bool *cutoff)
static SCIP_RETCODE addSymmetryInformation(SCIP *scip, SYM_SYMTYPE symtype, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
static void consdataGetActivityBounds(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Bool goodrelax, SCIP_Real *minactivity, SCIP_Real *maxactivity, SCIP_Bool *ismintight, SCIP_Bool *ismaxtight, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity)
static SCIP_RETCODE convertLongEquality(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS *cons, SCIP_Bool *cutoff, int *naggrvars, int *ndelconss)
static void consdataCheckNonbinvar(SCIP_CONSDATA *consdata)
static SCIP_RETCODE chgLhs(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
#define DEFAULT_MAXMULTAGGRQUOT
static void consdataUpdateActivitiesGlbUb(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Real oldub, SCIP_Real newub, SCIP_Real val, SCIP_Bool checkreliability)
static SCIP_RETCODE consCatchEvent(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
static void consdataCalcMinAbsval(SCIP_CONSDATA *consdata)
static SCIP_RETCODE addConflictBounds(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, SCIP_BDCHGIDX *bdchgidx, int inferpos, SCIP_Bool reasonisrhs)
#define MAXCONSPRESOLROUNDS
static SCIP_RETCODE consdataEnsureVarsSize(SCIP *scip, SCIP_CONSDATA *consdata, int num)
#define NONLINCONSUPGD_PRIORITY
#define DEFAULT_MAXSEPACUTSROOT
static SCIP_RETCODE tightenBounds(SCIP *scip, SCIP_CONS *cons, SCIP_Real maxeasyactivitydelta, SCIP_Bool sortvars, SCIP_Bool *cutoff, int *nchgbds)
static void consdataCalcMaxAbsval(SCIP_CONSDATA *consdata)
#define DEFAULT_RANGEDROWPROPAGATION
static SCIP_RETCODE consDropAllEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
#define DEFAULT_PRESOLUSEHASHING
static SCIP_Real consdataGetActivity(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol)
static SCIP_RETCODE consdataTightenCoefs(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides)
static SCIP_RETCODE normalizeCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
static SCIP_RETCODE presolStuffing(SCIP *scip, SCIP_CONS *cons, SCIP_Bool singletonstuffing, SCIP_Bool singlevarstuffing, SCIP_Bool *cutoff, int *nfixedvars, int *nchgbds)
static SCIP_RETCODE unlockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
static void consdataCalcSignatures(SCIP_CONSDATA *consdata)
static SCIP_RETCODE addConflictReasonVars(SCIP *scip, SCIP_VAR **vars, int nvars, SCIP_VAR *var, SCIP_Real bound)
#define DEFAULT_RANGEDROWFREQ
static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool tightenbounds, SCIP_Bool rangedrowpropagation, SCIP_Real maxeasyactivitydelta, SCIP_Bool sortvars, SCIP_Bool *cutoff, int *nchgbds)
static SCIP_RETCODE updateCutoffbound(SCIP *scip, SCIP_CONS *cons, SCIP_Real primalbound)
static void consdataUpdateDelCoef(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real val, SCIP_Bool checkreliability)
#define DEFAULT_RANGEDROWARTCONS
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_CONS *cons, int pos)
#define MAXSCALEDCOEFINTEGER
static void consdataUpdateAddCoef(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real val, SCIP_Bool checkreliability)
static void getMinActivity(SCIP *scip, SCIP_CONSDATA *consdata, int posinf, int neginf, int poshuge, int neghuge, SCIP_Real delta, SCIP_Bool global, SCIP_Bool goodrelax, SCIP_Real *minactivity, SCIP_Bool *istight, SCIP_Bool *issettoinfinity)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
static SCIP_RETCODE chgRhs(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
#define DEFAULT_SIMPLIFYINEQUALITIES
#define CONSHDLR_PROPFREQ
static SCIP_RETCODE tightenVarBoundsEasy(SCIP *scip, SCIP_CONS *cons, int pos, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool force)
static void consdataUpdateActivities(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real oldbound, SCIP_Real newbound, SCIP_Real val, SCIP_BOUNDTYPE boundtype, SCIP_Bool global, SCIP_Bool checkreliability)
static SCIP_RETCODE convertEquality(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *ndelconss)
static unsigned int getParallelConsKey(SCIP_CONS *cons)
static SCIP_RETCODE fixVariables(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars)
#define CONSHDLR_PRESOLTIMING
#define DEFAULT_DETECTPARTIALOBJECTIVE
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_RESULT *result)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
static SCIP_RETCODE dualPresolve(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *ndelconss)
#define DEFAULT_MAXSEPACUTS
static void consdataGetActivityResiduals(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real val, SCIP_Bool goodrelax, SCIP_Real *minresactivity, SCIP_Real *maxresactivity, SCIP_Bool *ismintight, SCIP_Bool *ismaxtight, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity)
static SCIP_Real consdataGetMaxAbsval(SCIP_CONSDATA *consdata)
static SCIP_RETCODE addNlrow(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE consPrintConsSol(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, FILE *file)
#define CONSHDLR_EAGERFREQ
static void getMaxActivity(SCIP *scip, SCIP_CONSDATA *consdata, int posinf, int neginf, int poshuge, int neghuge, SCIP_Real delta, SCIP_Bool global, SCIP_Bool goodrelax, SCIP_Real *maxactivity, SCIP_Bool *istight, SCIP_Bool *issettoinfinity)
#define DEFAULT_TIGHTENBOUNDSFREQ
static void getNewSidesAfterAggregation(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *slackvar, SCIP_Real slackcoef, SCIP_Real *newlhs, SCIP_Real *newrhs)
static SCIP_RETCODE convertUnaryEquality(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *ndelconss)
static void consdataUpdateChgCoef(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real oldval, SCIP_Real newval, SCIP_Bool checkreliability)
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
static void consdataRecomputeGlbMaxactivity(SCIP *scip, SCIP_CONSDATA *consdata)
static SCIP_RETCODE applyFixings(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
static void consdataCalcActivities(SCIP *scip, SCIP_CONSDATA *consdata)
#define DEFAULT_MAXROUNDS
static void consdataGetGlbActivityResiduals(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real val, SCIP_Bool goodrelax, SCIP_Real *minresactivity, SCIP_Real *maxresactivity, SCIP_Bool *ismintight, SCIP_Bool *ismaxtight, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity)
#define CONSHDLR_ENFOPRIORITY
static SCIP_RETCODE tightenVarUb(SCIP *scip, SCIP_CONS *cons, int pos, PROPRULE proprule, SCIP_Real newub, SCIP_Real oldub, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool force)
static int getInferInt(PROPRULE proprule, int pos)
static int inferInfoGetProprule(INFERINFO inferinfo)
#define DEFAULT_MINGAINPERNMINCOMP
static SCIP_Real consdataGetFeasibility(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol)
static SCIP_RETCODE rangedRowSimplify(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides)
static SCIP_RETCODE aggregateVariables(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars)
#define CONSHDLR_DELAYSEPA
static void consdataInvalidateActivities(SCIP_CONSDATA *consdata)
#define DEFAULT_RANGEDROWMAXDEPTH
static SCIP_RETCODE analyzeConflictRangedRow(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int nvars, SCIP_VAR *var, SCIP_Real bound)
static SCIP_RETCODE consDropEvent(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE tightenVarBounds(SCIP *scip, SCIP_CONS *cons, int pos, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool force)
static SCIP_Real consdataGetMinAbsval(SCIP_CONSDATA *consdata)
static SCIP_Bool consdataIsResidualIntegral(SCIP *scip, SCIP_CONSDATA *consdata, int pos, SCIP_Real val)
static int inferInfoToInt(INFERINFO inferinfo)
static SCIP_RETCODE preprocessConstraintPairs(SCIP *scip, SCIP_CONS **conss, int firstchange, int chkind, SCIP_Real maxaggrnormscale, SCIP_Bool *cutoff, int *ndelconss, int *nchgsides, int *nchgcoefs)
static SCIP_RETCODE consdataSort(SCIP *scip, SCIP_CONSDATA *consdata)
#define DEFAULT_SINGLEVARSTUFFING
static SCIP_RETCODE checkParallelObjective(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE simplifyInequalities(SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides, SCIP_Bool *infeasible)
static SCIP_RETCODE consCatchAllEvents(SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE resolvePropagation(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, INFERINFO inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_RESULT *result)
static SCIP_Bool isRangedRow(SCIP *scip, SCIP_Real lhs, SCIP_Real rhs)
#define DEFAULT_DETECTLOWERBOUND
static SCIP_RETCODE checkPartialObjective(SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata)
#define CONSHDLR_DELAYPROP
static void consdataGetGlbActivityBounds(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Bool goodrelax, SCIP_Real *glbminactivity, SCIP_Real *glbmaxactivity, SCIP_Bool *ismintight, SCIP_Bool *ismaxtight, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity)
static SCIP_Bool canTightenBounds(SCIP_CONS *cons)
#define DEFAULT_SEPARATEALL
static void findOperators(const char *str, char **firstoperator, char **secondoperator, SCIP_Bool *success)
static SCIP_RETCODE fullDualPresolve(SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool *cutoff, int *nchgbds)
static INFERINFO getInferInfo(PROPRULE proprule, int pos)
Constraint handler for linear constraints in their most general form, .
constraint handler for nonlinear constraints specified by algebraic expressions
defines macros for basic operations in double-double arithmetic giving roughly twice the precision of...
#define SCIPquadprecSumQD(r, a, b)
#define QUAD_ASSIGN(a, constant)
#define QUAD_ASSIGN_Q(a, b)
#define SCIPdebugGetSolVal(scip, var, val)
#define SCIPdebugAddSolVal(scip, var, val)
#define SCIP_MAXTREEDEPTH
#define SCIP_CALL_ABORT(x)
#define SCIP_LONGINT_FORMAT
SCIP_Real SCIPgetDualsolLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeLinconsUpgrade(SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname)
#define SCIP_DECL_NONLINCONSUPGD(x)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPupgradeConsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **upgdcons)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_RETCODE SCIPincludeConsUpgradeNonlinear(SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nlconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_ROW * SCIPgetRowLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
SCIP_EXPR * SCIPgetExprNonlinear(SCIP_CONS *cons)
SCIP_RETCODE SCIPseparateRelaxedKnapsack(SCIP *scip, SCIP_CONS *cons, SCIP_SEPA *sepa, int nknapvars, SCIP_VAR **knapvars, SCIP_Real *knapvals, SCIP_Real valscale, SCIP_Real rhs, SCIP_SOL *sol, SCIP_Bool *cutoff, int *ncuts)
SCIP_Real SCIPgetRhsNonlinear(SCIP_CONS *cons)
SCIP_Real SCIPgetDualfarkasLinear(SCIP *scip, SCIP_CONS *cons)
#define SCIP_DECL_LINCONSUPGD(x)
SCIP_RETCODE SCIPcopyConsLinear(SCIP *scip, SCIP_CONS **cons, SCIP *sourcescip, const char *name, int nvars, SCIP_VAR **sourcevars, SCIP_Real *sourcecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid)
SCIP_RETCODE SCIPcleanupConssLinear(SCIP *scip, SCIP_Bool onlychecked, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Real SCIPgetActivityLinear(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
SCIP_Real SCIPgetFeasibilityLinear(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
SCIP_RETCODE SCIPclassifyConstraintTypesLinear(SCIP *scip, SCIP_LINCONSSTATS *linconsstats)
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_Real SCIPgetLhsNonlinear(SCIP_CONS *cons)
SCIP_RETCODE SCIPchgCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPdelCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
SCIP_RETCODE SCIPincludeConshdlrLinear(SCIP *scip)
SCIP_RETCODE SCIPconvertCutsToConss(SCIP *scip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, int *ncutsadded)
SCIP_Bool SCIPisConsCompressionEnabled(SCIP *scip)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisPresolveFinished(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNObjVars(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNContVars(SCIP *scip)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
SCIP_RETCODE SCIPaddObjoffset(SCIP *scip, SCIP_Real addval)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_RETCODE SCIPhashtableSafeInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
#define SCIPhashSeven(a, b, c, d, e, f, g)
void SCIPhashtablePrintStatistics(SCIP_HASHTABLE *hashtable, SCIP_MESSAGEHDLR *messagehdlr)
static INLINE uint32_t SCIPrealHashCode(double x)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
#define SCIPhashSignature64(a)
SCIP_RETCODE SCIPupdateLocalLowerbound(SCIP *scip, SCIP_Real newbound)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLocalLowerbound(SCIP *scip)
SCIP_RETCODE SCIPaddConflict(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPaddConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_NODE *validnode)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
#define SCIPdebugMsgPrint
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_Longint SCIPcalcGreComDiv(SCIP_Longint val1, SCIP_Longint val2)
SCIP_Longint SCIPcalcSmaComMul(SCIP_Longint val1, SCIP_Longint val2)
SCIP_Bool SCIPrealToRational(SCIP_Real val, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Longint *nominator, SCIP_Longint *denominator)
SCIP_Real SCIPselectSimpleValue(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
int SCIPgetNLPBranchCands(SCIP *scip)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
int SCIPconshdlrGetPropFreq(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrGetSignedPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrDelvars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
int SCIPconsGetPos(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
int SCIPconsGetNUpgradeLocks(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsSeparated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool separate)
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
int SCIPconsGetNLocksPos(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
SCIP_Bool SCIPconsIsLockedType(SCIP_CONS *cons, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_RETCODE SCIPunmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
int SCIPconsGetNLocksNeg(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocked(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPsetConsPropagated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool propagate)
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_VARTYPE SCIPeventGetNewtype(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
SCIP_VARTYPE SCIPeventGetOldtype(SCIP_EVENT *event)
int SCIPexprGetNChildren(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprSum(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real * SCIPgetCoefsExprSum(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprVar(SCIP *scip, SCIP_EXPR *expr)
SCIP_EXPR ** SCIPexprGetChildren(SCIP_EXPR *expr)
SCIP_Real SCIPgetConstantExprSum(SCIP_EXPR *expr)
SCIP_VAR * SCIPgetVarExprVar(SCIP_EXPR *expr)
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPdelNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_Bool SCIPnlrowIsInNLP(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
SCIP_Bool SCIPinProbing(SCIP *scip)
void SCIPlinConsStatsIncTypeCount(SCIP_LINCONSSTATS *linconsstats, SCIP_LINCONSTYPE linconstype, int increment)
void SCIPlinConsStatsReset(SCIP_LINCONSSTATS *linconsstats)
SCIP_Bool SCIProwIsModifiable(SCIP_ROW *row)
SCIP_RETCODE SCIPchgRowLhs(SCIP *scip, SCIP_ROW *row, SCIP_Real lhs)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Real SCIProwGetDualfarkas(SCIP_ROW *row)
SCIP_RETCODE SCIPchgRowRhs(SCIP *scip, SCIP_ROW *row, SCIP_Real rhs)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_Real SCIProwGetDualsol(SCIP_ROW *row)
SCIP_Real SCIPgetRowSolActivity(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
void SCIPupdateSolLPConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_RETCODE SCIPupdateCutoffbound(SCIP *scip, SCIP_Real cutoffbound)
int SCIPgetNSepaRounds(SCIP *scip)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
int SCIPgetNRuns(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Longint SCIPgetNConflictConssApplied(SCIP *scip)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
SCIP_RETCODE SCIPextendPermsymDetectionGraphLinear(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool *success)
SCIP_Bool SCIPisUbBetter(SCIP *scip, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumRelLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLbBetter(SCIP *scip, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisHugeValue(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Real SCIPgetHugeValue(SCIP *scip)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumRelGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisScalingIntegral(SCIP *scip, SCIP_Real val, SCIP_Real scalar)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPcutoffbounddelta(SCIP *scip)
SCIP_Bool SCIPisUpdateUnreliable(SCIP *scip, SCIP_Real newvalue, SCIP_Real oldvalue)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPepsilon(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
SCIP_Bool SCIPinRepropagation(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_Bool SCIPvarIsInitial(SCIP_VAR *var)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Bool SCIPvarIsDeleted(SCIP_VAR *var)
SCIP_Real SCIPvarGetNegationConstant(SCIP_VAR *var)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPvarGetMultaggrConstant(SCIP_VAR *var)
SCIP_BOUNDTYPE SCIPvarGetBestBoundType(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPaddClique(SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Real SCIPvarGetAggrConstant(SCIP_VAR *var)
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPdoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPmultiaggregateVar(SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_Real *scalars, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
SCIP_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
SCIP_RETCODE SCIPparseVarsLinearsum(SCIP *scip, const char *str, SCIP_VAR **vars, SCIP_Real *vals, int *nvars, int varssize, int *requiredsize, char **endptr, SCIP_Bool *success)
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPflattenVarAggregationGraph(SCIP *scip, SCIP_VAR *var)
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarImplication(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_Bool SCIPvarIsRemovable(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_Bool SCIPvarIsRelaxationOnly(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
SCIP_RETCODE SCIPwriteVarsLinearsum(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool type)
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
SCIP_RETCODE SCIPinferVarFixCons(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
void SCIPsortDownRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPskipSpace(char **s)
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
static const SCIP_Real scalars[]
static const char * paramname[]
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for conflict analysis handlers
public methods for managing constraints
public methods for managing events
public functions to work with algebraic expressions
public methods for LP management
public methods for message output
#define SCIPstatisticMessage
#define SCIPdebugPrintCons(x, y, z)
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for problem variables
public methods for branching rule plugins and branching
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for cuts and aggregation rows
public methods for event handler plugins and event handlers
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for the probing mode
public methods for solutions
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
SCIP_DECL_LINCONSUPGD((*linconsupgd))
structs for symmetry computations
methods for dealing with symmetry detection graphs
#define SCIP_DECL_CONFLICTEXEC(x)
@ SCIP_CONFTYPE_PROPAGATION
#define SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(x)
#define SCIP_DECL_CONSGETPERMSYMGRAPH(x)
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSDELETE(x)
#define SCIP_DECL_CONSEXIT(x)
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSINITSOL(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
@ SCIP_LINCONSTYPE_BINPACKING
@ SCIP_LINCONSTYPE_VARBOUND
@ SCIP_LINCONSTYPE_INVKNAPSACK
@ SCIP_LINCONSTYPE_PRECEDENCE
@ SCIP_LINCONSTYPE_AGGREGATION
@ SCIP_LINCONSTYPE_MIXEDBINARY
@ SCIP_LINCONSTYPE_SINGLETON
@ SCIP_LINCONSTYPE_SETCOVERING
@ SCIP_LINCONSTYPE_EQKNAPSACK
@ SCIP_LINCONSTYPE_KNAPSACK
@ SCIP_LINCONSTYPE_SETPARTITION
@ SCIP_LINCONSTYPE_INTKNAPSACK
@ SCIP_LINCONSTYPE_SETPACKING
@ SCIP_LINCONSTYPE_GENERAL
@ SCIP_LINCONSTYPE_CARDINALITY
#define SCIP_DECL_CONSACTIVE(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSDEACTIVE(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSEXITPRE(x)
#define SCIP_DECL_CONSLOCK(x)
#define SCIP_DECL_CONSCOPY(x)
#define SCIP_DECL_CONSINIT(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_CONSSEPASOL(x)
enum SCIP_LinConstype SCIP_LINCONSTYPE
#define SCIP_DECL_CONSDELVARS(x)
#define SCIP_EVENTTYPE_BOUNDCHANGED
#define SCIP_EVENTTYPE_VARUNLOCKED
#define SCIP_EVENTTYPE_TYPECHANGED
#define SCIP_EVENTTYPE_GUBCHANGED
#define SCIP_EVENTTYPE_GBDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_EVENTTYPE_VARFIXED
#define SCIP_EVENTTYPE_VARDELETED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_FORMAT
#define SCIP_EVENTTYPE_GLBCHANGED
#define SCIP_EVENTTYPE_BOUNDRELAXED
#define SCIP_EVENTTYPE_LBCHANGED
#define SCIP_EVENTTYPE_UBCHANGED
#define SCIP_EVENTTYPE_BOUNDTIGHTENED
#define SCIP_EVENTTYPE_LBTIGHTENED
enum SCIP_BoundType SCIP_BOUNDTYPE
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_SORTINDCOMP(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_EXITPRESOLVE
@ SCIP_STAGE_TRANSFORMING
enum SYM_Symtype SYM_SYMTYPE
#define SCIP_PRESOLTIMING_EXHAUSTIVE
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_ORIGINAL
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED
enum SCIP_LockType SCIP_LOCKTYPE
enum SCIP_Vartype SCIP_VARTYPE
enum SCIP_Varstatus SCIP_VARSTATUS