SCIP Doxygen Documentation
Loading...
Searching...
No Matches
expr_abs.c
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* SCIP --- Solving Constraint Integer Programs */
5/* */
6/* Copyright (c) 2002-2026 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file expr_abs.c
26 * @ingroup DEFPLUGINS_EXPR
27 * @brief absolute expression handler
28 * @author Stefan Vigerske
29 * @author Benjamin Mueller
30 */
31
32/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33
34#include "scip/expr_value.h"
35#include "scip/expr_abs.h"
36#include "scip/expr.h"
37
38#define EXPRHDLR_NAME "abs"
39#define EXPRHDLR_DESC "absolute value expression"
40#define EXPRHDLR_PRECEDENCE 70000
41#define EXPRHDLR_HASHKEY SCIPcalcFibHash(7187.0)
42
43/*
44 * Data structures
45 */
46
47/*
48 * Local methods
49 */
50
51/** computes both tangent underestimates and secant */
52static
54 SCIP* scip, /**< SCIP data structure */
55 SCIP_INTERVAL bounds, /**< bounds of child */
56 SCIP_Bool overestimate, /**< whether the expression shall be overestimated or underestimated */
57 SCIP_Real** coefs, /**< buffer to store coefficients of computed estimators */
58 SCIP_Real* constant, /**< buffer to store constant of computed estimators */
59 int* nreturned /**< buffer to store number of estimators that have been computed */
60 )
61{
62 assert(scip != NULL);
63
64 *nreturned = 0;
65
66 /**! [SnippetExprInitestimatesAbs] */
67 if( !overestimate )
68 {
69 /* compute left tangent -x <= z */
70 coefs[*nreturned][0] = -1.0;
71 constant[*nreturned] = 0.0;
72 (*nreturned)++;
73
74 /* compute right tangent x <= z */
75 coefs[*nreturned][0] = 1.0;
76 constant[*nreturned] = 0.0;
77 (*nreturned)++;
78 }
79
80 /* compute secant */
81 if( overestimate )
82 {
83 SCIP_Real lb;
84 SCIP_Real ub;
85
86 lb = bounds.inf;
87 ub = bounds.sup;
88
89 /* it does not make sense to add a cut if child variable is unbounded or fixed */
90 if( !SCIPisEQ(scip, lb, ub) )
91 {
92 if( !SCIPisPositive(scip, ub) )
93 {
94 /* z = -x, so add z <= -x here (-x <= z is the underestimator that is added above) */
95 coefs[*nreturned][0] = -1.0;
96 constant[*nreturned] = 0.0;
97 (*nreturned)++;
98 }
99 else if( !SCIPisNegative(scip, lb) )
100 {
101 /* z = x, so add z <= x here (x <= z is the underestimator that is added above) */
102 coefs[*nreturned][0] = 1.0;
103 constant[*nreturned] = 0.0;
104 (*nreturned)++;
105 }
106 else if( !SCIPisInfinity(scip, -lb) && !SCIPisInfinity(scip, ub) )
107 {
108 /* z = abs(x), x still has mixed sign */
110
111 /* let alpha = (|ub|-|lb|) / (ub-lb) then the resulting secant looks like
112 *
113 * z - |ub| <= alpha * (x - ub) <=> z <= alpha * x + |ub| - alpha * ub
114 */
115 alpha = (REALABS(ub) - REALABS(lb)) / (ub - lb);
116
117 coefs[*nreturned][0] = alpha;
118 constant[*nreturned] = REALABS(ub) - alpha * ub;
119 (*nreturned)++;
120 }
121 }
122 }
123 /**! [SnippetExprInitestimatesAbs] */
124
125 return SCIP_OKAY;
126}
127
128
129/*
130 * Callback methods of expression handler
131 */
132
133/** simplifies an abs expression
134 *
135 * Evaluates the absolute value function when its child is a value expression.
136 *
137 * TODO: abs(*) = * if * >= 0 or - * if * < 0
138 */
139static
141{ /*lint --e{715}*/
142 SCIP_EXPR* child;
143
144 assert(scip != NULL);
145 assert(expr != NULL);
146 assert(simplifiedexpr != NULL);
147 assert(SCIPexprGetNChildren(expr) == 1);
148
149 child = SCIPexprGetChildren(expr)[0];
150 assert(child != NULL);
151
152 /* check for value expression */
153 if( SCIPisExprValue(scip, child) )
154 {
155 SCIP_CALL( SCIPcreateExprValue(scip, simplifiedexpr, REALABS(SCIPgetValueExprValue(child)), ownercreate, ownercreatedata) );
156 }
157 else
158 {
159 *simplifiedexpr = expr;
160
161 /* we have to capture it, since it must simulate a "normal" simplified call in which a new expression is created */
162 SCIPcaptureExpr(*simplifiedexpr);
163 }
164
165 return SCIP_OKAY;
166}
167
168static
170{ /*lint --e{715}*/
172
173 return SCIP_OKAY;
174}
175
176static
178{ /*lint --e{715}*/
179 SCIP_EXPR* childexpr;
180
181 assert(expr != NULL);
182
183 /* parse child expression from remaining string */
184 SCIP_CALL( SCIPparseExpr(scip, &childexpr, string, endstring, ownercreate, ownercreatedata) );
185 assert(childexpr != NULL);
186
187 /* create absolute expression */
188 SCIP_CALL( SCIPcreateExprAbs(scip, expr, childexpr, ownercreate, ownercreatedata) );
189 assert(*expr != NULL);
190
191 /* release child expression since it has been captured by the absolute expression */
192 SCIP_CALL( SCIPreleaseExpr(scip, &childexpr) );
193
194 *success = TRUE;
195
196 return SCIP_OKAY;
197}
198
199/** expression point evaluation callback */
200static
202{ /*lint --e{715}*/
203 assert(expr != NULL);
204 assert(SCIPexprGetNChildren(expr) == 1);
205 assert(SCIPexprGetEvalValue(SCIPexprGetChildren(expr)[0]) != SCIP_INVALID); /*lint !e777*/
206
208
209 return SCIP_OKAY;
210}
211
212
213/** expression derivative evaluation callback */
214static
216{ /*lint --e{715}*/
217 SCIP_EXPR* child;
218
219 assert(expr != NULL);
220 assert(childidx == 0);
221 assert(SCIPexprGetEvalValue(expr) != SCIP_INVALID); /*lint !e777*/
222
223 child = SCIPexprGetChildren(expr)[0];
224 assert(child != NULL);
225 assert(strcmp(SCIPexprhdlrGetName(SCIPexprGetHdlr(child)), "val") != 0);
226
227 *val = (SCIPexprGetEvalValue(child) >= 0.0) ? 1.0 : -1.0;
228
229 return SCIP_OKAY;
230}
231
232/** expression interval evaluation callback */
233static
235{ /*lint --e{715}*/
236 SCIP_INTERVAL childinterval;
237
238 assert(expr != NULL);
239 assert(SCIPexprGetNChildren(expr) == 1);
240
241 childinterval = SCIPexprGetActivity(SCIPexprGetChildren(expr)[0]);
242
243 if( SCIPintervalIsEmpty(SCIP_INTERVAL_INFINITY, childinterval) )
244 SCIPintervalSetEmpty(interval);
245 else
246 SCIPintervalAbs(SCIP_INTERVAL_INFINITY, interval, childinterval);
247
248 return SCIP_OKAY;
249}
250
251/** expression estimator callback */
252static
254{ /*lint --e{715}*/
255 assert(scip != NULL);
256 assert(expr != NULL);
257 assert(SCIPexprGetNChildren(expr) == 1);
258 assert(coefs != NULL);
259 assert(constant != NULL);
260 assert(islocal != NULL);
261 assert(branchcand != NULL);
262 assert(*branchcand == TRUE);
263 assert(success != NULL);
264
266
267 SCIPdebugMsg(scip, "%sestimate |child| over locdom=[%g,%g] glbdom=[%g,%g]\n", overestimate ? "over" : "under",
268 localbounds[0].inf, localbounds[0].sup, globalbounds[0].inf, globalbounds[0].sup);
269
270 /**! [SnippetExprEstimateAbs] */
271 if( !overestimate )
272 {
273 *constant = 0.0;
274
275 if( refpoint[0] <= 0.0 )
276 *coefs = -1.0;
277 else
278 *coefs = 1.0;
279
280 *islocal = FALSE;
281 *branchcand = FALSE;
282 }
283 else
284 {
285 /* overestimator */
286 SCIP_Real lb;
287 SCIP_Real ub;
288
289 lb = localbounds[0].inf;
290 ub = localbounds[0].sup;
291
292 if( !SCIPisPositive(scip, ub) )
293 {
294 /* |x| = -x */
295 *coefs = -1.0;
296 *constant = 0.0;
297 *islocal = SCIPisPositive(scip, globalbounds[0].sup);
298 *branchcand = FALSE;
299 }
300 else if( !SCIPisNegative(scip, lb) )
301 {
302 /* |x| = x */
303 *coefs = 1.0;
304 *constant = 0.0;
305 *islocal = SCIPisNegative(scip, globalbounds[0].inf);
306 *branchcand = FALSE;
307 }
308 else if( !SCIPisRelEQ(scip, lb, -ub) )
309 {
310 /* |x| with x having mixed sign and ub+lb does not cancel out -> secant */
312
313 assert(lb < 0.0);
314 assert(ub > 0.0);
315
316 /* let alpha = (|ub|-|lb|) / (ub-lb) = (ub+lb)/(ub-lb)
317 * then the resulting secant is -lb + alpha * (x - lb) = -lb - alpha*lb + alpha*x
318 */
319 alpha = (ub + lb) / (ub - lb);
320
321 *coefs = alpha;
322 *constant = -lb - alpha * lb;
323 *islocal = TRUE;
324 }
325 else if( lb == -ub ) /*lint !e777*/
326 {
327 /* alpha = 0 */
328 *coefs = 0.0;
329 *constant = -lb;
330 *islocal = TRUE;
331 }
332 else
333 {
334 *success = FALSE;
335 return SCIP_OKAY;
336 }
337 }
338 /**! [SnippetExprEstimateAbs] */
339
340 SCIPdebugMsg(scip, "-> %g * <child> %+g, local=%u branchcand=%u\n", *coefs, *constant, *islocal, *branchcand);
341
342 *success = TRUE;
343
344 return SCIP_OKAY;
345}
346
347/** expression estimate initialization callback */
348static
350{ /*lint --e{715}*/
351 assert(expr != NULL);
352 assert(SCIPexprGetNChildren(expr) == 1);
353
355
356 /* compute initial cuts */
357 SCIP_CALL( computeCutsAbs(scip, bounds[0], overestimate, coefs, constant, nreturned) );
358
359 return SCIP_OKAY;
360}
361
362/** expression reverse propagation callback */
363static
365{ /*lint --e{715}*/
366 SCIP_INTERVAL childbounds;
367 SCIP_INTERVAL left;
368 SCIP_INTERVAL right;
369
370 assert(scip != NULL);
371 assert(expr != NULL);
372 assert(SCIPexprGetNChildren(expr) == 1);
373 assert(bounds.inf >= 0.0); /* bounds should have been intersected with activity, which is >= 0 */
374
375 /**! [SnippetExprReversepropAbs] */
376 /* abs(x) in I -> x \in (-I \cup I) \cap bounds(x) */
377 right = bounds; /* I */
378 SCIPintervalSetBounds(&left, -right.sup, -right.inf); /* -I */
379
380 childbounds = childrenbounds[0];
381 /* childbounds can be empty here already, but that should work fine here */
382
383 SCIPintervalIntersect(&left, left, childbounds); /* -I \cap bounds(x), could become empty */
384 SCIPintervalIntersect(&right, right, childbounds); /* I \cap bounds(x), could become empty */
385
386 /* compute smallest interval containing (-I \cap bounds(x)) \cup (I \cap bounds(x)) = (-I \cup I) \cap bounds(x)
387 * this works also if left or right is empty
388 */
389 SCIPintervalUnify(&childrenbounds[0], left, right);
390 /**! [SnippetExprReversepropAbs] */
391
392 return SCIP_OKAY;
393}
394
395/** expression hash callback */
396static
398{ /*lint --e{715}*/
399 assert(scip != NULL);
400 assert(expr != NULL);
401 assert(SCIPexprGetNChildren(expr) == 1);
402 assert(hashkey != NULL);
403 assert(childrenhashes != NULL);
404
405 *hashkey = EXPRHDLR_HASHKEY;
406 *hashkey ^= childrenhashes[0];
407
408 return SCIP_OKAY;
409}
410
411/** expression curvature detection callback */
412static
414{ /*lint --e{715}*/
415 SCIP_EXPR* child;
416 SCIP_INTERVAL childbounds;
417 SCIP_Real childinf;
418 SCIP_Real childsup;
419
420 assert(scip != NULL);
421 assert(expr != NULL);
422 assert(exprcurvature != SCIP_EXPRCURV_UNKNOWN);
423 assert(success != NULL);
424 assert(childcurv != NULL);
425 assert(SCIPexprGetNChildren(expr) == 1);
426
427 child = SCIPexprGetChildren(expr)[0];
428 assert(child != NULL);
429
430 /**! [SnippetExprCurvatureAbs] */
431 /* expression is |child|, get domain of child */
433 childbounds = SCIPexprGetActivity(child);
434 childinf = SCIPintervalGetInf(childbounds);
435 childsup = SCIPintervalGetSup(childbounds);
436
437 *success = TRUE;
438 if( childinf >= 0.0 ) /* |f(x)| = f(x) */
439 childcurv[0] = exprcurvature;
440 else if( childsup <= 0.0 ) /* |f(x)| = -f(x) */
441 childcurv[0] = SCIPexprcurvNegate(exprcurvature);
442 else if( exprcurvature == SCIP_EXPRCURV_CONVEX ) /* |f(x)|, f mixed sign, is convex if f is linear */
443 childcurv[0] = SCIP_EXPRCURV_LINEAR;
444 else /* |f(x)|, f mixed sign, is never concave nor linear */
445 *success = FALSE;
446 /**! [SnippetExprCurvatureAbs] */
447
448 return SCIP_OKAY;
449}
450
451/** expression monotonicity detection callback */
452static
454{ /*lint --e{715}*/
455 SCIP_EXPR* child;
456 SCIP_INTERVAL childbounds;
457
458 assert(scip != NULL);
459 assert(expr != NULL);
460 assert(result != NULL);
461 assert(childidx == 0);
462
463 child = SCIPexprGetChildren(expr)[0];
464 assert(child != NULL);
465
466 /**! [SnippetExprMonotonicityAbs] */
468 childbounds = SCIPexprGetActivity(child);
469
470 if( childbounds.sup <= 0.0 )
472 else if( childbounds.inf >= 0.0 )
474 else
476 /**! [SnippetExprMonotonicityAbs] */
477
478 return SCIP_OKAY;
479}
480
481/** expression integrality detection callback */
482static
484{ /*lint --e{715}*/
485 SCIP_EXPR* child;
486
487 assert(scip != NULL);
488 assert(expr != NULL);
489 assert(integrality != NULL);
490 assert(SCIPexprGetNChildren(expr) == 1);
491
492 child = SCIPexprGetChildren(expr)[0];
493 assert(child != NULL);
494
495 *integrality = SCIPexprGetIntegrality(child);
496
497 return SCIP_OKAY;
498}
499
500
501/** creates the handler for absolute expression and includes it into SCIP */
503 SCIP* scip /**< SCIP data structure */
504 )
505{
506 SCIP_EXPRHDLR* exprhdlr;
507
509 EXPRHDLR_PRECEDENCE, evalAbs, NULL) );
510 assert(exprhdlr != NULL);
511
512 SCIPexprhdlrSetCopyFreeHdlr(exprhdlr, copyhdlrAbs, NULL);
513 SCIPexprhdlrSetSimplify(exprhdlr, simplifyAbs);
514 SCIPexprhdlrSetParse(exprhdlr, parseAbs);
515 SCIPexprhdlrSetIntEval(exprhdlr, intevalAbs);
516 SCIPexprhdlrSetEstimate(exprhdlr, initEstimatesAbs, estimateAbs);
517 SCIPexprhdlrSetHash(exprhdlr, hashAbs);
518 SCIPexprhdlrSetReverseProp(exprhdlr, reversepropAbs);
519 SCIPexprhdlrSetDiff(exprhdlr, bwdiffAbs, NULL, NULL);
520 SCIPexprhdlrSetCurvature(exprhdlr, curvatureAbs);
521 SCIPexprhdlrSetMonotonicity(exprhdlr, monotonicityAbs);
522 SCIPexprhdlrSetIntegrality(exprhdlr, integralityAbs);
523
524 return SCIP_OKAY;
525}
526
527/** creates an absolute value expression */
529 SCIP* scip, /**< SCIP data structure */
530 SCIP_EXPR** expr, /**< pointer where to store expression */
531 SCIP_EXPR* child, /**< single child */
532 SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), /**< function to call to create ownerdata */
533 void* ownercreatedata /**< data to pass to ownercreate */
534 )
535{
536 assert(expr != NULL);
537 assert(child != NULL);
539
540 SCIP_CALL( SCIPcreateExpr(scip, expr, SCIPfindExprhdlr(scip, EXPRHDLR_NAME), NULL, 1, &child, ownercreate, ownercreatedata) );
541
542 return SCIP_OKAY;
543}
544
545/** indicates whether expression is of abs-type */ /*lint -e{715}*/
547 SCIP* scip, /**< SCIP data structure */
548 SCIP_EXPR* expr /**< expression */
549 )
550{ /*lint --e{715}*/
551 assert(expr != NULL);
552
553 return strcmp(SCIPexprhdlrGetName(SCIPexprGetHdlr(expr)), EXPRHDLR_NAME) == 0;
554}
#define NULL
Definition def.h:257
#define SCIP_INVALID
Definition def.h:187
#define SCIP_INTERVAL_INFINITY
Definition def.h:189
#define SCIP_Bool
Definition def.h:100
#define SCIP_STRINGEQ(name, reference, retcode)
Definition def.h:454
#define SCIP_Real
Definition def.h:165
#define TRUE
Definition def.h:102
#define FALSE
Definition def.h:103
#define REALABS(x)
Definition def.h:191
#define SCIP_CALL(x)
Definition def.h:364
private functions to work with algebraic expressions
#define EXPRHDLR_HASHKEY
Definition expr_abs.c:41
static SCIP_RETCODE computeCutsAbs(SCIP *scip, SCIP_INTERVAL bounds, SCIP_Bool overestimate, SCIP_Real **coefs, SCIP_Real *constant, int *nreturned)
Definition expr_abs.c:53
#define EXPRHDLR_NAME
Definition expr_abs.c:38
#define EXPRHDLR_DESC
Definition expr_abs.c:39
#define EXPRHDLR_PRECEDENCE
Definition expr_abs.c:40
absolute expression handler
constant value expression handler
SCIP_Bool SCIPisExprAbs(SCIP *scip, SCIP_EXPR *expr)
Definition expr_abs.c:546
SCIP_RETCODE SCIPcreateExprAbs(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
Definition expr_abs.c:528
SCIP_RETCODE SCIPcreateExprValue(SCIP *scip, SCIP_EXPR **expr, SCIP_Real value, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
Definition expr_value.c:274
SCIP_RETCODE SCIPincludeExprhdlrAbs(SCIP *scip)
Definition expr_abs.c:502
#define SCIPdebugMsg
const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:545
void SCIPexprhdlrSetIntegrality(SCIP_EXPRHDLR *exprhdlr,)
Definition expr.c:440
void SCIPexprhdlrSetCurvature(SCIP_EXPRHDLR *exprhdlr,)
Definition expr.c:418
void SCIPexprhdlrSetParse(SCIP_EXPRHDLR *exprhdlr,)
Definition expr.c:407
void SCIPexprhdlrSetIntEval(SCIP_EXPRHDLR *exprhdlr,)
Definition expr.c:488
void SCIPexprhdlrSetMonotonicity(SCIP_EXPRHDLR *exprhdlr,)
Definition expr.c:429
void SCIPexprhdlrSetReverseProp(SCIP_EXPRHDLR *exprhdlr,)
Definition expr.c:510
void SCIPexprhdlrSetHash(SCIP_EXPRHDLR *exprhdlr,)
Definition expr.c:451
SCIP_RETCODE SCIPincludeExprhdlr(SCIP *scip, SCIP_EXPRHDLR **exprhdlr, const char *name, const char *desc, unsigned int precedence, SCIP_DECL_EXPREVAL((*eval)), SCIP_EXPRHDLRDATA *data)
Definition scip_expr.c:847
void SCIPexprhdlrSetSimplify(SCIP_EXPRHDLR *exprhdlr,)
Definition expr.c:499
void SCIPexprhdlrSetDiff(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRBWDIFF((*bwdiff)), SCIP_DECL_EXPRFWDIFF((*fwdiff)),)
Definition expr.c:473
void SCIPexprhdlrSetCopyFreeHdlr(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCOPYHDLR((*copyhdlr)),)
Definition expr.c:370
SCIP_EXPRHDLR * SCIPfindExprhdlr(SCIP *scip, const char *name)
Definition scip_expr.c:894
void SCIPexprhdlrSetEstimate(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRINITESTIMATES((*initestimates)),)
Definition expr.c:532
SCIP_IMPLINTTYPE SCIPexprGetIntegrality(SCIP_EXPR *expr)
Definition expr.c:4091
SCIP_RETCODE SCIPcreateExpr(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPRHDLR *exprhdlr, SCIP_EXPRDATA *exprdata, int nchildren, SCIP_EXPR **children, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
Definition scip_expr.c:1000
int SCIPexprGetNChildren(SCIP_EXPR *expr)
Definition expr.c:3872
SCIP_Bool SCIPisExprValue(SCIP *scip, SCIP_EXPR *expr)
Definition scip_expr.c:1468
SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)
Definition scip_expr.c:1443
SCIP_RETCODE SCIPparseExpr(SCIP *scip, SCIP_EXPR **expr, const char *exprstr, const char **finalpos, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
Definition scip_expr.c:1406
SCIP_Real SCIPgetValueExprValue(SCIP_EXPR *expr)
Definition expr_value.c:298
SCIP_Real SCIPexprGetEvalValue(SCIP_EXPR *expr)
Definition expr.c:3946
SCIP_EXPR ** SCIPexprGetChildren(SCIP_EXPR *expr)
Definition expr.c:3882
SCIP_INTERVAL SCIPexprGetActivity(SCIP_EXPR *expr)
Definition expr.c:4028
void SCIPcaptureExpr(SCIP_EXPR *expr)
Definition scip_expr.c:1435
SCIP_RETCODE SCIPevalExprActivity(SCIP *scip, SCIP_EXPR *expr)
Definition scip_expr.c:1742
SCIP_EXPRCURV SCIPexprcurvNegate(SCIP_EXPRCURV curvature)
Definition exprcurv.c:62
SCIP_EXPRHDLR * SCIPexprGetHdlr(SCIP_EXPR *expr)
Definition expr.c:3895
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
void SCIPintervalUnify(SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
void SCIPintervalAbs(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
void SCIPintervalIntersect(SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)
SCIP_Bool SCIPintervalIsEmpty(SCIP_Real infinity, SCIP_INTERVAL operand)
void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
struct SCIP_Interval SCIP_INTERVAL
SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)
void SCIPintervalSetEmpty(SCIP_INTERVAL *resultant)
SCIP_Bool SCIPisRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
return SCIP_OKAY
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_Real alpha
SCIP_Real sup
SCIP_Real inf
struct SCIP_Expr SCIP_EXPR
Definition type_expr.h:55
#define SCIP_DECL_EXPR_OWNERCREATE(x)
Definition type_expr.h:143
#define SCIP_DECL_EXPRREVERSEPROP(x)
Definition type_expr.h:659
#define SCIP_DECL_EXPRINITESTIMATES(x)
Definition type_expr.h:610
#define SCIP_DECL_EXPRCURVATURE(x)
Definition type_expr.h:340
@ SCIP_EXPRCURV_CONVEX
Definition type_expr.h:63
@ SCIP_EXPRCURV_LINEAR
Definition type_expr.h:65
@ SCIP_EXPRCURV_UNKNOWN
Definition type_expr.h:62
#define SCIP_DECL_EXPRPARSE(x)
Definition type_expr.h:312
#define SCIP_DECL_EXPRBWDIFF(x)
Definition type_expr.h:451
#define SCIP_DECL_EXPRINTEVAL(x)
Definition type_expr.h:541
#define SCIP_DECL_EXPRMONOTONICITY(x)
Definition type_expr.h:358
@ SCIP_MONOTONE_UNKNOWN
Definition type_expr.h:71
@ SCIP_MONOTONE_INC
Definition type_expr.h:72
@ SCIP_MONOTONE_DEC
Definition type_expr.h:73
struct SCIP_Exprhdlr SCIP_EXPRHDLR
Definition type_expr.h:194
#define SCIP_DECL_EXPRSIMPLIFY(x)
Definition type_expr.h:634
#define SCIP_DECL_EXPREVAL(x)
Definition type_expr.h:428
#define SCIP_DECL_EXPRHASH(x)
Definition type_expr.h:393
#define SCIP_DECL_EXPRCOPYHDLR(x)
Definition type_expr.h:210
#define SCIP_DECL_EXPRINTEGRALITY(x)
Definition type_expr.h:377
#define SCIP_DECL_EXPRESTIMATE(x)
Definition type_expr.h:577
@ SCIP_INVALIDCALL
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
Definition type_scip.h:39