首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我是否可以将SCIP约束处理程序设置为只有在找到可行的解决方案之后才能工作?

问我是否可以将SCIP约束处理程序设置为只有在找到可行的解决方案之后才能工作?
EN

Stack Overflow用户
提问于 2022-07-09 11:43:17
回答 1查看 58关注 0票数 0

我阅读了SCIP约束处理程序文档,并读取CONSHDLR_CHECKPRIORITY= -1使约束处理程序仅在解决方案为整型时才能工作。然而,在找到可行的解决方案之前,我的处理程序仍然在添加约束。因此,即使解是积分的,也不能满足所有的约束条件。

我无法找到另一个参数来将约束处理程序设置为仅在预解结束并找到可行的解决方案之后才启动,或者只在解决方案满足所有模型约束时添加约束。

是否有一个特定的参数来设置这个?或者用限制来耍花招?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-07-09 11:59:40

您只需在所有约束处理程序中赋予约束处理程序最低优先级(用于检查和强制)。这样,只有当所有其他约束处理程序都已执行时,才会调用约束处理程序。

您可以通过在交互式shell中键入disp conshdlrs来查看所有默认优先级。默认值为

代码语言:javascript
复制
 constraint handler   chckprio enfoprio sepaprio sepaf propf eager prestim description
 ------------------   -------- -------- -------- ----- ----- ----- ------- -----------
 benderslp            10000000 10000000        0    -1    -1   100     fme  constraint handler for Benders' Decomposition to separate LP solutions
 integral                    0        0        0    -1    -1    -1     fme  integrality constraint
 cardinality               -10      100       10    10     1   100     f    cardinality constraint handler
 SOS1                      -10      100     1000    10     1   100      m   SOS1 constraint handler
 SOS2                      -10      100       10     0     1   100     f    SOS2 constraint handler
 varbound              -500000  -500000   900000     0     1   100     fm   variable bounds  lhs <= x + c*y <= rhs, x non-binary, y non-continuous
 knapsack              -600000  -600000   600000     0     1   100     fme  knapsack constraint of the form  a^T x <= b, x binary and a >= 0
 setppc                -700000  -700000   700000     0     1   100     fme  set partitioning / packing / covering constraints
 linking               -750000 -2050000   750000     1     1   100      m   linking constraint x = sum_{i=1}^{n} c_i*y_i, y1+...+yn = 1, x real, y's binary
 or                    -850000  -850000   850000     0     1   100      m   constraint handler for or constraints: r = or(x1, ..., xn)
 and                   -850100  -850100   850100     1     1   100     f e  constraint handler for AND-constraints: r = and(x1, ..., xn)
 xor                   -850200  -850200   850200     0     1   100     fme  constraint handler for xor constraints: r = xor(x1, ..., xn)
 conjunction           -900000   900000        0    -1    -1   100     f    conjunction of constraints
 disjunction           -900000  -950000        0    -1    -1   100     f    disjunction of constraints (or(cons1, cons2, ..., consn))
 exactsol              -999999 -9999999        0    -1    -1   100     fme  constraint to ensure that primal solutions report back exact solutions
 linear               -1000000 -1000000   100000     0     1   100     f e  linear constraints of the form  lhs <= a^T x <= rhs
 orbisack             -1005200 -1005200    40100     5     5    -1       e  symmetry breaking constraint handler for orbisacks
 orbitope             -1005200 -1005200    40100    -1     1    -1      m   symmetry breaking constraint handler relying on (partitioning/packing) orbitopes
 symresack            -1005200 -1005200    40100     5     5    -1       e  symmetry breaking constraint handler relying on symresacks
 logicor              -2000000 -2000000    10000     0     1   100     fme  logic or constraints
 bounddisjunction     -3000000 -3000000        0    -1     1   100     f    bound disjunction constraints
 cumulative           -3030000 -2040000  2100000     1     1   100     fme  cumulative constraint handler
 nonlinear            -4000010      -60       10     1     1   100     fme  handler for nonlinear constraints specified by algebraic expressions
 benders              -5000000     -100        0    -1    -1   100     f    constraint handler to execute Benders' Decomposition
 pseudoboolean        -5000000 -1000000        0    -1    -1   100      m   constraint handler dealing with pseudo Boolean constraints
 superindicator       -5000000 -5000000        0    -1     1   100      m   constraint handler for indicator constraints over arbitrary constraint types
 indicator            -6000000     -100       10    10     1   100     f    indicator constraint handler
 countsols            -9999999 -9999999        0    -1    -1   100     fme  constraint to count feasible solutions
 components           -9999999        0        0    -1     1    -1          independent components constraint handler
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72921074

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档