SCIP_ExprhdlrData
79assert(lincoef !=
NULL);
80assert(linconstant !=
NULL);
81assert(success !=
NULL);
98coef = (log(ub) - log(lb)) / (ub - lb);
99constant = log(ub) - coef * ub;
109*linconstant += constant;
127assert(lincoef !=
NULL);
128assert(linconstant !=
NULL);
129assert(success !=
NULL);
140assert(refpoint != 0.0);
141coef = 1.0 / refpoint;
142constant = log(refpoint) - 1.0;
152coef = log((f+1.0) / f);
153constant = log(f) - coef * f;
163*linconstant += constant;
183assert(expr !=
NULL);
184assert(simplifiedexpr !=
NULL);
188assert(child !=
NULL);
201*simplifiedexpr = expr;
223assert(exprhdlrdata !=
NULL);
224assert(*exprhdlrdata !=
NULL);
235assert(targetexprdata !=
NULL);
236assert(sourceexpr !=
NULL);
239*targetexprdata =
NULL;
248assert(expr !=
NULL);
261assert(expr !=
NULL);
265assert(childexpr !=
NULL);
269assert(*expr !=
NULL);
283assert(expr !=
NULL);
309assert(expr !=
NULL);
310assert(childidx == 0);
314assert(child !=
NULL);
330assert(expr !=
NULL);
335assert(exprhdlrdata !=
NULL);
340 if( childinterval.
inf< exprhdlrdata->minzerodistance && exprhdlrdata->minzerodistance > 0.0 )
345 "Check your model formulation or use option expr/" EXPRHDLR_NAME "/minzerodistance to avoid this warning.\n",
346childinterval.
inf, exprhdlrdata->minzerodistance);
350exprhdlrdata->warnedonpole =
TRUE;
352childinterval.
inf= exprhdlrdata->minzerodistance;
374assert(expr !=
NULL);
377assert(coefs !=
NULL);
378assert(constant !=
NULL);
379assert(islocal !=
NULL);
380assert(branchcand !=
NULL);
381assert(*branchcand ==
TRUE);
382assert(success !=
NULL);
383assert(refpoint !=
NULL);
385lb = localbounds[0].inf;
386ub = localbounds[0].sup;
403 if( localbounds[0].sup < 0.2 )
404refpoint[0] = 0.5 * lb + 0.5 * ub;
411*branchcand =
FALSE;
435assert(expr !=
NULL);
441assert(child !=
NULL);
452lb =
MAX(lb,
MIN(0.5 * lb + 0.5 * ub, 0.1));
454refpointsover[0] = lb;
461 for( i = 0; i < 4; ++i )
463 if( (overest[i] && !overestimate) || (!overest[i] && (overestimate ||
SCIPisInfinity(
scip, ub))) )
469coefs[*nreturned][0] = 0.0;
470constant[*nreturned] = 0.0;
479 SCIPdebugMsg(
scip,
"init overestimate log(x) at x=%g -> %g*x+%g\n", refpointsover[i], coefs[*nreturned][0], constant[*nreturned]);
484 addLogSecant(
scip, lb, ub, coefs[*nreturned], &constant[*nreturned], &success);
487 SCIPdebugMsg(
scip,
"init underestimate log(x) on x=[%g,%g] -> %g*x+%g\n", lb, ub, coefs[*nreturned][0], constant[*nreturned]);
507assert(expr !=
NULL);
511assert(exprhdlrdata !=
NULL);
522 if( childrenbounds[0].inf < exprhdlrdata->minzerodistance )
524 SCIPdebugMsg(
scip,
"Pushing child lower bound from %g to %g; upper bound remains at %g\n", childrenbounds[0].inf,
SCIPepsilon(
scip), childrenbounds[0].sup);
529 "Check your model formulation or use option expr/" EXPRHDLR_NAME "/minzerodistance to avoid this warning.\n",
530childrenbounds[0].inf, exprhdlrdata->minzerodistance);
534exprhdlrdata->warnedonpole =
TRUE;
537childrenbounds[0].inf = exprhdlrdata->minzerodistance;
548assert(expr !=
NULL);
550assert(hashkey !=
NULL);
551assert(childrenhashes !=
NULL);
554*hashkey ^= childrenhashes[0];
564assert(expr !=
NULL);
565assert(childcurv !=
NULL);
585assert(expr !=
NULL);
586assert(result !=
NULL);
587assert(childidx == 0);
607assert(exprhdlr !=
NULL);
622 "minimal distance from zero to enforce for child in bound tightening",
635 void* ownercreatedata
638assert(expr !=
NULL);
639assert(child !=
NULL);
653assert(expr !=
NULL);
#define SCIP_INTERVAL_INFINITY
static SCIP_DECL_EXPRHASH(hashLog)
static void addLogLinearization(SCIP *scip, SCIP_Real refpoint, SCIP_Bool isint, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
static SCIP_DECL_EXPRFREEHDLR(freehdlrLog)
static SCIP_DECL_EXPRBWDIFF(bwdiffLog)
static SCIP_DECL_EXPRINITESTIMATES(initestimatesLog)
static SCIP_DECL_EXPRFREEDATA(freedataLog)
static SCIP_DECL_EXPRCOPYDATA(copydataLog)
static SCIP_DECL_EXPRMONOTONICITY(monotonicityLog)
static SCIP_DECL_EXPRPARSE(parseLog)
static SCIP_DECL_EXPRESTIMATE(estimateLog)
static SCIP_DECL_EXPRREVERSEPROP(reversepropLog)
static SCIP_DECL_EXPRCOPYHDLR(copyhdlrLog)
static SCIP_DECL_EXPRSIMPLIFY(simplifyLog)
static SCIP_DECL_EXPREVAL(evalLog)
static void addLogSecant(SCIP *scip, SCIP_Real lb, SCIP_Real ub, SCIP_Real *lincoef, SCIP_Real *linconstant, SCIP_Bool *success)
#define EXPRHDLR_PRECEDENCE
static SCIP_DECL_EXPRCURVATURE(curvatureLog)
static SCIP_DECL_EXPRINTEVAL(intevalLog)
logarithm expression handler
constant value expression handler
SCIP_Bool SCIPisExprLog(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPcreateExprLog(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPcreateExprValue(SCIP *scip, SCIP_EXPR **expr, SCIP_Real value, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPincludeExprhdlrLog(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_VERBLEVEL SCIPgetVerbLevel(SCIP *scip)
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)
const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)
void SCIPexprhdlrSetCopyFreeData(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCOPYDATA((*copydata)), SCIP_DECL_EXPRFREEDATA((*freedata)))
void SCIPexprhdlrSetHash(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRHASH((*hash)))
SCIP_EXPRHDLRDATA * SCIPexprhdlrGetData(SCIP_EXPRHDLR *exprhdlr)
void SCIPexprhdlrSetCopyFreeHdlr(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCOPYHDLR((*copyhdlr)), SCIP_DECL_EXPRFREEHDLR((*freehdlr)))
void SCIPexprhdlrSetDiff(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRBWDIFF((*bwdiff)), SCIP_DECL_EXPRFWDIFF((*fwdiff)), SCIP_DECL_EXPRBWFWDIFF((*bwfwdiff)))
void SCIPexprhdlrSetReverseProp(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRREVERSEPROP((*reverseprop)))
void SCIPexprhdlrSetParse(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRPARSE((*parse)))
void SCIPexprhdlrSetEstimate(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRINITESTIMATES((*initestimates)), SCIP_DECL_EXPRESTIMATE((*estimate)))
void SCIPexprhdlrSetMonotonicity(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRMONOTONICITY((*monotonicity)))
void SCIPexprhdlrSetIntEval(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRINTEVAL((*inteval)))
void SCIPexprhdlrSetCurvature(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCURVATURE((*curvature)))
SCIP_RETCODE SCIPincludeExprhdlr(SCIP *scip, SCIP_EXPRHDLR **exprhdlr, const char *name, const char *desc, unsigned int precedence, SCIP_DECL_EXPREVAL((*eval)), SCIP_EXPRHDLRDATA *data)
SCIP_EXPRHDLR * SCIPfindExprhdlr(SCIP *scip, const char *name)
void SCIPexprhdlrSetSimplify(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRSIMPLIFY((*simplify)))
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)
void SCIPexprSetData(SCIP_EXPR *expr, SCIP_EXPRDATA *exprdata)
int SCIPexprGetNChildren(SCIP_EXPR *expr)
SCIP_Bool SCIPexprIsIntegral(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprValue(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)
SCIP_EXPRDATA * SCIPexprGetData(SCIP_EXPR *expr)
SCIP_RETCODE SCIPparseExpr(SCIP *scip, SCIP_EXPR **expr, const char *exprstr, const char **finalpos, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_RETCODE SCIPprintExpr(SCIP *scip, SCIP_EXPR *expr, FILE *file)
SCIP_Real SCIPgetValueExprValue(SCIP_EXPR *expr)
SCIP_Real SCIPexprGetEvalValue(SCIP_EXPR *expr)
SCIP_EXPR ** SCIPexprGetChildren(SCIP_EXPR *expr)
SCIP_INTERVAL SCIPexprGetActivity(SCIP_EXPR *expr)
void SCIPcaptureExpr(SCIP_EXPR *expr)
SCIP_EXPRHDLR * SCIPexprGetHdlr(SCIP_EXPR *expr)
SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)
SCIP_Bool SCIPintervalIsEmpty(SCIP_Real infinity, SCIP_INTERVAL operand)
void SCIPintervalLog(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)
void SCIPintervalExp(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)
void SCIPintervalSetEmpty(SCIP_INTERVAL *resultant)
#define SCIPallocClearBlockMemory(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPepsilon(SCIP *scip)
#define SCIP_DECL_EXPR_OWNERCREATE(x)
struct SCIP_ExprhdlrData SCIP_EXPRHDLRDATA
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4